Skip to content

Read a succeeded query's rows: a page, or a download

With Accept: text/csv or application/x-ndjson, every stored row (up to 100 000) as a download. 409 query_not_finished (with Retry-After), query_failed (with reason) or query_cancelled; 410 results_expired 7 days after it finished. Pages and downloads are rate limited per organization (429 too_many_requests, with Retry-After).

GET
https://audit.ezghcloud.com/v1/organizations/{orgId}/queries/{queryId}/results

Authorization

  • apiKeyoptionalHTTP
  • oauthoptionalHTTP
  • sessionCookieoptionalAPI key in cookie

Path parameters

  • orgIdstringrequired

    The organization.

    format: uuid
  • queryIdstringrequired

    The query.

    format: uuid

Query parameters

  • limitoptionalinteger

    Default 100. A page also stops at 4 MiB.

    format: int32, maximum: 1000, minimum: 1
  • cursoroptionalstring

    The previous page's nextCursor.

Returns

200

A page of rows, or the download.

JSON
  • columnsarray ofobjectrequired
    2 properties
    • namestringrequired
    • typestringrequired

      The column's type.

  • rowsarray ofarray<object>required

    Each row's values, in the columns' order.

  • totalRowsintegerrequired
    format: int64
  • truncatedbooleanrequired

    The result stopped at the row limit.

  • nextCursoroptionalstring | null
CSV
string
X-NDJSON
"string"

400

invalid_request, invalid_cursor, invalid_query (with line and column), or lookup_too_broad.

JSON
  • errorobjectrequired
    6 properties
    • codestringrequired
      maxLength: 64, pattern: ^[a-z][a-z0-9_]*$
    • messagestringrequired
      maxLength: 1024
    • columnoptionalinteger

      invalid_query: where the SQL went wrong.

    • lineoptionalinteger

      invalid_query: where the SQL went wrong.

    • quotaoptionalobject

      quota_exceeded: the quota that refused the request. Trails Query's are audit.queries.queriesPerHour and audit.queries.bytesReadPerHour, rate quotas with a PT1H window. Never with Retry-After.

      11 properties
      • idstringrequired
      • kindallocationorrateorusageorconcurrencyrequired
      • limitintegerrequired
        minimum: 0
      • scopeorganizationorprojectorresourcerequired
      • inFlightoptionalinteger
        minimum: 0
      • periodStartoptionalstring
        format: date-time
      • regionoptionalstring
      • resetsAtoptionalstring
        format: date-time
      • scopeResourceNameoptionalstring
      • usedoptionalinteger
        minimum: 0
      • windowoptionalstring

        rate only: an ISO 8601 duration, PT1S to PT1H.

    • reasonoptionalstring

      query_failed: the query's own error code.

401

unauthenticated: no credential, or one that doesn't check out.

JSON
  • errorobjectrequired
    6 properties
    • codestringrequired
      maxLength: 64, pattern: ^[a-z][a-z0-9_]*$
    • messagestringrequired
      maxLength: 1024
    • columnoptionalinteger

      invalid_query: where the SQL went wrong.

    • lineoptionalinteger

      invalid_query: where the SQL went wrong.

    • quotaoptionalobject

      quota_exceeded: the quota that refused the request. Trails Query's are audit.queries.queriesPerHour and audit.queries.bytesReadPerHour, rate quotas with a PT1H window. Never with Retry-After.

      11 properties
      • idstringrequired
      • kindallocationorrateorusageorconcurrencyrequired
      • limitintegerrequired
        minimum: 0
      • scopeorganizationorprojectorresourcerequired
      • inFlightoptionalinteger
        minimum: 0
      • periodStartoptionalstring
        format: date-time
      • regionoptionalstring
      • resetsAtoptionalstring
        format: date-time
      • scopeResourceNameoptionalstring
      • usedoptionalinteger
        minimum: 0
      • windowoptionalstring

        rate only: an ISO 8601 duration, PT1S to PT1H.

    • reasonoptionalstring

      query_failed: the query's own error code.

