Make your first Management API query

Last verified
Last verified Oct 18, 2026

Retrieve the first page of an account's events and continue through its results. This tutorial reads data without changing account records.

Before you start

  • Obtain your deployment's API origin, such as https://<api-host>, from support. The documentation website is not necessarily the API host.
  • Obtain a dedicated Management credential with events:read. Credential administration is support-only; follow Get API access.
  • Use an HTTP client that can send JSON, or install curl and jq for the example.

Keep the token in a server-side secret manager. It already identifies the account; omit X-Tenant-Domain.

1. Send the query

Set KORONA_EVENT_API_ORIGIN and KORONA_EVENT_MANAGEMENT_TOKEN in your process environment using your API host and secret manager. Save this operation as management-events.graphql:

graphql
query EventIndex($first: Int, $after: String, $updatedSince: DateTime) {
  events(first: $first, after: $after, updatedSince: $updatedSince) {
    nodes {
      id
      name
      number
      updatedAt
      discardedAt
      tombstone
    }
    pageInfo {
      endCursor
      hasNextPage
    }
  }
}

Send it with a page size of 100 and no cursor or date filter:

sh
jq -n --rawfile query management-events.graphql   '{query: $query, variables: {first: 100, after: null, updatedSince: null}}'   > management-request.json

curl --fail-with-body -sS   "$KORONA_EVENT_API_ORIGIN/api/graphql/management/v1"   -H 'Content-Type: application/json'   -H "Authorization: Bearer $KORONA_EVENT_MANAGEMENT_TOKEN"   --data-binary @management-request.json > management-response.json

jq . management-response.json

2. Read the result

A response has this shape; identifiers, names, timestamps, cursors, and record counts depend on your account:

json
{
  "data": {
    "events": {
      "nodes": [
        {
          "id": "event-id",
          "name": "Evening tour",
          "number": "E-1001",
          "updatedAt": "2026-10-18T08:30:00.000000Z",
          "discardedAt": null,
          "tombstone": false
        }
      ],
      "pageInfo": { "endCursor": "opaque-cursor", "hasNextPage": false }
    }
  }
}

Check the HTTP status and top-level errors before accepting the page. HTTP 200 can still contain GraphQL errors. An empty nodes array with hasNextPage: false is a successful empty result. name and number may be null.

3. Retrieve the next page

When hasNextPage is true, copy the exact returned endCursor into the next request's variables.after. Keep the same query, page size, and updatedSince. Repeat until hasNextPage is false. Do not send the illustrative opaque-cursor value above.

Requesting 100 records retrieves at most one page, not the whole account. Follow Synchronize Management API records to process all pages and persist a safe checkpoint.

Troubleshooting

Response or symptomAction
HTTP 401 with UnauthorizedCheck the endpoint and token; ask support to check expiry or revocation. Remove a conflicting tenant header.
GraphQL Not authorizedRequest a credential with the scope required by the selected collection.
GraphQL Invalid cursorRestart the run from its saved timestamp with after: null; use only a returned cursor for continuation.
HTTP 429Wait at least the Retry-After interval, then retry with backoff and jitter.
An order or report field is unknownFollow the detailed-data guide; use the Management v1 schema and a credential with the required scopes.

Ready to Get Started?

Book a free demo or reach out — we’d love to hear from you.