Authentication
Connections
Guard Rails
Server Management
Jira
Organization Management
Reports
User Management
List Sessions
List session resources
curl --request GET \
--url https://use.hoop.dev/api/sessions
{
"data": [
{
"connection": "pgdemo",
"connection_subtype": "postgres",
"end_date": "2024-07-25T15:56:35.361101Z",
"event_size": 569,
"event_stream": [
123
],
"exit_code": 123,
"id": "1CBC8DB5-FBF8-4293-8E35-59A6EEA40207",
"integrations_metadata": {},
"labels": {},
"metadata": {},
"metrics": {},
"org_id": "0CD7F941-2BB8-4F9F-93B0-11620D4652AB",
"review": {
"access_duration": 0,
"created_at": "2024-07-25T15:56:35.317601Z",
"id": "9F9745B4-C77B-4D52-84D3-E24F67E3623C",
"input": "SELECT NOW()",
"input_clientargs": [
"-x"
],
"org": "A72CF2A0-12D0-4E0D-A732-E34FFA3D9417",
"review_connection": {
"id": "20A5AABE-C35D-4F04-A5A7-C856EE6C7703",
"name": "pgdemo"
},
"review_groups_data": [
{
"group": "sre",
"id": "20A5AABE-C35D-4F04-A5A7-C856EE6C7703",
"review_date": "2024-07-25T19:36:41Z",
"reviewed_by": {
"email": "john.wick@bad.org",
"id": "D5BFA2DD-7A09-40AE-AFEB-C95787BA9E90",
"name": "John Wick",
"slack_id": "U053ELZHB53"
},
"status": "APPROVED"
}
],
"review_owner": {
"email": "john.wick@bad.org",
"id": "D5BFA2DD-7A09-40AE-AFEB-C95787BA9E90",
"name": "John Wick",
"slack_id": "U053ELZHB53"
},
"revoke_at": "",
"session": "35DB0A2F-E5CE-4AD8-A308-55C3108956E5",
"status": "PENDING",
"type": "onetime"
},
"script": {
"data": "SELECT NOW()"
},
"start_date": "2024-07-25T15:56:35.317601Z",
"status": "open",
"type": "database",
"user": "<string>",
"user_id": "nJ1xV3ASWGTi7L8Y6zvnKqxNlnZM2TxV1bRdc0706vZ",
"user_name": "John Wick",
"verb": "connect"
}
],
"has_next_page": true,
"total": 100
}
Query Parameters
Filter by user's subject id
Filter by connection's name
Filter by connection's type
Filter starting on this date
Filter ending on this date
Limit the amount of records to return (max: 100)
Offset to paginate through resources
Response
The connection name of this resource
"pgdemo"
The subtype of the connection
"postgres"
When the execution ended. A null value indicates the session is still running
"2024-07-25T15:56:35.361101Z"
The stored resource size in bytes
569
The stream containing the output of the execution in the following format
[[0.268589438, "i", "ZW52"], ...]
<event-time>
- relative time in miliseconds to start_date<event-type>
- the event type as string (i: input, o: output e: output-error)<base64-content>
- the content of the session encoded as base64 string
The Linux exit code if it's available
The resource unique identifier
"1CBC8DB5-FBF8-4293-8E35-59A6EEA40207"
Metadata attributes related to integrations with third party services
The organization unique identifier
"0CD7F941-2BB8-4F9F-93B0-11620D4652AB"
Review of this session. In case the review doesn't exist this field will be null
The amount of time (nanoseconds) to allow access to the connection. It's valid only for jit
type reviews`
0
The time the resource was created
"2024-07-25T15:56:35.317601Z"
Reousrce identifier
"9F9745B4-C77B-4D52-84D3-E24F67E3623C"
The input that was issued when the resource was created
"SELECT NOW()"
The client arguments when the resource was created
["-x"]
Organization identifier
"A72CF2A0-12D0-4E0D-A732-E34FFA3D9417"
Contains the groups that requires to approve this review
The group to approve this review
"sre"
The resource identifier
"20A5AABE-C35D-4F04-A5A7-C856EE6C7703"
The date which this review was performed
"2024-07-25T19:36:41Z"
The review owner
The email of the owner
"john.wick@bad.org"
The resource identifier
"D5BFA2DD-7A09-40AE-AFEB-C95787BA9E90"
The display name of the owner
"John Wick"
The Slack ID of the owner
"U053ELZHB53"
The reviewed status
- APPROVED - Approve the review resource
- REJECTED - Reject the review resource
- REVOKED - Revoke an approved review
APPROVED
, REJECTED
, REVOKED
"APPROVED"
Contains information about the owner of this resource
The email of the owner
"john.wick@bad.org"
The resource identifier
"D5BFA2DD-7A09-40AE-AFEB-C95787BA9E90"
The display name of the owner
"John Wick"
The Slack ID of the owner
"U053ELZHB53"
The time when this review was revoked
""
The id of session
"35DB0A2F-E5CE-4AD8-A308-55C3108956E5"
The status of the review
- PENDING - The resource is waiting to be reviewed
- APPROVED - The resource is fully approved
- REJECTED - The resource is fully rejected
- REVOKED - The resource was revoked after being approved
- PROCESSING - The review is being executed
- EXECUTED - The review was executed
- UNKNOWN - Unable to know the status of the review
PENDING
, APPROVED
, REJECTED
, REVOKED
, PROCESSING
, EXECUTED
, UNKNOWN
The type of this review
- onetime - Represents a one time execution
- jit - Represents a time based review
jit
, onetime
The input of the session. This value is only set for the verb exec
{ "data": "SELECT NOW()" }
When the execution started
"2024-07-25T15:56:35.317601Z"
Status of the resource
- ready - the resource is ready to be executed, after being approved by a user
- open - the session started and it's running
- done - the session has finished
open
, ready
, done
The connection type of this resource
"database"
The user email of the resource
The user subject identifier of the resource
"nJ1xV3ASWGTi7L8Y6zvnKqxNlnZM2TxV1bRdc0706vZ"
The user display name of this resource
"John Wick"
Verb is how the client has interacted with this resource
- exec - Is an ad-hoc shell execution
- connect - Interactive execution, protocol port forwarding or interactive shell session
connect
, exec
100
curl --request GET \
--url https://use.hoop.dev/api/sessions
{
"data": [
{
"connection": "pgdemo",
"connection_subtype": "postgres",
"end_date": "2024-07-25T15:56:35.361101Z",
"event_size": 569,
"event_stream": [
123
],
"exit_code": 123,
"id": "1CBC8DB5-FBF8-4293-8E35-59A6EEA40207",
"integrations_metadata": {},
"labels": {},
"metadata": {},
"metrics": {},
"org_id": "0CD7F941-2BB8-4F9F-93B0-11620D4652AB",
"review": {
"access_duration": 0,
"created_at": "2024-07-25T15:56:35.317601Z",
"id": "9F9745B4-C77B-4D52-84D3-E24F67E3623C",
"input": "SELECT NOW()",
"input_clientargs": [
"-x"
],
"org": "A72CF2A0-12D0-4E0D-A732-E34FFA3D9417",
"review_connection": {
"id": "20A5AABE-C35D-4F04-A5A7-C856EE6C7703",
"name": "pgdemo"
},
"review_groups_data": [
{
"group": "sre",
"id": "20A5AABE-C35D-4F04-A5A7-C856EE6C7703",
"review_date": "2024-07-25T19:36:41Z",
"reviewed_by": {
"email": "john.wick@bad.org",
"id": "D5BFA2DD-7A09-40AE-AFEB-C95787BA9E90",
"name": "John Wick",
"slack_id": "U053ELZHB53"
},
"status": "APPROVED"
}
],
"review_owner": {
"email": "john.wick@bad.org",
"id": "D5BFA2DD-7A09-40AE-AFEB-C95787BA9E90",
"name": "John Wick",
"slack_id": "U053ELZHB53"
},
"revoke_at": "",
"session": "35DB0A2F-E5CE-4AD8-A308-55C3108956E5",
"status": "PENDING",
"type": "onetime"
},
"script": {
"data": "SELECT NOW()"
},
"start_date": "2024-07-25T15:56:35.317601Z",
"status": "open",
"type": "database",
"user": "<string>",
"user_id": "nJ1xV3ASWGTi7L8Y6zvnKqxNlnZM2TxV1bRdc0706vZ",
"user_name": "John Wick",
"verb": "connect"
}
],
"has_next_page": true,
"total": 100
}