Pular para o conteúdo principal
GET
CSharp (SDK)

Autorizações

Authorization
string
header
obrigatório

Send Authorization: Bearer , using an MKA1 API key for automation or an OAuth API access token for a signed-in application. Use a dynamic security callback to refresh OAuth access tokens. Browser session-only operations still require their declared cookie.

Cabeçalhos

X-On-Behalf-Of
string

Optional external end-user identifier forwarded by the API gateway.

Parâmetros de consulta

start_time
integer
obrigatório

Hora de início (segundos Unix), inclusiva

Intervalo obrigatório: -9007199254740991 <= x <= 9007199254740991
Exemplo:

1704067200

end_time
integer

Hora de término (segundos Unix), exclusivo

Intervalo obrigatório: -9007199254740991 <= x <= 9007199254740991
Exemplo:

1704153600

bucket_width
enum<string>
padrão:1d

Largura de cada intervalo de tempo (1m, 1h, 1d), alinhado ao UTC

Opções disponíveis:
1m,
1h,
1d
Exemplo:

"1d"

limit
integer

Número máximo de buckets por página, 1-1440. O padrão é 60 para buckets de 1m, 24 para 1h e 7 para 1d; valores acima de 168 para 1h ou 31 para 1d são limitados a esses máximos. Quando a janela contém mais buckets, has_more é true e next_page continua

Intervalo obrigatório: 1 <= x <= 1440
Exemplo:

30

page
string

Cursor da next_page de uma página anterior. Retoma no bucket após aquela página; mantém todos os outros parâmetros de consulta iguais. Um cursor emitido para outro start_time ou bucket_width, ou que retome fora de [start_time, end_time), é um 400

Exemplo:

"WzEsMTcwNDY3MjAwMCwiMWQiLDE3MDQwNjcyMDBd"

user_ids
string[]

Filtrar por IDs de usuários da plataforma (o mesmo grupo de dimensão group_by=user_id relatórios)

Exemplo:
external_user_ids
string[]

Filtrar por IDs de usuários finais delegados (externalUserId, ou seja, subs X-On-Behalf-Of)

Exemplo:
all_orgs
string

Uso agregado em todas as organizações (apenas administradores de cluster)

org_ids
string[]

Filtrar por IDs de organização (apenas administradores de cluster, implica escopo de cluster)

Exemplo:
group_by
enum<string>[]

Agrupar por campos especificados

Opções disponíveis:
user_id,
api_key_id,
org_id,
model
models
string[]

Filtrar por nomes de modelos

Resposta

200 - application/json

OK

object
any
obrigatório
data
object[]
obrigatório
has_more
boolean
obrigatório

True when the requested window holds more buckets than this page returned; fetch them with next_page

next_page
string | null
obrigatório

Cursor for the next page: pass it as page with the same query parameters to continue at the next bucket. Null on the last page

as_of
integer
obrigatório

Unix timestamp when these figures were computed. A cached report keeps the time it was computed, so this shows the report's age

Intervalo obrigatório: -9007199254740991 <= x <= 9007199254740991
settlement_window_seconds
integer
obrigatório

How long after it occurs usage stays provisional: 86400 (24 hours). Usage older than that is final and no longer changes

Intervalo obrigatório: -9007199254740991 <= x <= 9007199254740991
final_through
integer
obrigatório

Unix timestamp (as_of minus settlement_window_seconds) before which usage is final; usage at or after it is provisional

Intervalo obrigatório: -9007199254740991 <= x <= 9007199254740991
final
boolean
obrigatório

True when the whole requested window ends at or before final_through, so every figure in the report is final