Skip to content

The organization's query history, newest first

Everyone's with audit.queries.list; with only audit.queries.get, your own.

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

Authorization

  • apiKeyoptionalHTTP
  • oauthoptionalHTTP
  • sessionCookieoptionalAPI key in cookie

Path parameters

  • orgIdstringrequired

    The organization.

    format: uuid

Query parameters

  • limitoptionalinteger

    Default 20.

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

    The previous page's nextCursor, for the same filters.

  • statusoptionalstring

    queued, running, succeeded, failed or cancelled.

  • createdByoptionalstring

    A principal ID.

Returns

200

A page of queries.

JSON
  • queriesarray ofobjectrequired
    16 properties
    • cancelRequestedbooleanrequired
    • createdAtstringrequired
      format: date-time
    • createdBystringrequired

      The principal who started it.

    • fromstringrequired
      format: date-time
    • idstringrequired
      format: uuid
    • queuePositioninteger | nullrequired

      Its place in the organization's line while it's queued (1 is next), in GetQuery's answer; null otherwise, and in lists.

      format: int64
    • sqlstringrequired
    • statusstringrequired

      queued, running, succeeded, failed or cancelled.

    • tostringrequired
      format: date-time
    • truncatedbooleanrequired
    • createdByIdentityoptionalobject | null
    • erroroptionalQueryErrorornull
      2 variants

      One of the following:

      • QueryError
        2 properties
        • codestringrequired

          timeout, memory_limit, too_much_data, quota_exceeded, query_too_large, cancelled, worker_lost, invalid_query or query_failed.

        • messageoptionalstring | null
      • null
    • finishedAtoptionalstring | null
    • resultRowsoptionalinteger | null
      format: int64
    • startedAtoptionalstring | null
    • statsoptionalQueryStatsornull
      2 variants

      One of the following:

      • QueryStats
        4 properties
        • bytesScannedstringrequired

          Bytes read, as a decimal string: it can exceed 2^53.

          format: int64, pattern: ^(0|[1-9][0-9]{0,18})$
          Example: "5020"
        • elapsedMsintegerrequired
          format: int64, minimum: 0
        • resultRowsintegerrequired
          format: int64, minimum: 0
        • rowsScannedintegerrequired
          format: int64, minimum: 0
      • null
  • nextCursoroptionalstring | null

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.

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