View as Markdown

Get sessions for an LMS user (paginated)

GET /v1/users/{userId}/sessions
Base URL
https://api.isnotai.com

Authenticate with Authorization: Bearer aik_v1_... (preferred) or the x-api-key header. Keys are region-bound. Authentication

Available Regions 2 regions

Sessions are returned newest-first by createdAt. Cursors follow the same rules as GET /v1/sessions: opaque, filter-bound, restart on rejection.

Path Parameters

userId
string Required

LMS user id (provider-neutral; same value surfaced on PublicSession.userId).

Query Parameters

pageSize
integer(int32)

Page size. The maximum is scoped to the integration’s plan tier (Free 50, Pro and Enterprise 100). Requests above the tier maximum clamp to the maximum and the effective value is returned in pagination.limit. Minimum 1. Default 50.

cursor
string

Opaque continuation cursor returned by a previous call.

Responses

Any authenticated route can also return 401 (missing or invalid key), 429 RATE_LIMITED (edge rate limit; Retry-After is an integer number of seconds), and 5xx errors, even where not listed below. See Error Handling and Rate Limits.

200 application/json

Payload of UserSessionsResponse

Show 2 response attributes Hide response attributes
data
array[object]
Show 11 data attributes Hide data attributes
id
string
createdAt
string(date-time)
updatedAt
string(date-time)
status
string
botScore
number(double)
detectionFlags
array[string]
pageUrl
string
userAgentSummary
string
userId
string
userName
string
userUrl
string
pagination
object
Show 3 pagination attributes Hide pagination attributes
nextCursor
string
hasMore
boolean
limit
integer(int32)
400 application/json

Payload of ErrorEnvelope

Show 1 response attribute Hide response attributes
error
object
Show 3 error attributes Hide error attributes
code
string Required
message
string Required
details
object Required

Always present and null unless the error carries field-level context (validation errors set details.field to the offending parameter name).

401 application/json

Payload of ErrorEnvelope

Show 1 response attribute Hide response attributes
error
object
Show 3 error attributes Hide error attributes
code
string Required
message
string Required
details
object Required

Always present and null unless the error carries field-level context (validation errors set details.field to the offending parameter name).

GET /v1/users/{userId}/sessions
curl --request GET \
  --url https://api.isnotai.com/v1/users/your-userId/sessions \
  --header 'Authorization: Bearer aik_v1_YOUR_API_KEY'
import requests

url = "https://api.isnotai.com/v1/users/your-userId/sessions"

headers = {"Authorization": "Bearer aik_v1_YOUR_API_KEY"}

response = requests.get(url, headers=headers)

print(response.json())
const fetch = require('node-fetch');

const url = 'https://api.isnotai.com/v1/users/your-userId/sessions';
const options = {method: 'GET', headers: {Authorization: 'Bearer aik_v1_YOUR_API_KEY'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("https://api.isnotai.com/v1/users/your-userId/sessions"),
    Headers =
    {
        { "Authorization", "Bearer aik_v1_YOUR_API_KEY" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}

Try it

Collapse

Sent to the API as Authorization: Bearer aik_v1_.... Held only in this tab's input element; re-enter on each browser tab. The docs site never receives or stores it.

Path parameters

LMS user id (provider-neutral; same value surfaced on PublicSession.userId).

Query parameters

Page size. The maximum is scoped to the integration's plan tier (Free 50, Pro and Enterprise 100). Requests above the tier maximum clamp to the maximum and the effective value is returned in pagination.limit. Minimum 1. Default 50.

Opaque continuation cursor returned by a previous call.

200 Response examples
{
  "data": [
    {
      "id": "example-id-123",
      "createdAt": "2024-01-01T00:00:00Z",
      "updatedAt": "2024-01-01T00:00:00Z",
      "status": "string",
      "botScore": 0,
      "detectionFlags": [
        "string"
      ],
      "pageUrl": "string",
      "userAgentSummary": "string",
      "userId": "string",
      "userName": "string",
      "userUrl": "string"
    }
  ],
  "pagination": {
    "nextCursor": "string",
    "hasMore": false,
    "limit": 0
  }
}
400 Response examples
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  }
}
401 Response examples
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  }
}