Saltar al contenido principal
DocumentaciónUso · console.latam.ccsio.ai

Metering status

The state of the metering stream: its checkpoint and its degradation.

Menú de la documentación

Las descripciones de las operaciones y los campos son las del contrato, en inglés.

GET/metering/v1/status/checkpoint

Read the C3 cursors for a stream scope

Credencial
API key
Permiso
usage.read

Reads the C3 status fields the metering domain owns for one (tenant, plane instance, stream) scope. The response is the closed 8-field metering C3 projection: kind (const status), the three scope slugs, contiguous_usage_through, usage_high_water, and exactly last_ship_age_seconds and chain_head null (C3-nullable, not metering-owned); every other C3 field is absent. A scope the pipeline has never observed is 404 checkpoint-not-found.

curl
curl "https://console.latam.ccsio.ai/metering/v1/status/checkpoint?tenant_id=<tenant_id>&plane_instance_id=<plane_instance_id>&stream_id=<stream_id>" \
  -H "Authorization: Bearer $CCSIO_API_KEY"

Parámetros

NombreEnDescripción
X-Request-ID
opcional
headerstring

Optional request ULID. A valid ULID (upper or lowercase) is honored; when the header is absent or invalid, the runtime mints the id. The response X-Request-ID header carries the canonical uppercase form.

tenant_id
obligatorio
querystring

The tenant identifier (C2/C8 slug pattern).

plane_instance_id
obligatorio
querystring

The plane instance identifier (C2/C8 slug pattern).

stream_id
obligatorio
querystring

The stream identifier (C2/C8 slug pattern).

