Skip to main content

Introduction

The Kadu v1 API gives another system everything the Agent Console does: list and run tasks, follow executions (logs, events, pending items, files), configure environments, secrets, schedules and webhooks, sync the Playbook, and query usage and cost.

Addresses​

EnvironmentBase URL
Productionhttps://api.kadu.ia.br/v1
Staginghttps://api.staging.kadu.ia.br/v1
curl -H "Authorization: Bearer $KOBANA_TOKEN" \
https://api.kadu.ia.br/v1/me

Every route requires a Kobana Account access token in the Authorization: Bearer header. See Authentication.

What you can do​

ResourceEndpointsWhat for
Identity/v1/mecheck whose token it is
Organization/v1/organizationsread and change the token's organization
Structure/v1/workspaces, /v1/activities, /v1/tasksthe task tree
RunPOST /v1/tasks/{id}/run, GET /v1/tasks/{id}/readinessrun a task and check beforehand whether the environment is ready
Executions/v1/executions, /logs, /events, /todos, /cancel, /continue, /v1/executions/searchfollow, cancel, continue a conversational task and search
Pending itemsPATCH /v1/todos/{id}resolve a pending item
Files/v1/filesupload input files and download output files
Configuration/v1/environments, /v1/secrets, /v1/schedules, /v1/tasks/{id}/endpointenvironments, credentials, schedules and the run endpoint
Integrations/v1/webhooks, /v1/webhook_deliverieswebhooks, deliveries and resend
Repository/v1/repository, POST /v1/repository/syncstate and sync of the Playbook
Usage/v1/usagetokens, cost and price per period
People/v1/users, /v1/memberships, /v1/rolesmembers, memberships and roles
Memory/v1/memoriesrecords the organization keeps per entity
Events/v1/system_eventsorganization events

The full reference for each endpoint is in Resources, generated from the OpenAPI specification (Specification).

The contract on one screen​

  • JSON in snake_case in both directions.
  • Success: { "data": … } or { "data": […], "meta": { "next_cursor", "limit" } }.
  • Error: { "error": { "code", "message", "details" } }, with code in UPPER_SNAKE_CASE.
  • Cursor-based listings (Pagination).
  • X-Idempotency-Key on every POST, PUT and PATCH (Idempotency).
  • 600 requests per minute per token (Limits).

Details in Conventions.

From the terminal​

The kobana CLI calls every one of these endpoints from the command line (kobana kadu tasks run, kobana kadu executions logs), with the same token.

Running without the API​

For a system to run one specific task without a Kobana Account token, use the run endpoint: one URL per task, with its own credential.