The Pragmatiks API provides programmatic access to all platform features. Use it to manage resources, monitor operations, and deploy providers.
Base URL
https://api.pragmatiks.io
Authentication
All API endpoints except /health require authentication using Bearer tokens.
curl -H "Authorization: Bearer <token>" \
https://api.pragmatiks.io/resources/
Get a token by running pragma auth login or through the web dashboard. See Authentication for details.
- Use
Content-Type: application/json for JSON request bodies
- Use
multipart/form-data for file uploads (e.g., provider code)
- All timestamps use ISO 8601 format in UTC
Successful responses return JSON. List endpoints return arrays:
[
{"provider": "postgres", "resource": "database", "name": "my-db", ...}
]
Single-resource endpoints return objects:
{"provider": "postgres", "resource": "database", "name": "my-db", ...}
Filtering
List endpoints support filtering via query parameters:
| Endpoint | Parameters |
|---|
GET /resources/ | provider, resource, tags |
GET /ops/dead-letter | provider |
Examples
Filter resources by provider:
curl -H "Authorization: Bearer $TOKEN" \
"https://api.pragmatiks.io/resources/?provider=postgres"
Filter resources by multiple tags (all must match):
curl -H "Authorization: Bearer $TOKEN" \
"https://api.pragmatiks.io/resources/?tags=production&tags=critical"
Resource Identifiers
Resources are identified by a prefixed ID format: resource:{provider}_{resource}_{name}. When used in URLs, this must be URL-encoded:
| Component | Example |
|---|
| Format | resource:{provider}_{resource}_{name} |
| Unencoded | resource:postgres_database_my-db |
| URL-encoded | resource%3Apostgres_database_my-db |
The CLI and YAML files use a friendlier slash notation (provider/resource/name), which the API translates to the internal ID format.
Lifecycle States
Resources follow a 5-state lifecycle:
| State | Description |
|---|
draft | Initial state, can be modified freely |
pending | Committed for processing, no modifications allowed |
processing | Being handled by a provider |
ready | Successfully processed |
failed | Processing failed, error recorded |
Set lifecycle_state when applying a resource:
draft - Store without processing (default)
pending - Validate and queue for processing
Rate Limits
API requests are rate limited per organization. Contact support if you need higher limits.
OpenAPI Specification
The full API specification is available in OpenAPI 3.1 format. Use it to generate client libraries or explore endpoints.
Next Steps