Interactive docs available with JavaScript enabled. Below is the full OpenAPI spec.
openapi: 3.0.4 info: title: Sliplane API description: | The Sliplane API allows you to manage your services programmatically. ## Authentication All requests require authentication using a Bearer token, which can be obtained from the Sliplane Dashboard in your team settings. Additionally, you have to provide the `X-Organization-ID` header with the ID of the organization you want to access. You can create a `read-only` or `read-write` token. `read-only` tokens can only make `GET` requests, all other requests fail with a `403 Forbidden` error. A token is specific to an organization and has access to all resources within that organization. ## API Versioning The API is versioned using a version prefix in the URL path (e.g., `/v0/`). The current version is `v0`. Within a version, non-breaking changes (such as adding optional fields) may be introduced, but breaking changes will not be made. ## Rate Limiting The API is subject to rate limits to ensure fair usage and system stability. The following limits apply: | Endpoint Type | Rate Limit | Response Code | |--------------|------------|---------------| | Server Creation | 50 requests per hour | 429 Too Many Requests | | Server Rescaling | 10 requests per hour | 429 Too Many Requests | | Service Creation | 10 requests per minute | 429 Too Many Requests | | Service Deploy | 10 requests per minute | 429 Too Many Requests | | All other endpoints | 400 requests per minute | 429 Too Many Requests | If you require higher rate limits, please contact [support@sliplane.io](mailto:support@sliplane.io). ## LLMs If you want to vibecode your Sliplane integration, you can use our [llms.txt file](https://ctrl.sliplane.io/llms.txt). version: 0.2.3 contact: name: Sliplane Support email: support@sliplane.io servers: - url: https://ctrl.sliplane.io/v0 description: Production API server security: - bearerAuth: [] organizationId: [] tags: - name: Projects description: Operations related to project management. Projects are used to logically group services. There is no limit to the number of projects you can create. - name: Servers description: Operations related to server management. Servers are the compute resources that run your services. - name: Services description: Operations related to service management. Services are applications running on servers within a project. - name: Registry Credentials description: Operations related to container registry credentials management. These credentials are used to authenticate with container registries when deploying services. paths: "/projects": post: tags: - Projects summary: Create a new project description: Creates a new project with the specified name operationId: createProject requestBody: required: true content: application/json: schema: type: object required: - name properties: name: type: string minLength: 1 example: "My Project" description: The name of the project responses: "201": description: Project created successfully content: application/json: schema: "$ref": "#/components/schemas/Project" "400": description: Bad Request - Invalid request body content: application/json: schema: type: object properties: code: type: string enum: [invalid_request] example: "invalid_request" message: type: string example: "The request body is invalid" "401": description: Unauthorized - Invalid or missing authentication token content: application/json: schema: type: object properties: code: type: string enum: [invalid_token, missing_token] example: "missing_token" message: type: string example: "No authentication token provided" "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: type: object properties: code: type: string enum: [read_only_token, api_access_disabled] example: "read_only_token" message: type: string example: "This token does not have write permissions" get: tags: - Projects summary: List projects description: Returns a list of all projects in the organization operationId: listProjects responses: "200": description: List of projects content: application/json: schema: type: array items: $ref: "#/components/schemas/Project" "401": description: Unauthorized - Invalid or missing authentication token content: application/json: schema: type: object properties: code: type: string enum: [invalid_token, missing_token] example: "missing_token" message: type: string example: "No authentication token provided" "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: type: object properties: code: type: string enum: [read_only_token, api_access_disabled] example: "read_only_token" message: type: string example: "This token does not have write permissions" "/projects/{projectId}": patch: tags: - Projects summary: Update a project description: Updates the name of an existing project operationId: updateProject parameters: - name: projectId in: path required: true schema: type: string description: The ID of the project to update requestBody: required: true content: application/json: schema: type: object required: - name properties: name: type: string minLength: 1 description: The new name of the project responses: "200": description: Project updated successfully content: application/json: schema: "$ref": "#/components/schemas/Project" "400": description: Bad Request - Invalid request body content: application/json: schema: type: object properties: code: type: string enum: [invalid_request] example: "invalid_request" message: type: string example: "The request body is invalid" "401": description: Unauthorized - Invalid or missing authentication token content: application/json: schema: type: object properties: code: type: string enum: [invalid_token, missing_token] example: "missing_token" message: type: string example: "No authentication token provided" "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: type: object properties: code: type: string enum: [read_only_token, api_access_disabled] example: "read_only_token" message: type: string example: "This token does not have write permissions" "404": description: Project not found delete: tags: - Projects summary: Delete a project description: Deletes an existing project. The project must not contain any services. operationId: deleteProject parameters: - name: projectId in: path required: true schema: type: string description: The ID of the project to delete responses: "204": description: Project deleted successfully "401": description: Unauthorized - Invalid or missing authentication token content: application/json: schema: type: object properties: code: type: string enum: [invalid_token, missing_token] example: "missing_token" message: type: string example: "No authentication token provided" "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: type: object properties: code: type: string enum: [read_only_token, api_access_disabled] example: "read_only_token" message: type: string example: "This token does not have write permissions" "404": description: Project not found content: application/json: schema: type: object properties: code: type: string enum: [project_not_found] example: "project_not_found" message: type: string example: "Project not found" "409": description: Project contains services content: application/json: schema: type: object properties: code: type: string enum: [project_not_empty] example: "project_not_empty" message: type: string example: "Cannot delete project that contains services" "/projects/{projectId}/services": post: tags: - Services summary: Create a new service description: Creates a new service within a project operationId: createService parameters: - name: projectId in: path required: true schema: type: string description: The ID of the project to create the service in requestBody: required: true content: application/json: schema: type: object required: - name - serverId - deployment - network properties: name: type: string minLength: 1 example: "My Service" description: The name of the service serverId: type: string example: "server_123456" description: The ID of the server to run the service on volumes: type: array description: Volumes to mount to the service items: $ref: "#/components/schemas/Volume" deployment: type: object description: The deployment configuration for the service oneOf: - Repository Deployment: $ref: "#/components/schemas/RepositoryDeployment" - Image Deployment: $ref: "#/components/schemas/ImageDeployment" env: type: array description: Environment variables for the service items: $ref: "#/components/schemas/EnvironmentVariable" healthcheck: type: string default: "/" example: "/health" description: The path to use for health checks cmd: type: string example: "npm start" description: Override the Docker CMD instruction network: $ref: "#/components/schemas/ServiceNetworkRequest" responses: "201": description: Service created successfully content: application/json: schema: "$ref": "#/components/schemas/Service" "400": description: Bad Request - Invalid request body content: application/json: schema: type: object properties: code: type: string enum: [invalid_request] example: "invalid_request" message: type: string example: "The request body is invalid" "401": description: Unauthorized - Invalid or missing authentication token content: application/json: schema: type: object properties: code: type: string enum: [invalid_token, missing_token] example: "missing_token" message: type: string example: "No authentication token provided" "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: type: object properties: code: type: string enum: [read_only_token, api_access_disabled] example: "read_only_token" message: type: string example: "This token does not have write permissions" "404": description: Project or server not found content: application/json: schema: type: object properties: code: type: string enum: [project_not_found, server_not_found] example: "project_not_found" message: type: string example: "Project or server not found" get: tags: - Services summary: List services description: Returns a list of all services in the project operationId: listServices parameters: - name: projectId in: path required: true schema: type: string description: The ID of the project to list services from responses: "200": description: List of services content: application/json: schema: type: array items: $ref: "#/components/schemas/Service" "401": description: Unauthorized - Invalid or missing authentication token content: application/json: schema: type: object properties: code: type: string enum: [invalid_token, missing_token] example: "missing_token" message: type: string example: "No authentication token provided" "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: type: object properties: code: type: string enum: [read_only_token, api_access_disabled] example: "read_only_token" message: type: string example: "This token does not have write permissions" "404": description: Project not found content: application/json: schema: type: object properties: code: type: string enum: [project_not_found] example: "project_not_found" message: type: string example: "Project not found" "/projects/{projectId}/services/{serviceId}": get: tags: - Services summary: Get service details description: Returns the details of a specific service operationId: getService parameters: - name: projectId in: path required: true schema: type: string description: The ID of the project containing the service - name: serviceId in: path required: true schema: type: string description: The ID of the service to retrieve responses: "200": description: Service details content: application/json: schema: "$ref": "#/components/schemas/Service" "401": description: Unauthorized - Invalid or missing authentication token content: application/json: schema: type: object properties: code: type: string enum: [invalid_token, missing_token] example: "missing_token" message: type: string example: "No authentication token provided" "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: type: object properties: code: type: string enum: [read_only_token, api_access_disabled] example: "read_only_token" message: type: string example: "This token does not have write permissions" "404": description: Project or service not found content: application/json: schema: type: object properties: code: type: string enum: [project_not_found, service_not_found] example: "project_not_found" message: type: string example: "Project or service not found" patch: tags: - Services summary: Update a service description: | Updates an existing service. The deployment type (image or repository) cannot be changed. Network settings cannot be changed. Volumes cannot be modified through this endpoint. When updating environment variables, providing the `env` key means full replacement. If you want to add a new environment variable, you must include all previous environment variables in the array. If a variable is secret, you can keep the value empty. Otherwise it will be overwritten. operationId: updateService parameters: - name: projectId in: path required: true schema: type: string description: The ID of the project containing the service - name: serviceId in: path required: true schema: type: string description: The ID of the service to update requestBody: required: true content: application/json: schema: type: object properties: name: type: string minLength: 1 description: The new name of the service deployment: type: object description: The deployment configuration for the service. Must match the current deployment type (image or repository) oneOf: - Repository Deployment: $ref: "#/components/schemas/RepositoryDeployment" - Image Deployment: $ref: "#/components/schemas/ImageDeployment" env: type: array description: Environment variables for the service. Providing this key will replace all existing environment variables items: $ref: "#/components/schemas/EnvironmentVariable" healthcheck: type: string example: "/health" description: The path to use for health checks cmd: type: string example: "npm start" description: Override the Docker CMD instruction responses: "200": description: Service updated successfully content: application/json: schema: "$ref": "#/components/schemas/Service" "400": description: Bad Request - Invalid request body content: application/json: schema: type: object properties: code: type: string enum: [invalid_request] example: "invalid_request" message: type: string example: "The request body is invalid" "401": description: Unauthorized - Invalid or missing authentication token content: application/json: schema: type: object properties: code: type: string enum: [invalid_token, missing_token] example: "missing_token" message: type: string example: "No authentication token provided" "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: type: object properties: code: type: string enum: [read_only_token, api_access_disabled] example: "read_only_token" message: type: string example: "This token does not have write permissions" "404": description: Project or service not found content: application/json: schema: type: object properties: code: type: string enum: [project_not_found, service_not_found] example: "project_not_found" message: type: string example: "Project or service not found" "409": description: Invalid deployment type change content: application/json: schema: type: object properties: code: type: string enum: [invalid_deployment] example: "invalid_deployment" message: type: string example: "Cannot change deployment type" delete: tags: - Services summary: Delete a service description: Deletes an existing service operationId: deleteService parameters: - name: projectId in: path required: true schema: type: string description: The ID of the project containing the service - name: serviceId in: path required: true schema: type: string description: The ID of the service to delete responses: "204": description: Service deleted successfully "401": description: Unauthorized - Invalid or missing authentication token content: application/json: schema: type: object properties: code: type: string enum: [invalid_token, missing_token] example: "missing_token" message: type: string example: "No authentication token provided" "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: type: object properties: code: type: string enum: [read_only_token, api_access_disabled] example: "read_only_token" message: type: string example: "This token does not have write permissions" "404": description: Project or service not found content: application/json: schema: type: object properties: code: type: string enum: [project_not_found, service_not_found] example: "project_not_found" message: type: string example: "Project or service not found" "/projects/{projectId}/services/{serviceId}/pause": post: tags: - Services summary: Pause a service description: Pause a service operationId: pauseService parameters: - name: projectId in: path required: true schema: type: string description: The ID of the project containing the service - name: serviceId in: path required: true schema: type: string description: The ID of the service to pause responses: "202": description: Service pause request accepted "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: type: object properties: code: type: string enum: [read_only_token, api_access_disabled] example: "read_only_token" message: type: string example: "This token does not have write permissions" "404": description: Project or service not found content: application/json: schema: type: object properties: code: type: string enum: [project_not_found, service_not_found] example: "project_not_found" message: type: string example: "Project or service not found" "409": description: Conflict - Invalid state transition content: application/json: schema: type: object properties: code: type: string enum: [service_invalid_state] example: "service_invalid_state" message: type: string example: "Service is not in a state that allows this operation" "/projects/{projectId}/services/{serviceId}/unpause": post: tags: - Services summary: Unpause a service description: Unpause a service operationId: unpauseService parameters: - name: projectId in: path required: true schema: type: string description: The ID of the project containing the service - name: serviceId in: path required: true schema: type: string description: The ID of the service to unpause responses: "202": description: Service unpause request accepted "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: type: object properties: code: type: string enum: [read_only_token, api_access_disabled] example: "read_only_token" message: type: string example: "This token does not have write permissions" "404": description: Project or service not found content: application/json: schema: type: object properties: code: type: string enum: [project_not_found, service_not_found] example: "project_not_found" message: type: string example: "Project or service not found" "409": description: Conflict - Invalid state transition content: application/json: schema: type: object properties: code: type: string enum: [service_invalid_state] example: "service_invalid_state" message: type: string example: "Service is not in a state that allows this operation" "/projects/{projectId}/services/{serviceId}/deploy": post: tags: - Services summary: Create a deployment description: | Manually triggers a deployment of a service. For image-based services, you can specify a new tag to deploy. operationId: deployService parameters: - name: projectId in: path required: true schema: type: string description: The ID of the project containing the service - name: serviceId in: path required: true schema: type: string description: The ID of the service to deploy requestBody: required: false content: application/json: schema: type: object properties: tag: type: string example: "latest" description: The new tag to deploy for image-based services responses: "202": description: Deployment request accepted "400": description: Bad Request - Invalid request content: application/json: schema: type: object properties: code: type: string enum: [invalid_request] example: "invalid_request" message: type: string example: "The request is invalid" "401": description: Unauthorized - Invalid or missing authentication token content: application/json: schema: type: object properties: code: type: string enum: [invalid_token, missing_token] example: "missing_token" message: type: string example: "No authentication token provided" "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: type: object properties: code: type: string enum: [read_only_token, api_access_disabled] example: "read_only_token" message: type: string example: "This token does not have write permissions" "404": description: Project or service not found content: application/json: schema: type: object properties: code: type: string enum: [project_not_found, service_not_found] example: "project_not_found" message: type: string example: "Project or service not found" "409": description: Service is not in a state that allows deployment content: application/json: schema: type: object properties: code: type: string enum: [service_invalid_state] example: "service_invalid_state" message: type: string example: "Service is not in a state that allows deployment" "/projects/{projectId}/services/{serviceId}/domains": post: tags: - Services summary: Add a custom domain description: Adds a custom domain to a service. The domain will be verified by checking for either a CNAME record pointing to the service's managed domain or an A record pointing to the server's IP address. Once verified, the domain will be added to the service. The verification process can take up to 24 hours, after which the domain will be marked as failed if not verified. operationId: addCustomDomain parameters: - name: projectId in: path required: true schema: type: string description: The ID of the project containing the service - name: serviceId in: path required: true schema: type: string description: The ID of the service to add the domain to requestBody: required: true content: application/json: schema: type: object required: - domain properties: domain: type: string example: "example.com" description: The custom domain to add responses: "201": description: Custom domain added successfully content: application/json: schema: $ref: "#/components/schemas/CustomDomain" "400": description: Bad Request - Invalid request body content: application/json: schema: $ref: "#/components/schemas/Error" "401": description: Unauthorized - Invalid or missing authentication token content: application/json: schema: $ref: "#/components/schemas/Error" "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: Project or service not found content: application/json: schema: $ref: "#/components/schemas/Error" "409": description: Custom domain already exists content: application/json: schema: type: object properties: code: type: string enum: [domain_already_exists] example: "domain_already_exists" message: type: string example: "Domain is already attached to a service" "/projects/{projectId}/services/{serviceId}/logs": get: tags: - Services summary: Get service logs description: Returns logs for a service with optional time range filtering. Only returns message and creation timestamp. operationId: getServiceLogs parameters: - name: projectId in: path required: true schema: type: string description: The ID of the project containing the service - name: serviceId in: path required: true schema: type: string description: The ID of the service to get logs for - name: from in: query required: false schema: type: integer format: int64 description: From timestamp (Unix seconds) - name: to in: query required: false schema: type: integer format: int64 description: To timestamp (Unix seconds) responses: "200": description: List of service logs content: application/json: schema: type: array items: $ref: "#/components/schemas/ServiceLog" "400": description: Bad Request - Invalid query parameters content: application/json: schema: $ref: "#/components/schemas/Error" "401": description: Unauthorized - Invalid or missing authentication token content: application/json: schema: $ref: "#/components/schemas/Error" "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: Project or service not found content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal server error content: application/json: schema: $ref: "#/components/schemas/Error" "/projects/{projectId}/services/{serviceId}/metrics": get: tags: - Services summary: Get service metrics description: Returns metrics for a service with optional time range filtering. Provides CPU and memory usage data for monitoring service performance. Use either 'range' parameter OR 'from'+'to' parameters, but not both. operationId: getServiceMetrics x-codeSamples: - lang: curl label: Using predefined range source: | curl 'https://ctrl.sliplane.io/v0/projects/{projectId}/services/{serviceId}/metrics?range=1h' parameters: - name: projectId in: path required: true schema: type: string description: The ID of the project containing the service - name: serviceId in: path required: true schema: type: string description: The ID of the service to get metrics for - name: range in: query required: false schema: type: string enum: ["10min", "1h", "24h", "7d"] description: Predefined time range for metrics. Do not use with from/to parameters. - name: from in: query required: false schema: type: integer format: int64 description: From timestamp (Unix seconds). Use only with 'to' parameter, not with 'range'. - name: to in: query required: false schema: type: integer format: int64 description: To timestamp (Unix seconds). Use only with 'from' parameter, not with 'range'. responses: "200": description: Service metrics data content: application/json: schema: type: array items: $ref: "#/components/schemas/ServiceMetric" "400": description: Bad Request - Invalid query parameters content: application/json: schema: $ref: "#/components/schemas/Error" "401": description: Unauthorized - Invalid or missing authentication token content: application/json: schema: $ref: "#/components/schemas/Error" "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: Project or service not found content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal server error content: application/json: schema: $ref: "#/components/schemas/Error" "/projects/{projectId}/services/{serviceId}/events": get: tags: - Services summary: Get service events description: | Returns events for a service showing deployment history, build status, and system events. Events are returned in reverse chronological order (newest first). operationId: getServiceEvents parameters: - name: projectId in: path required: true schema: type: string description: The ID of the project containing the service - name: serviceId in: path required: true schema: type: string description: The ID of the service to get events for responses: "200": description: Service events retrieved successfully content: application/json: schema: type: array items: $ref: "#/components/schemas/ServiceEvent" "401": description: Unauthorized - Invalid or missing authentication token content: application/json: schema: $ref: "#/components/schemas/Error" "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: Service or project not found content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal server error content: application/json: schema: $ref: "#/components/schemas/Error" security: - bearerAuth: [] organizationId: [] "/projects/{projectId}/services/{serviceId}/domains/{domainId}": delete: tags: - Services summary: Remove a custom domain description: Removes a custom domain from a service operationId: removeCustomDomain parameters: - name: projectId in: path required: true schema: type: string description: The ID of the project containing the service - name: serviceId in: path required: true schema: type: string description: The ID of the service to remove the domain from - name: domainId in: path required: true schema: type: string description: The ID of the custom domain to remove responses: "204": description: Custom domain removed successfully "401": description: Unauthorized - Invalid or missing authentication token content: application/json: schema: $ref: "#/components/schemas/Error" "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: Project, service, or domain not found content: application/json: schema: $ref: "#/components/schemas/Error" "/servers": post: tags: - Servers summary: Create a new server description: Creates a new server with the specified configuration operationId: createServer requestBody: required: true content: application/json: schema: type: object required: - name - instanceType - location properties: name: type: string minLength: 1 example: "Production Server" description: The name of the server instanceType: $ref: "#/components/schemas/InstanceType" location: $ref: "#/components/schemas/Location" responses: "201": description: Server created successfully content: application/json: schema: "$ref": "#/components/schemas/Server" "400": description: Bad Request - Invalid request body content: application/json: schema: type: object properties: code: type: string enum: [invalid_request] example: "invalid_request" message: type: string example: "The request body is invalid" "401": description: Unauthorized - Invalid or missing authentication token content: application/json: schema: type: object properties: code: type: string enum: [invalid_token, missing_token] example: "missing_token" message: type: string example: "No authentication token provided" "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: type: object properties: code: type: string enum: [read_only_token, api_access_disabled] example: "read_only_token" message: type: string example: "This token does not have write permissions" "503": description: Service Unavailable - Insufficient capacity in the requested location content: application/json: schema: type: object properties: code: type: string enum: [insufficient_capacity] example: "insufficient_capacity" message: type: string example: "Insufficient capacity in the requested location" get: tags: - Servers summary: List servers description: Returns a list of all servers in the organization operationId: listServers responses: "200": description: List of servers content: application/json: schema: type: array items: $ref: "#/components/schemas/Server" "401": description: Unauthorized - Invalid or missing authentication token content: application/json: schema: type: object properties: code: type: string enum: [invalid_token, missing_token] example: "missing_token" message: type: string example: "No authentication token provided" "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: type: object properties: code: type: string enum: [read_only_token, api_access_disabled] example: "read_only_token" message: type: string example: "This token does not have write permissions" "/servers/{serverId}": get: tags: - Servers summary: Get server details description: Returns the details of a specific server operationId: getServer parameters: - name: serverId in: path required: true schema: type: string description: The ID of the server to retrieve responses: "200": description: Server details content: application/json: schema: "$ref": "#/components/schemas/Server" "401": description: Unauthorized - Invalid or missing authentication token content: application/json: schema: type: object properties: code: type: string enum: [invalid_token, missing_token] example: "missing_token" message: type: string example: "No authentication token provided" "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: type: object properties: code: type: string enum: [read_only_token, api_access_disabled] example: "read_only_token" message: type: string example: "This token does not have write permissions" "404": description: Server not found content: application/json: schema: type: object properties: code: type: string enum: [server_not_found] example: "server_not_found" message: type: string example: "Server not found" delete: tags: - Servers summary: Delete a server description: Deletes an existing server operationId: deleteServer parameters: - name: serverId in: path required: true schema: type: string description: The ID of the server to delete responses: "204": description: Server deleted successfully "401": description: Unauthorized - Invalid or missing authentication token content: application/json: schema: type: object properties: code: type: string enum: [invalid_token, missing_token] example: "missing_token" message: type: string example: "No authentication token provided" "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: type: object properties: code: type: string enum: [read_only_token, api_access_disabled] example: "read_only_token" message: type: string example: "This token does not have write permissions" "404": description: Server not found content: application/json: schema: type: object properties: code: type: string enum: [server_not_found] example: "server_not_found" message: type: string example: "Server not found" post: tags: - Servers summary: Rescale a server description: Changes the instance type of an existing server. You can only scale up, not down. Scaling will make your services unavailable for a few minutes. operationId: rescaleServer parameters: - name: serverId in: path required: true schema: type: string description: The ID of the server to rescale requestBody: required: true content: application/json: schema: type: object required: - instanceType properties: instanceType: $ref: "#/components/schemas/InstanceType" responses: "202": description: Rescale request accepted "400": description: Bad Request - Invalid request body content: application/json: schema: type: object properties: code: type: string enum: [invalid_request] example: "invalid_request" message: type: string example: "The request body is invalid" "401": description: Unauthorized - Invalid or missing authentication token content: application/json: schema: type: object properties: code: type: string enum: [invalid_token, missing_token] example: "missing_token" message: type: string example: "No authentication token provided" "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: type: object properties: code: type: string enum: [read_only_token, api_access_disabled] example: "read_only_token" message: type: string example: "This token does not have write permissions" "404": description: Server not found content: application/json: schema: type: object properties: code: type: string enum: [server_not_found] example: "server_not_found" message: type: string example: "Server not found" "409": description: Server is not in a state that allows rescaling content: application/json: schema: type: object properties: code: type: string enum: [server_invalid_state] example: "server_invalid_state" message: type: string example: "Server is not in a state that allows rescaling" "503": description: Service Unavailable - Insufficient capacity for the requested instance type content: application/json: schema: type: object properties: code: type: string enum: [insufficient_capacity] example: "insufficient_capacity" message: type: string example: "Insufficient capacity for the requested instance type" "/servers/{serverId}/metrics": get: tags: - Servers summary: Get server metrics description: Returns metrics for a server with optional time range filtering. Provides CPU and memory usage data for monitoring server performance. Use either 'range' parameter OR 'from'+'to' parameters, but not both. operationId: getServerMetrics x-codeSamples: - lang: curl label: Using predefined range source: | curl 'https://ctrl.sliplane.io/v0/servers/{serverId}/metrics?range=1h' parameters: - name: serverId in: path required: true schema: type: string description: The ID of the server to get metrics for - name: range in: query required: false schema: type: string enum: ["10min", "1h", "24h", "7d"] description: Predefined time range for metrics. Do not use with from/to parameters. - name: from in: query required: false schema: type: integer format: int64 description: From timestamp (Unix seconds). Use only with 'to' parameter, not with 'range'. - name: to in: query required: false schema: type: integer format: int64 description: To timestamp (Unix seconds). Use only with 'from' parameter, not with 'range'. responses: "200": description: Server metrics data content: application/json: schema: type: array items: $ref: "#/components/schemas/ServerMetric" "400": description: Bad Request - Invalid query parameters content: application/json: schema: $ref: "#/components/schemas/Error" "401": description: Unauthorized - Invalid or missing authentication token content: application/json: schema: $ref: "#/components/schemas/Error" "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: Server not found content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal server error content: application/json: schema: $ref: "#/components/schemas/Error" "/servers/{serverId}/volumes": get: tags: - Servers summary: List server volumes description: Returns a list of all volumes available on the server operationId: listServerVolumes parameters: - name: serverId in: path required: true schema: type: string description: The ID of the server to list volumes for responses: "200": description: List of server volumes content: application/json: schema: type: array items: $ref: "#/components/schemas/ServerVolumeResponse" "401": description: Unauthorized - Invalid or missing authentication token content: application/json: schema: $ref: "#/components/schemas/Error" "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: Server not found content: application/json: schema: $ref: "#/components/schemas/Error" "/registry-credentials": post: tags: - Registry Credentials summary: Create registry credentials description: Creates new credentials for a container registry operationId: createRegistryCredentials requestBody: required: true content: application/json: schema: type: object required: - name - type - username - token properties: name: type: string minLength: 1 example: "Docker Hub Credentials" description: A name to identify these credentials type: type: string enum: - ghcr - dockerhub example: "dockerhub" description: The type of registry these credentials are for username: type: string example: "myusername" description: The username for the registry token: type: string example: "mytoken" description: The authentication token for the registry responses: "201": description: Registry credentials created successfully content: application/json: schema: "$ref": "#/components/schemas/RegistryCredentials" "400": description: Bad Request - Invalid request body content: application/json: schema: type: object properties: code: type: string enum: [invalid_request] example: "invalid_request" message: type: string example: "The request body is invalid" "401": description: Unauthorized - Invalid or missing authentication token content: application/json: schema: type: object properties: code: type: string enum: [invalid_token, missing_token] example: "missing_token" message: type: string example: "No authentication token provided" "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: type: object properties: code: type: string enum: [read_only_token, api_access_disabled] example: "read_only_token" message: type: string example: "This token does not have write permissions" get: tags: - Registry Credentials summary: List registry credentials description: Returns a list of all registry credentials in the organization operationId: listRegistryCredentials responses: "200": description: List of registry credentials content: application/json: schema: type: array items: $ref: "#/components/schemas/RegistryCredentials" "401": description: Unauthorized - Invalid or missing authentication token content: application/json: schema: type: object properties: code: type: string enum: [invalid_token, missing_token] example: "missing_token" message: type: string example: "No authentication token provided" "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: type: object properties: code: type: string enum: [read_only_token, api_access_disabled] example: "read_only_token" message: type: string example: "This token does not have write permissions" "/registry-credentials/{credentialId}": get: tags: - Registry Credentials summary: Get registry credentials description: Returns the details of specific registry credentials operationId: getRegistryCredentials parameters: - name: credentialId in: path required: true schema: type: string description: The ID of the registry credentials to retrieve responses: "200": description: Registry credentials details content: application/json: schema: "$ref": "#/components/schemas/RegistryCredentials" "401": description: Unauthorized - Invalid or missing authentication token content: application/json: schema: type: object properties: code: type: string enum: [invalid_token, missing_token] example: "missing_token" message: type: string example: "No authentication token provided" "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: type: object properties: code: type: string enum: [read_only_token, api_access_disabled] example: "read_only_token" message: type: string example: "This token does not have write permissions" "404": description: Registry credentials not found content: application/json: schema: type: object properties: code: type: string enum: [credential_not_found] example: "credential_not_found" message: type: string example: "Registry credentials not found" patch: tags: - Registry Credentials summary: Update registry credentials description: Updates the name of existing registry credentials. Only the name can be updated after creation. operationId: updateRegistryCredentials parameters: - name: credentialId in: path required: true schema: type: string description: The ID of the registry credentials to update requestBody: required: true content: application/json: schema: type: object required: - name properties: name: type: string minLength: 1 example: "Docker Hub Credentials" description: A name to identify these credentials responses: "200": description: Registry credentials updated successfully content: application/json: schema: "$ref": "#/components/schemas/RegistryCredentials" "400": description: Bad Request - Invalid request body content: application/json: schema: type: object properties: code: type: string enum: [invalid_request] example: "invalid_request" message: type: string example: "The request body is invalid" "401": description: Unauthorized - Invalid or missing authentication token content: application/json: schema: type: object properties: code: type: string enum: [invalid_token, missing_token] example: "missing_token" message: type: string example: "No authentication token provided" "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: type: object properties: code: type: string enum: [read_only_token, api_access_disabled] example: "read_only_token" message: type: string example: "This token does not have write permissions" "404": description: Registry credentials not found content: application/json: schema: type: object properties: code: type: string enum: [credential_not_found] example: "credential_not_found" message: type: string example: "Registry credentials not found" delete: tags: - Registry Credentials summary: Delete registry credentials description: Deletes existing registry credentials operationId: deleteRegistryCredentials parameters: - name: credentialId in: path required: true schema: type: string description: The ID of the registry credentials to delete responses: "204": description: Registry credentials deleted successfully "401": description: Unauthorized - Invalid or missing authentication token content: application/json: schema: type: object properties: code: type: string enum: [invalid_token, missing_token] example: "missing_token" message: type: string example: "No authentication token provided" "403": description: Forbidden - API access not enabled for organization or read-only key content: application/json: schema: type: object properties: code: type: string enum: [read_only_token, api_access_disabled] example: "read_only_token" message: type: string example: "This token does not have write permissions" "404": description: Registry credentials not found content: application/json: schema: type: object properties: code: type: string enum: [credential_not_found] example: "credential_not_found" message: type: string example: "Registry credentials not found" components: securitySchemes: bearerAuth: type: http scheme: bearer description: Bearer token obtained from the Sliplane dashboard organizationId: type: apiKey in: header name: X-Organization-ID description: The ID of the organization to access default: org_123 schemas: Project: type: object required: - id - name properties: id: type: string example: "project_123456" description: The unique identifier of the project name: type: string minLength: 1 example: "My Project" description: The name of the project Server: type: object required: - id - name - instanceType - location - status - createdAt properties: id: type: string example: "server_123456" description: The unique identifier of the server name: type: string minLength: 1 example: "Production Server" description: The name of the server instanceType: $ref: "#/components/schemas/InstanceType" location: $ref: "#/components/schemas/Location" status: $ref: "#/components/schemas/ServerStatus" ipv4: type: string format: ipv4 example: "192.168.1.1" description: The IPv4 address of the server ipv6: type: string format: ipv6 example: "2001:0db8:85a3:0000:0000:8a2e:0370:7334" description: The IPv6 address of the server createdAt: type: string format: date-time example: "2024-03-20T12:00:00Z" description: The timestamp when the server was created InstanceType: type: string enum: - base - medium - large - x-large - xx-large - dedicated-base - dedicated-medium - dedicated-large - dedicated-x-large - dedicated-xx-large - dedicated-xxx-large description: | The size of the server instance. | Instance Type | Type | vCPU | RAM | Disk | Egress | Price (per month, excl. VAT) | |--------------|------|------|-----|------|--------|------------------| | Base | Shared | 2 | 2 GB | 40 GB | 2 TB | €9.00 | | Medium | Shared | 3 | 4 GB | 80 GB | 2 TB | €24.00 | | Large | Shared | 4 | 8 GB | 160 GB | 2 TB | €44.00 | | X-Large | Shared | 8 | 16 GB | 240 GB | 2 TB | €76.00 | | XX-Large | Shared | 16 | 32 GB | 360 GB | 2 TB | €224.00 | | Dedicated Base | Dedicated | 2 | 8 GB | 80 GB | 2 TB | €49.00 | | Dedicated Medium | Dedicated | 4 | 16 GB | 160 GB | 2 TB | €98.00 | | Dedicated Large | Dedicated | 8 | 32 GB | 240 GB | 2 TB | €196.00 | | Dedicated X-Large | Dedicated | 16 | 64 GB | 360 GB | 2 TB | €392.00 | | Dedicated XX-Large | Dedicated | 32 | 128 GB | 600 GB | 2 TB | €784.00 | | Dedicated XXX-Large | Dedicated | 48 | 192 GB | 960 GB | 2 TB | €1,176.00 | Location: type: string enum: - sin - fsn - nbg - ash - hel - hil description: | The geographical location of the server | Location ID | Location Name | |------------|---------------| | sin | Singapore, Singapore | | fsn | Falkenstein, Germany | | nbg | Nuremberg, Germany | | ash | Ashburn, USA | | hel | Helsinki, Finland | | hil | Hillsboro, USA | ServerStatus: type: string enum: - booting - running - error - rescaling - deleting description: The current status of the server Service: type: object required: - id - name - serverId - projectId - status - createdAt - deployment - network properties: id: type: string example: "service_123456" description: The unique identifier of the service name: type: string minLength: 1 example: "My Service" description: The name of the service serverId: type: string example: "server_123456" description: The ID of the server running the service projectId: type: string example: "project_123456" description: The ID of the project containing the service status: $ref: "#/components/schemas/ServiceStatus" createdAt: type: string format: date-time example: "2024-03-20T12:00:00Z" description: The timestamp when the service was created network: $ref: "#/components/schemas/ServiceNetworkResponse" volumes: type: array description: Volumes mounted to the service items: $ref: "#/components/schemas/VolumeResponse" env: type: array description: Environment variables for the service items: $ref: "#/components/schemas/EnvironmentVariable" deployment: type: object description: The deployment configuration for the service oneOf: - Repository Deployment: $ref: "#/components/schemas/RepositoryDeployment" - Image Deployment: $ref: "#/components/schemas/ImageDeployment" healthcheck: type: string default: "/" example: "/health" description: The path to use for health checks cmd: type: string example: "npm start" description: Override the Docker CMD instruction ServiceStatus: type: string enum: - pending - live - failed - suspended - deleting description: The current status of the service RepositoryDeployment: type: object required: - url properties: url: type: string format: uri example: "https://github.com/username/repo" description: The URL of the repository dockerfilePath: type: string default: "Dockerfile" example: "Dockerfile" description: The path to the Dockerfile in the repository dockerContext: type: string default: "." example: "." description: The build context for Docker autoDeploy: type: boolean default: true example: true description: Whether to automatically deploy when changes are pushed to the branch branch: type: string default: "main" example: "main" description: The branch to deploy from ImageDeployment: type: object required: - url properties: url: type: string example: "docker.io/library/nginx:latest" description: The URL of the container image registryAuthenticationId: type: string example: "credential_123456" description: The ID of the registry credentials to use for authentication Volume: oneOf: - required: - id - mountPath name: Existing Volume properties: id: type: string example: "volume_123456" description: The ID of an existing volume to mount mountPath: type: string example: "/data" description: The path where the volume should be mounted in the container - required: - name - mountPath name: New Volume properties: name: type: string example: "data" description: The name of the volume mountPath: type: string example: "/data" description: The path where the volume should be mounted in the container VolumeResponse: type: object required: - id - name - mountPath properties: id: type: string example: "volume_123456" description: The unique identifier of the volume name: type: string example: "data" description: The name of the volume mountPath: type: string example: "/data" description: The path where the volume is mounted in the container ServerVolumeResponse: type: object required: - id - name properties: id: type: string example: "volume_123456" description: The unique identifier of the volume name: type: string example: "data" description: The name of the volume ServiceNetworkRequest: type: object required: - public properties: public: type: boolean default: false example: true description: Whether the service is publicly accessible protocol: type: string enum: - http - tcp - udp example: "http" description: The protocol to use for the service. Only required when public is true. ServiceNetworkResponse: type: object required: - public properties: public: type: boolean default: false example: true description: Whether the service is publicly accessible protocol: type: string enum: - http - tcp - udp example: "http" description: The protocol to use for the service. Only required when public is true. managedDomain: type: string example: "example.sliplane.app" description: The managed domain assigned to this service. Only included in responses if the service is public. internalDomain: type: string example: "my-service.internal" description: The internal domain name for accessing the service within the server. customDomains: type: array description: Custom domains assigned to this service items: $ref: "#/components/schemas/CustomDomain" RegistryCredentials: type: object required: - id - name - type - username - createdAt properties: id: type: string example: "credential_123456" description: The unique identifier of the registry credentials name: type: string minLength: 1 example: "Docker Hub Credentials" description: A name to identify these credentials type: type: string enum: - ghcr - dockerhub example: "dockerhub" description: The type of registry these credentials are for username: type: string example: "myusername" description: The username for the registry createdAt: type: string format: date-time example: "2024-03-20T12:00:00Z" description: The timestamp when the credentials were created EnvironmentVariable: type: object required: - key - value - secret properties: key: type: string minLength: 1 example: "DATABASE_URL" description: The environment variable key value: type: string example: "" description: The environment variable value. If secret is true, this will be masked in responses. secret: type: boolean example: true description: Whether this environment variable should be treated as a secret CustomDomain: type: object required: - id - domain - status properties: id: type: string example: "custom_domain_123456" description: The unique identifier of the custom domain domain: type: string example: "example.com" description: The custom domain name status: type: string enum: - pending - active - failed example: "active" description: The current status of the custom domain Error: type: object required: - code - message properties: code: type: string enum: - invalid_request - invalid_token - missing_token - read_only_token - api_access_disabled - project_not_found - server_not_found - service_not_found - credential_not_found - insufficient_capacity - invalid_deployment - invalid_network - invalid_volume - invalid_environment - invalid_credentials - service_invalid_state - server_invalid_state - project_not_empty - internal_server_error - domain_already_exists example: "invalid_request" description: A unique identifier for the type of error message: type: string example: "The request body is invalid" description: A human-readable message describing the error ServiceLog: type: object required: - message - createdAt properties: message: type: string example: "Application started successfully" description: The log message createdAt: type: string format: date-time example: "2024-03-20T12:00:00Z" description: The timestamp when the log was created ServiceMetric: type: object required: - createdAt - usedMemory - freeMemory - totalMemory - cpuUsage properties: createdAt: type: string format: date-time example: "2024-03-20T12:00:00Z" description: The timestamp when the metric was recorded usedMemory: type: number format: float example: 512.5 description: Used memory in MB freeMemory: type: number format: float example: 1536.0 description: Free memory in MB totalMemory: type: number format: float example: 2048.0 description: Total memory in MB cpuUsage: type: number format: float example: 45.2 description: CPU usage percentage ServerMetric: type: object required: - createdAt - usedMemory - freeMemory - totalMemory - cpuUsage properties: createdAt: type: string format: date-time example: "2024-03-20T12:00:00Z" description: The timestamp when the metric was recorded usedMemory: type: number format: float example: 4096.0 description: Used memory in MB freeMemory: type: number format: float example: 4096.0 description: Free memory in MB totalMemory: type: number format: float example: 8192.0 description: Total memory in MB cpuUsage: type: number format: float example: 35.7 description: CPU usage percentage ServiceEvent: type: object required: - id - type - createdAt - message - trigger properties: id: type: string example: "service_event_123456" description: The unique identifier of the event type: type: string example: "service_deploy_success" description: | The type of event. Types include: - service_deploy, service_deploy_success, service_deploy_failed, service_deploy_cancelled - service_build, service_build_failed - service_suspend, service_suspend_success, service_suspend_failed - service_resume, service_resume_success, service_resume_failed - service_delete, service_delete_success, service_delete_failed - service_oom - service_container_status_changed createdAt: type: string format: date-time example: "2024-03-20T12:00:00Z" description: The timestamp when the event occurred message: type: string example: "Deploy started" description: Human-readable description of the event trigger: type: string example: "github_push" description: | What triggered the event. Triggers include: - github_push, manual, api, settings_change, image_tag_change, commit_check payload: type: object description: Additional event metadata as a JSON object example: {"branchName": "main", "commitHash": "abc123", "deployEventId": "service_event_abc123"}