DAAKYI Cloud
|

Developer Documentation

Build on DAAKYI Cloud

DocsAPI Reference (Authorized Access)API Authentication

API Authentication

Token-based authentication for the platform REST API.

Everything the Console does is available through the REST API at https://api.daakyicloud.com/v1. Authentication is a two-step token flow: exchange your long-lived API key for a short-lived bearer token, then send that token with every request.

1. Create an API Key

In the Console: Security → API Keys → Create Key. The key inherits the role permissions of its owning user — create dedicated automation users with minimal roles (see IAM). The secret is shown once; store it in a secrets manager.

2. Exchange for a Token

POST/v1/auth/tokens

Exchange an API key for a bearer token (valid 1 hour).

Request Body
{
  "api_key": "dk_live_9f2a..."
}
Response
{
  "token": "eyJhbGciOiJSUzI1NiIs...",
  "expires_in": 3600,
  "organization": "org-7c21",
  "role": "operator"
}

3. Call the API

bash
TOKEN=$(curl -s -X POST "https://api.daakyicloud.com/v1/auth/tokens" \
  -H "Content-Type: application/json" \
  -d '{"api_key": "'$DAAKYI_API_KEY'"}' | jq -r .token)

curl -s "https://api.daakyicloud.com/v1/vms" \
  -H "Authorization: Bearer $TOKEN"

Conventions

  • All requests and responses are JSON; timestamps are UTC ISO-8601
  • List endpoints paginate with ?page= and ?per_page= (max 100) and return a total count
  • Long-running operations (create VM, restore backup) return a task ID — poll GET /v1/tasks/{id} for completion
  • Errors return a machine-readable code and human-readable message: {"error": {"code": "quota_exceeded", "message": "..."}}

Rate Limits

ScopeLimit
Read requests300 per minute per token
Write requests60 per minute per token
Token issuance10 per minute per API key

Never embed API keys in client-side code or repositories. Keys can be revoked instantly under Security → API Keys if one leaks.

We use essential cookies to make this site work, and optional analytics cookies to improve it. See our Privacy Policy.