Skip to navigation

Get analytics

Beta

Retrieve aggregated Guard request analytics bucketed by time and project.

The response groups buckets by project. Each bucket covers one resolution interval and contains request and detection counts for that interval.

Authentication. Use a Platform API key from the AI Guardrails Dashboard — not the Guard API key used for inference requests at api.lakera.ai.

Timestamps. Both start_time and end_time must be UTC (use the Z or +00:00 suffix). Sub-minute seconds are silently floored to the nearest minute. After flooring, start_time must remain strictly before end_time.

Resolution. An ISO 8601 duration string: PT{n}M, PT{n}H, or P{n}D where n is a positive integer (e.g. PT15M, PT6H, P7D). The time range after flooring must divide evenly by the resolution. The maximum range is 180 days.

Access. This endpoint is available to select organizations. Contact your Check Point representative to request access. Community users may also reach out to support@lakera.ai.

Authentication

AuthorizationBearer

Bearer authentication using API key. Generate an API key from the AI Guardrails Dashboard. Example: Bearer sk_123…

Keys carry one of two access scopes, chosen when the key is created:

  • Read and write — may call every endpoint. This is the default, and the scope of every key created before scopes were introduced.
  • Read only — may call read endpoints such as /v1-beta/logs, /v1-beta/analytics and the GET endpoints. Write endpoints return 403.

Issue a read-only key to anything that only needs to retrieve data, such as a log-shipping job or a dashboard, so that it cannot modify your policies or projects.

Request

This endpoint expects an object.
start_timestringRequiredformat: "date-time"

Start of the time range (inclusive). Must be a UTC timestamp — use the Z or +00:00 suffix. Sub-minute seconds are silently floored.

end_timestringRequiredformat: "date-time"

End of the time range (exclusive). Must be a UTC timestamp. After flooring, must be strictly after start_time. The range may not exceed 180 days.

project_idslist of stringsOptionalDefaults to []
Filter to specific projects. Omit or pass an empty array to return analytics across all projects in your organization.
resolutionstringOptionalDefaults to P1D

Bucket size as an ISO 8601 duration: PT{n}M, PT{n}H, or P{n}D where n is a positive integer (e.g. PT15M, PT6H, P7D). The time range after flooring must divide evenly by the resolution.

Response

Aggregated analytics bucketed by time and project
effective_start_timestringformat: "date-time"

The start of the time range after flooring sub-minute seconds, in UTC.

effective_end_timestringformat: "date-time"

The end of the time range after flooring sub-minute seconds, in UTC.

resolutionstring
The bucket size used for this response, echoed from the request.
projectslist of objects

Per-project time series

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
421
Misdirected Request Error
422
Unprocessable Entity Error