admin.trace.get
Rastro de uma requisição. Tudo o que uma requisição fez: chamadas de operação, atividade, logs de sistema e chamadas de IA com o mesmo id de requisição. around (hora da linha) limita a ±1 h; até 100 itens por tabela.
- Endpoint:
POST https://app.atomiks.com.br/api/v1/admin.trace.get(corpo JSON) - Quem pode chamar: super-admin da plataforma
- Escopo da chave:
admin:read - Grava dados: não
- Pela chave de API: sim
- Ferramenta MCP:
admin_trace_get - Ficha em JSON:
https://app.atomiks.com.br/api/v1/openapi.json(operationIdadmin.trace.get)
Entrada
| Campo | Tipo | Obrigatório | Nota |
|---|---|---|---|
requestId | string | sim | |
around | string (date-time) | não |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"requestId": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"around": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"requestId"
]
}Exemplo
curl -X POST https://app.atomiks.com.br/api/v1/admin.trace.get \
-H "Authorization: Bearer $ATOMIKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"requestId":"req-1"}'CLI:
node cli/atomiks.mjs admin.trace.get --json '{"requestId":"req-1"}'MCP: ferramenta admin_trace_get com a mesma entrada.
Saída
Sucesso: {"data": ...} com o formato abaixo.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"requests": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"ts": {
"type": "string"
},
"accountId": {
"type": [
"string",
"null"
]
},
"accountName": {
"type": [
"string",
"null"
]
},
"actorName": {
"type": "string"
},
"via": {
"type": "string",
"enum": [
"ui",
"api",
"mcp",
"atom",
"flow",
"system"
]
},
"op": {
"type": "string"
},
"opLabel": {
"type": "string"
},
"mutates": {
"type": "boolean"
},
"status": {
"type": "number"
},
"errorCode": {
"type": [
"string",
"null"
]
},
"errorMessage": {
"type": [
"string",
"null"
]
},
"durationMs": {
"type": "number"
},
"ip": {
"type": [
"string",
"null"
]
},
"requestId": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"ts",
"accountId",
"accountName",
"actorName",
"via",
"op",
"opLabel",
"mutates",
"status",
"errorCode",
"errorMessage",
"durationMs",
"ip",
"requestId"
],
"additionalProperties": false
}
},
"activity": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"createdAt": {
"type": "string"
},
"accountId": {
"type": [
"string",
"null"
]
},
"accountName": {
"type": [
"string",
"null"
]
},
"actor": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"user",
"api_key",
"system"
]
},
"id": {
"type": [
"string",
"null"
]
},
"name": {
"type": "string"
},
"email": {
"type": [
"string",
"null"
]
}
},
"required": [
"kind",
"id",
"name",
"email"
],
"additionalProperties": false
},
"via": {
"type": "string",
"enum": [
"ui",
"api",
"mcp",
"atom",
"flow",
"system"
]
},
"action": {
"type": "string"
},
"actionLabel": {
"type": "string"
},
"targetType": {
"type": "string"
},
"targetId": {
"type": "string"
},
"targetLabel": {
"type": "string"
},
"detail": {
"type": [
"string",
"null"
]
},
"input": {
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
{
"type": "null"
}
]
},
"ip": {
"type": [
"string",
"null"
]
},
"requestId": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"createdAt",
"accountId",
"accountName",
"actor",
"via",
"action",
"actionLabel",
"targetType",
"targetId",
"targetLabel",
"detail",
"input",
"ip",
"requestId"
],
"additionalProperties": false
}
},
"ai": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"ts": {
"type": "string"
},
"accountId": {
"type": [
"string",
"null"
]
},
"accountName": {
"type": [
"string",
"null"
]
},
"userName": {
"type": "string"
},
"feature": {
"type": "string"
},
"provider": {
"type": "string"
},
"model": {
"type": "string"
},
"inputTokens": {
"type": "number"
},
"outputTokens": {
"type": "number"
},
"cacheReadTokens": {
"type": "number"
},
"cacheWriteTokens": {
"type": "number"
},
"audioSeconds": {
"type": "number"
},
"costUsd": {
"type": "number"
},
"latencyMs": {
"type": [
"number",
"null"
]
},
"status": {
"type": "string"
},
"error": {
"type": [
"string",
"null"
]
},
"requestId": {
"type": [
"string",
"null"
]
},
"conversationId": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"ts",
"accountId",
"accountName",
"userName",
"feature",
"provider",
"model",
"inputTokens",
"outputTokens",
"cacheReadTokens",
"cacheWriteTokens",
"audioSeconds",
"costUsd",
"latencyMs",
"status",
"error",
"requestId",
"conversationId"
],
"additionalProperties": false
}
},
"logs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number"
},
"ts": {
"type": "string"
},
"level": {
"type": "string"
},
"module": {
"type": "string"
},
"message": {
"type": "string"
},
"context": {}
},
"required": [
"id",
"ts",
"level",
"module",
"message",
"context"
],
"additionalProperties": false
}
},
"truncated": {
"type": "boolean"
}
},
"required": [
"requests",
"activity",
"ai",
"logs",
"truncated"
],
"additionalProperties": false
}Erros
{"error": {"code", "message", "requestId"}}. Códigos: invalid_input (400), unauthorized (401), forbidden / account_pending / scope_missing (403), not_found (404), limit_reached (409), internal (500).