Skip to main content
GET
/
{resourceSlug}
/
sessions.json
Retrieve Sessions
curl --request GET \
  --url https://app.agentcloud.dev/{resourceSlug}/sessions.json \
  --header 'Authorization: Bearer <token>'
{
  "csrf": "<string>",
  "sessions": [
    {
      "orgId": "<string>",
      "teamId": "<string>",
      "name": "<string>",
      "startDate": {},
      "lastUpdatedDate": {},
      "tokensUsed": 123,
      "status": "started",
      "sharingConfig": {
        "permissions": {},
        "mode": "restricted"
      },
      "_id": "<string>",
      "appId": "<string>",
      "previewLabel": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

resourceSlug
string
required

The resourceSlug is a url parameter of the teamId associated with the user. Anywhere the resourceSlug is used can be interpreted as a teamId Mongodb Object id, unique identifier, length of 24 characters fitting the following regex; [a-f0-9]{24}

Response

JSON object containing an array of all the associated agents with that teamId, will return an empty array if the request is successful but there are no associated agents.

csrf
string

cross site token

sessions
object[]

Array of all sessions the given teamId has permissions for