403

access_denied: the caller's policies don't allow the action; forbidden_origin: a cookie-authenticated write from an origin that isn't allowed.

JSON
  • errorobjectrequired
    6 properties
    • codestringrequired
      maxLength: 64, pattern: ^[a-z][a-z0-9_]*$
    • messagestringrequired
      maxLength: 1024
    • columnoptionalinteger

      invalid_query: where the SQL went wrong.

    • lineoptionalinteger

      invalid_query: where the SQL went wrong.

    • quotaoptionalobject

      quota_exceeded: the quota that refused the request. Trails Query's are audit.queries.queriesPerHour and audit.queries.bytesReadPerHour, rate quotas with a PT1H window. Never with Retry-After.

      11 properties
      • idstringrequired
      • kindallocationorrateorusageorconcurrencyrequired
      • limitintegerrequired
        minimum: 0
      • scopeorganizationorprojectorresourcerequired
      • inFlightoptionalinteger
        minimum: 0
      • periodStartoptionalstring
        format: date-time
      • regionoptionalstring
      • resetsAtoptionalstring
        format: date-time
      • scopeResourceNameoptionalstring
      • usedoptionalinteger
        minimum: 0
      • windowoptionalstring

        rate only: an ISO 8601 duration, PT1S to PT1H.

    • reasonoptionalstring

      query_failed: the query's own error code.

404

not_found: unknown, malformed, or in an organization the caller isn't in.

JSON
  • errorobjectrequired
    6 properties
    • codestringrequired
      maxLength: 64, pattern: ^[a-z][a-z0-9_]*$
    • messagestringrequired
      maxLength: 1024
    • columnoptionalinteger

      invalid_query: where the SQL went wrong.

    • lineoptionalinteger

      invalid_query: where the SQL went wrong.

    • quotaoptionalobject

      quota_exceeded: the quota that refused the request. Trails Query's are audit.queries.queriesPerHour and audit.queries.bytesReadPerHour, rate quotas with a PT1H window. Never with Retry-After.

      11 properties
      • idstringrequired
      • kindallocationorrateorusageorconcurrencyrequired
      • limitintegerrequired
        minimum: 0
      • scopeorganizationorprojectorresourcerequired
      • inFlightoptionalinteger
        minimum: 0
      • periodStartoptionalstring
        format: date-time
      • regionoptionalstring
      • resetsAtoptionalstring
        format: date-time
      • scopeResourceNameoptionalstring
      • usedoptionalinteger
        minimum: 0
      • windowoptionalstring

        rate only: an ISO 8601 duration, PT1S to PT1H.

    • reasonoptionalstring

      query_failed: the query's own error code.

410

results_expired: the query's results are kept 7 days; run it again.

JSON
  • errorobjectrequired
    6 properties
    • codestringrequired
      maxLength: 64, pattern: ^[a-z][a-z0-9_]*$
    • messagestringrequired
      maxLength: 1024
    • columnoptionalinteger

      invalid_query: where the SQL went wrong.

    • lineoptionalinteger

      invalid_query: where the SQL went wrong.

    • quotaoptionalobject

      quota_exceeded: the quota that refused the request. Trails Query's are audit.queries.queriesPerHour and audit.queries.bytesReadPerHour, rate quotas with a PT1H window. Never with Retry-After.

      11 properties
      • idstringrequired
      • kindallocationorrateorusageorconcurrencyrequired
      • limitintegerrequired
        minimum: 0
      • scopeorganizationorprojectorresourcerequired
      • inFlightoptionalinteger
        minimum: 0
      • periodStartoptionalstring
        format: date-time
      • regionoptionalstring
      • resetsAtoptionalstring
        format: date-time
      • scopeResourceNameoptionalstring
      • usedoptionalinteger
        minimum: 0
      • windowoptionalstring

        rate only: an ISO 8601 duration, PT1S to PT1H.

    • reasonoptionalstring

      query_failed: the query's own error code.

