For AI agents: this page is also available as Markdown at https://docs.refabric.com/api-reference/platform/tasks/read-your-metrics.md, and the index of every page is https://docs.refabric.com/llms.txt.

Platform API › Tasks

Read your metrics

Your jobs and calls in [start, end), one row per group — the whole account: job counts and outcomes, queue and run time percentiles, credits charged and the calls your API keys made.

GEThttps://api.refabric.com/v1/account/metrics
import os
import requests

url = "https://api.refabric.com/v1/account/metrics"

headers = {"Authorization": f"Key {os.environ['REFABRIC_API_KEY']}"}

response = requests.get(url, headers=headers)

print(response.json())
{
  "as_of": "2026-10-01T00:00:00Z",
  "start": "2026-09-01T00:00:00Z",
  "end": "2026-10-01T00:00:00Z",
  "group_by": "day",
  "items": []
}

Modes

  • group_by=day · task · key · error — one row per UTC day, task, API key, or public error code (the jobs that ended with it and the calls answered with it).

Authentication. A key with account:read: the figures are your account's.

Key features

  • A window of 90 days at most.
  • Call counts cover the API-key calls of the last 30 days.

Common use cases

  • Chart your traffic and spend per day.
  • Find the error code your integration hits most.

See also

  • GET /v1/account/usage
  • GET /v1/account/requests
  • GET /v1/errors

Authorization

Authorization: Key $REFABRIC_API_KEYScope: account:read

Parameters

Query parameters

  • stringoptionalDefault: day

    One row per UTC day, per task (the public name), per key, or per error (a public error code: the jobs that ended with it and the calls answered with it).

    Values

    • day — One row per UTC day.
    • task — One row per task.
    • key — One row per API key.
    • error — One row per public error code.
  • stringoptionalnullable

    Inclusive, ISO-8601 (2026-09-01T00:00:00Z; no zone means UTC). Default: 30 days before end. The window is at most 90 days.

    format: date-time

  • stringoptionalnullable

    Exclusive, ISO-8601 (no zone means UTC). Default: now.

    format: date-time

Header parameters

  • stringoptional

    The contract version you wrote against (a date). Absent: the current version.

    format: date

  • stringoptional

    Your own id for this request; we answer it back under X-Client-Request-ID.

    max length 128

Response

200 — Done: the answer is in the body.

  • stringrequired

    The moment these figures were read (UTC, ISO-8601).

    Example: 2026-10-01T00:00:00Z

  • stringrequired

    The window's first instant, inclusive (UTC).

    Example: 2026-09-01T00:00:00Z

  • stringrequired

    The window's end, exclusive (UTC); without end sent, as_of.

    Example: 2026-10-01T00:00:00Z

  • stringrequired

    How the rows are grouped, as asked.

    Values

    • day — One row per UTC day.
    • task — One row per task.
    • key — One row per API key.
    • error — One row per public error code.

    Example: day

  • array<object>required

    One row per group, ordered by the group.

  • 400 — The request cannot be read as it was sent (a header, the URL or the body's form).
  • 401 — No valid API key was sent.
  • 403 — Your key or your plan does not allow this.
  • 422 — A field is missing or has a value this operation cannot use.
  • 429 — Too many requests: wait for the number of seconds in the Retry-After header.
  • 500 — Something went wrong on our side; retry, and quote the request id if it keeps happening.