PT EN

Colectores

URL base: $BUSINESS_API

Listar colectores

Registos

GET /collectors

Returns a paginated list of the on-premises meter data collectors registered to the tenant, with their name, status, assignment revision and last-seen time. Collectors are created and credentialed on the platform API; this view is read-only. Requires the business:collectors:read permission.

Parâmetros

limitinteger · consulta · opcional

Maximum resources to return (default 20, maximum 100).

afterstring · consulta · opcional

Opaque cursor returned by the previous page.

Devolve

200 OK

Permissões business:collectors:read · Funções: admin, operations, owner

curl -X GET "$BUSINESS_API/collectors" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200

OK

Obter um colector

Registos

GET /collectors/{id}

Returns one collector registered to the tenant, with its status, assignment revision and last-seen time. Returns 404 when the collector does not belong to this tenant. Requires business:collectors:read.

Parâmetros

idstring · caminho · obrigatório

Id of the collector registered to the caller's tenant.

Devolve

200 OK

Permissões business:collectors:read · Funções: admin, operations, owner

curl -X GET "$BUSINESS_API/collectors/{id}" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200

OK

Obter o estado de um colector

Registos

GET /collectors/{id}/health

Reports the collector's operational state computed from instance heartbeats at request time: an instance is online if seen within 90 seconds, degraded within 5 minutes, and offline after that. The response counts online, degraded and offline instances, lists them, gives the overall state (online if any instance is online), and counts active sessions and meter assignments. Returns 404 for a collector outside the tenant. Requires business:collectors:read.

Parâmetros

idstring · caminho · obrigatório

Id of the collector whose health is computed.

Devolve

200 OK

Permissões business:collectors:read · Funções: admin, operations, owner

curl -X GET "$BUSINESS_API/collectors/{id}/health" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200

OK