Skip to main content
GET
/
agent
/
sessions
List agent sessions
curl --request GET \
  --url https://api.getmembrane.com/agent/sessions \
  --header 'Authorization: Bearer <token>'
{
  "items": [
    {
      "id": "<string>",
      "workspaceId": "<string>",
      "workspaceElementType": "customer",
      "workspaceElementId": "<string>",
      "type": "<string>",
      "status": "queued",
      "prompt": "<string>",
      "lastActivityAt": "2023-11-07T05:31:56Z",
      "hasWorker": true,
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "userId": "<string>",
      "tenantId": "<string>",
      "orgWorkspaceId": "<string>",
      "error": {
        "message": "<string>",
        "type": "bad_request",
        "key": "<string>",
        "data": {},
        "stack": {},
        "causedByError": "<unknown>",
        "logs": [
          {}
        ]
      },
      "title": "<string>",
      "summary": "<string>",
      "cost": 123,
      "state": "busy",
      "isExternal": true,
      "agentName": "membrane",
      "output": {}
    }
  ],
  "cursor": "<string>"
}

Authorizations

Authorization
string
header
required

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

Query Parameters

limit
integer

Maximum number of items to return (1-1000)

Required range: 1 <= x <= 1000
cursor
string

Pagination cursor from a previous response

workspaceElementType
enum<string>
Available options:
customer,
app,
connector,
integration,
flow,
flow-instance,
flow-run,
action,
package,
action-instance,
connection,
field-mapping,
field-mapping-instance,
data-source,
data-source-instance,
data-link-table,
data-link-table-instance,
app-event-type,
app-event-subscription,
app-event-log-record,
app-data-schema,
app-data-schema-instance,
external-event-subscription,
external-event-log-record,
external-event-pull,
screen,
action-run-log-record,
external-api-log-record,
incoming-webhook-log-record,
connected-product
workspaceElementId
string
startDatetime
string<date-time>
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
endDatetime
string<date-time>
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
status
enum<string>
Available options:
queued,
starting,
running,
completed,
failed,
cancelled
isExternal
boolean

Response

200 - application/json
items
object[]
required
cursor
string