Authentication
All API requests require authentication using API keys. Each key is scoped to a specific organization and has configurable permissions.
API Key Headers
Include these headers with every request:
| Header | Description |
|---|---|
api-key | Your API key (starts with al_) |
api-secret | Your API secret |
Example
curl -X GET "https://orchestrator.assemblyline.sh/api/v1/stations" \
-H "api-key: al_xxxxxxxxxxxx" \
-H "api-secret: xxxxxxxxxxxxxxxx"
Creating API Keys
- Navigate to Settings → API Keys in your organization
- Click Create new API Key
- Enter a name for the key
- Select a permission preset or customize permissions
- Optionally set an expiry date
- Copy and securely store the secret (shown only once)
Permission Presets
| Preset | Description |
|---|---|
| Full Access | Read and write access to all resources |
| Read Only | Read-only access to all resources |
| Custom | Define your own permission matrix |
Permission Matrix
Permissions are defined as a matrix of resources and actions:
| Resource | read | create | edit | delete |
|---|---|---|---|---|
| stations | Yes/No | Yes/No | Yes/No | Yes/No |
| work_records | Yes/No | Yes/No | Yes/No | Yes/No |
| tags | Yes/No | Yes/No | Yes/No | Yes/No |
Error Responses
Missing Credentials
{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing API credentials"
}
}
Invalid Credentials
{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid API credentials"
}
}
Expired Key
{
"error": {
"code": "UNAUTHORIZED",
"message": "API key expired"
}
}
Insufficient Permissions
{
"error": {
"code": "FORBIDDEN",
"message": "API key lacks stations:create permission"
}
}
Security: Never expose your API secret in client-side code or public repositories. The secret is shown only once when creating the key.