Respuestas

  • 200

    The metering-owned C3 projection for the scope.

    Esquema
    StatusCheckpointView
    • kindanyobligatorio

      always "status"

    • tenant_idstringobligatorio

      pattern ^[a-z][a-z0-9._-]{0,127}$

    • plane_instance_idstringobligatorio

      pattern ^[a-z][a-z0-9._-]{0,127}$

    • stream_idstringobligatorio

      pattern ^[a-z][a-z0-9._-]{0,127}$

    • contiguous_usage_throughintegerobligatorio

      0 to 9007199254740991

    • usage_high_waterintegerobligatorio

      0 to 9007199254740991

    • last_ship_age_secondsnull or nullobligatorio
    • chain_headnull or nullobligatorio
  • 400

    Client refusal. Codes: invalid-request, slug-invalid

  • 401

    The request carries no credential, more than one, or one the platform does not accept, and is refused before the operation runs; `error.code` says why. Supply exactly one credential. Codes: invalid-request (no credential, or both Authorization:

    Leer más

    Bearer and x-api-key), api-key-invalid (a value that is not a platform API key, or a key of a kind the platform does not accept), api-key-unknown, api-key-revoked, api-key-expired, bootstrap-disabled (the one-shot installation credential, once a key exists), token-malformed (a bearer token that is not a JWT), token-algorithm-unsupported, token-signature-invalid, token-claim-invalid, token-issuer-mismatch, token-audience-mismatch, token-expired, token-not-yet-valid, issuer-untrusted, issuer-residency-mismatch (the issuer belongs to another plane), issuer-resolution-unknown, jwks-unavailable, jwks-key-not-found, staff-token-inactive (a platform operator's token), staff-not-operator, staff-directory-unavailable, identity-not-provisioned (a verified identity with no account on this plane), organization-not-found (a verified identity or key whose organization this plane does not know), internal-error (a fault while the credential is checked is refused too, fail closed), context-cancelled

  • 402

    The organization has to pay first: its standing is payment_required.

    Leer más

    The request boundary applies this payment gate to every route except an organization's billing routes, the caller's own context, organization list, onboarding, session report and personal keys, the public routes, and the routes of platform operators, who administer an organization that has to pay. The operations the gate covers declare this response. On /v1 the refusal is rendered in the OpenAI error format. Code: payment-required

  • 403

    No role of the caller holds `usage.read` in the organization (policy-denied), or the organization the request names is not the caller's own (tenant-mismatch). Codes: policy-denied, tenant-mismatch

  • 404

    The checkpoint scope has not been observed. Codes: checkpoint-not-found

  • 405

    The path is claimed but the request method is not allowed. Go ServeMux returns its standard plain-text response and lists permitted methods in Allow.

  • 500

    Platform failure. Codes: internal-error

GET/metering/v1/status/degradation

Read the per-(measurement, reason) degraded-usage aggregate

Credencial
API key
Permiso
usage.read

Reads the per-(measurement, measurement_reason) count of usage facts in a window — the operator signal for how much usage was not exactly measured, and why. since is an optional RFC 3339 query parameter (default: 24 h before now); a present-but-malformed value is 400 invalid-request.

Leer más

The window_start echoes the truncated UTC value. Rows are ordered by (measurement, reason), bounded by the C2 enum cardinality (3 measurements x 6 reasons), render [] when empty (never null), and carry reason null exactly for measured facts.

curl
curl "https://console.latam.ccsio.ai/metering/v1/status/degradation" \
  -H "Authorization: Bearer $CCSIO_API_KEY"

Parámetros

NombreEnDescripción
X-Request-ID
opcional
headerstring

Optional request ULID. A valid ULID (upper or lowercase) is honored; when the header is absent or invalid, the runtime mints the id. The response X-Request-ID header carries the canonical uppercase form.

since
opcional
querystring

RFC 3339, any offset; the read echoes the truncated UTC value; default window 24 h before now.

Respuestas

  • 200

    The degradation aggregate for the window.

    Esquema
    DegradationView
    • window_startstringobligatorio

      pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$

    • rowsarray of DegradationRowobligatorio
      • measurementstringobligatorio

        Valores permitidos: "measured""estimated""unknown"

      • reasonstring or nullobligatorio

        The degradation reason; null exactly for measured facts.

        Valores permitidos: "coarse_counter""provider_estimate""final_usage_missing""meter_loss""canceled""implausible_count"

      • countintegerobligatorio

        at least 0

  • 400

    Client refusal. Codes: invalid-request

  • 401

    The request carries no credential, more than one, or one the platform does not accept, and is refused before the operation runs; `error.code` says why. Supply exactly one credential. Codes: invalid-request (no credential, or both Authorization:

    Leer más

    Bearer and x-api-key), api-key-invalid (a value that is not a platform API key, or a key of a kind the platform does not accept), api-key-unknown, api-key-revoked, api-key-expired, bootstrap-disabled (the one-shot installation credential, once a key exists), token-malformed (a bearer token that is not a JWT), token-algorithm-unsupported, token-signature-invalid, token-claim-invalid, token-issuer-mismatch, token-audience-mismatch, token-expired, token-not-yet-valid, issuer-untrusted, issuer-residency-mismatch (the issuer belongs to another plane), issuer-resolution-unknown, jwks-unavailable, jwks-key-not-found, staff-token-inactive (a platform operator's token), staff-not-operator, staff-directory-unavailable, identity-not-provisioned (a verified identity with no account on this plane), organization-not-found (a verified identity or key whose organization this plane does not know), internal-error (a fault while the credential is checked is refused too, fail closed), context-cancelled

  • 402

    The organization has to pay first: its standing is payment_required.

    Leer más

    The request boundary applies this payment gate to every route except an organization's billing routes, the caller's own context, organization list, onboarding, session report and personal keys, the public routes, and the routes of platform operators, who administer an organization that has to pay. The operations the gate covers declare this response. On /v1 the refusal is rendered in the OpenAI error format. Code: payment-required

  • 403

    No role of the caller holds `usage.read` in the organization (policy-denied). Codes: policy-denied

  • 405

    The path is claimed but the request method is not allowed. Go ServeMux returns its standard plain-text response and lists permitted methods in Allow.

  • 500

    Platform failure. Codes: internal-error

Generado a partir de los contratos de la plataforma en el commit 5954fbc1.

Explora la plataforma

Obtén tu primera key API

El registro está abierto. Cuatro pasos hasta tu primera llamada: crea tu cuenta, crea tu organización, crea tu API key y empieza a usarla.

  1. 01Crea tu cuenta
  2. 02Crea tu organización
  3. 03Crea tu API key
  4. 04Empieza a usarla