/api-key

Creates a new API key with the specified permissions.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Create API Key

Use this route to generate a new API key for programmatic access to the Dadosfera platform. The key is created with a specific set of permissions that control which operations can be performed using it.

Payload example

{
  "permissions": [1, 2, 5]
}

Fields

  • permissions (required): an array of permission IDs that the API key will be granted. Each ID corresponds to a specific platform permission.

Response

On success, the response includes the full API key value in the key field. Store it securely — this is the only time the plain-text key will be available. Subsequent calls to GET /api-key will only return a masked version (key_mask). If you lose the key, you will need to delete it and create a new one.

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "key": "ddf_ak_abc123...",
  "key_mask": "ddf_ak_abc...890",
  "permissions": [
    { "id": 1, "name": "catalog:read" },
    { "id": 2, "name": "catalog:write" },
    { "id": 5, "name": "pipelines:read" }
  ],
  "created_at": "2025-01-15T10:30:00.000Z",
  "created_by": "[email protected]"
}

Error scenarios

CodeErrorDescription
400Bad RequestInvalid payload — permissions must be a non-empty array of numbers
401UnauthenticatedInvalid or missing access-token header
403ForbiddenUser does not have permission to create API keys
500Internal Server ErrorUnknown server error
Body Params
permissions
array of numbers
required

Array of permission IDs

permissions*
Headers
string
enum
Allowed:
Response

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json