Get API call counts for the authenticated API key, or owned keys and Apps using x-dev-portal-key. Rows are grouped by API key, endpoint, status code, and error code.

get/metrics/usage

Request

  • Base URL: https://api.relay.link
  • URL: https://api.relay.link/metrics/usage
  • Auth: none declared

Query parameters

granularity'minutely' | 'hourly' | 'daily'

Time bucket granularity. minutely defaults to last 24h, hourly to last 7d, daily to last 14d.

startTimestampnumber

Start of the query window as a Unix timestamp (seconds). Defaults based on granularity.

endTimestampnumber

End of the query window as a Unix timestamp (seconds). Defaults to now.

apiKeystring

Filter metrics by API key. Accepts a single value or a comma-separated list (e.g. key1,key2) — results include metrics matching any of the supplied keys. Maximum 50 values across apiKey, apiKeyId and appId.

apiKeyIdstring

Filter metrics by API key IDs (key_id_<uuid>, comma-separated) owned by your integrator when using x-dev-portal-key. OR matching with apiKey and appId; maximum 50 values combined.

appIdstring

Filter by owned Apps (app_id_<uuid>, comma-separated); requires x-dev-portal-key. Includes all current keys, including inactive keys. OR matching with apiKey and apiKeyId; maximum 50 filter values combined before expanding Apps to keys. Rows remain grouped by API key. App attribution is resolved at read time: hard-deleted keys drop out and reassigned keys attribute all retained usage to their current App. Retention is 24h minutely, 7d hourly, and 14d daily.

Headers

x-dev-portal-keystring

Integrator portal credential required for appId filtering.

x-api-keystring

Integrator API key.

Response

Default Response

Changes

    • info

      added the new optional header request parameter x-dev-portal-key

    • info

      added the new optional query request parameter appId

    • info

      added the optional property // to the response with the status

    • info

      added the new optional query request parameter apiKeyId