Skip to main content
GET
/
sessions
cURL
curl --request GET \
  --url https://api.opal.dev/v1/sessions \
  --header 'Authorization: Bearer <token>'
{
  "next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
  "previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ",
  "results": [
    {
      "connection_id": "h0z968412-2451-4bbd-42h4-057l715d917m",
      "user_id": "29827fb8-f2dd-4e80-9576-28e31e9934ac",
      "resource_id": "1b978423-db0a-4037-a4cf-f79c60cb67b3",
      "expiration_date": "2022-01-23T04:56:07.000Z"
    },
    {
      "connection_id": "6e6b5597-bd36-4f4c-a629-01e3fa791932",
      "user_id": "b031c922-b84f-4424-9f4f-c49c05871bfe",
      "resource_id": "77eb1ab7-2c27-4fc4-afdb-137e1265cddd",
      "expiration_date": "2022-03-12T07:22:18.000Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

resource_id
string<uuid>
required

The ID of the resource.

user_id
string

The ID of the user you wish to query sessions for.

Response

200 - application/json

The sessions associated with a resource.

next
string | null

The cursor with which to continue pagination if additional result pages exist.

Example:

"cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw"

previous
string | null

The cursor used to obtain the current result page.

Example:

"cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ"

results
object[]