API Overview
The Ctrlplane API provides programmatic access to all platform functionality, enabling you to:- Create and manage deployments and deployment versions
- Register and update resources
- Define policies and configure environments
- Trigger and monitor deployment jobs
- Integrate Ctrlplane into your CI/CD pipelines
API Structure
The Ctrlplane API follows REST principles and OpenAPI 3.0 standards:- RESTful Design: Resource-based endpoints with standard HTTP methods (GET, POST, PATCH, DELETE)
- JSON Format: All requests and responses use JSON
- API Key Authentication: Simple bearer token authentication via
x-api-keyheader - Consistent Responses: Standardized error handling and response structure
- Idempotent Operations: Safe retries for PUT/PATCH operations
Authentication
All API requests require authentication using an API key:Base URL
Common Workflows
Creating a Deployment Version
Typically called from your CI/CD pipeline after a successful build:Registering Resources
Resource providers sync infrastructure to Ctrlplane:SDK Support
For easier integration, use the official SDKs:- Node.js:
@ctrlplane/node-sdk - Python: Coming soon
- Go: Coming soon
Error Handling
The API uses standard HTTP status codes:200 OK: Successful request201 Created: Resource created successfully400 Bad Request: Invalid request parameters401 Unauthorized: Invalid or missing API key404 Not Found: Resource not found409 Conflict: Resource already exists (e.g., duplicate identifier)500 Internal Server Error: Server error