Skip to main content
POST
/
v1
/
insights
/
execute
Execute a SbQL query
curl --request POST \
  --url https://public-api.sessionboard.com/v1/insights/execute \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <api-key>' \
  --data '
{
  "query": "<string>",
  "eventId": 123,
  "eventIds": [
    123
  ],
  "obfuscatePii": true,
  "format": "<string>",
  "page": 123,
  "limit": 123,
  "search": "<string>",
  "sortBy": "<string>",
  "sortDirection": "asc",
  "groupBy": "<string>",
  "pivot": "<string>"
}
'
{
  "data": [
    {}
  ],
  "pagination": {
    "currentPage": 123,
    "pageSize": 123,
    "totalPages": 123,
    "totalResults": 123
  }
}

Authorizations

x-access-token
string
header
required

API key for authentication. Obtain from the Sessionboard admin dashboard.

Body

application/json
query
string
required

The SbQL query string to execute.

Example:

"SELECT sessions.title, sessions.status FROM sessions"

eventId
integer

Scope query to a single event.

eventIds
integer[]

Scope query to multiple events.

obfuscatePii
boolean
default:true

Whether to obfuscate personally identifiable information in results.

format
string

Output format for results.

page
integer

Page number for paginated results.

limit
integer

Maximum number of rows to return.

Full-text search within results.

sortBy
string

Column name to sort results by.

sortDirection
enum<string>

Sort direction.

Available options:
asc,
desc
groupBy
string

Column name to group results by.

pivot
string

Column name to pivot results on.

Response

OK

data
object[]
pagination
object

Pagination metadata returned with list responses.