429

too_many_requests or too_many_queries, with Retry-After; or quota_exceeded (with quota), never with Retry-After.

JSON
  • errorobjectrequired
    6 properties
    • codestringrequired
      maxLength: 64, pattern: ^[a-z][a-z0-9_]*$
    • messagestringrequired
      maxLength: 1024
    • columnoptionalinteger

      invalid_query: where the SQL went wrong.

    • lineoptionalinteger

      invalid_query: where the SQL went wrong.

    • quotaoptionalobject

      quota_exceeded: the quota that refused the request. Trails Query's are audit.queries.queriesPerHour and audit.queries.bytesReadPerHour, rate quotas with a PT1H window. Never with Retry-After.

      11 properties
      • idstringrequired
      • kindallocationorrateorusageorconcurrencyrequired
      • limitintegerrequired
        minimum: 0
      • scopeorganizationorprojectorresourcerequired
      • inFlightoptionalinteger
        minimum: 0
      • periodStartoptionalstring
        format: date-time
      • regionoptionalstring
      • resetsAtoptionalstring
        format: date-time
      • scopeResourceNameoptionalstring
      • usedoptionalinteger
        minimum: 0
      • windowoptionalstring

        rate only: an ISO 8601 duration, PT1S to PT1H.

    • reasonoptionalstring

      query_failed: the query's own error code.

500

internal_error: a bug; the details are in the logs, under the request ID.

JSON
  • errorobjectrequired
    6 properties
    • codestringrequired
      maxLength: 64, pattern: ^[a-z][a-z0-9_]*$
    • messagestringrequired
      maxLength: 1024
    • columnoptionalinteger

      invalid_query: where the SQL went wrong.

    • lineoptionalinteger

      invalid_query: where the SQL went wrong.

    • quotaoptionalobject

      quota_exceeded: the quota that refused the request. Trails Query's are audit.queries.queriesPerHour and audit.queries.bytesReadPerHour, rate quotas with a PT1H window. Never with Retry-After.

      11 properties
      • idstringrequired
      • kindallocationorrateorusageorconcurrencyrequired
      • limitintegerrequired
        minimum: 0
      • scopeorganizationorprojectorresourcerequired
      • inFlightoptionalinteger
        minimum: 0
      • periodStartoptionalstring
        format: date-time
      • regionoptionalstring
      • resetsAtoptionalstring
        format: date-time
      • scopeResourceNameoptionalstring
      • usedoptionalinteger
        minimum: 0
      • windowoptionalstring

        rate only: an ISO 8601 duration, PT1S to PT1H.

    • reasonoptionalstring

      query_failed: the query's own error code.

503

unavailable: a dependency the request needs is down. Retry after Retry-After.

JSON
  • errorobjectrequired
    6 properties
    • codestringrequired
      maxLength: 64, pattern: ^[a-z][a-z0-9_]*$
    • messagestringrequired
      maxLength: 1024
    • columnoptionalinteger

      invalid_query: where the SQL went wrong.

    • lineoptionalinteger

      invalid_query: where the SQL went wrong.

    • quotaoptionalobject

      quota_exceeded: the quota that refused the request. Trails Query's are audit.queries.queriesPerHour and audit.queries.bytesReadPerHour, rate quotas with a PT1H window. Never with Retry-After.

      11 properties
      • idstringrequired
      • kindallocationorrateorusageorconcurrencyrequired
      • limitintegerrequired
        minimum: 0
      • scopeorganizationorprojectorresourcerequired
      • inFlightoptionalinteger
        minimum: 0
      • periodStartoptionalstring
        format: date-time
      • regionoptionalstring
      • resetsAtoptionalstring
        format: date-time
      • scopeResourceNameoptionalstring
      • usedoptionalinteger
        minimum: 0
      • windowoptionalstring

        rate only: an ISO 8601 duration, PT1S to PT1H.

    • reasonoptionalstring

      query_failed: the query's own error code.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close