### Manual Scaling Example (YAML) Source: https://api-docs.sevalla.com/applications/processes/get This example showcases a manual scaling configuration, where the instance count is fixed. ```YAML examples: - type: manual config: instanceCount: 8 ``` -------------------------------- ### Horizontal Scaling Example (YAML) Source: https://api-docs.sevalla.com/applications/processes/get This example demonstrates a horizontal scaling configuration, specifying minimum and maximum instance counts, along with scaling intervals and increments. ```YAML examples: - type: horizontal config: minInstanceCount: 3 maxInstanceCount: 20 scaleUpIncrement: 1 scaleDownIncrement: 1 scaleDownIntervalSeconds: 600 scaleUpIntervalSeconds: 60 targetCpuPercent: 80 targetMemoryPercent: 80 ``` -------------------------------- ### POST /applications/deployments Source: https://api-docs.sevalla.com/applications/deployments/start-deployment This endpoint starts a new deployment for a specified application. It requires authentication via Bearer token and accepts a JSON body with application ID, branch, Docker image, and an optional restart flag. Successful requests return the deployment ID, while errors handle authentication failures or server issues. ```APIDOC ## POST /applications/deployments ### Description Start a new deployment for your application. Use this endpoint to trigger a deployment process, optionally restarting without rebuilding by setting is_restart to true. ### Method POST ### Endpoint /applications/deployments Base URL: https://api.sevalla.com/v2 Security: Bearer authentication required in the Authorization header. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **app_id** (string) - Required - The ID of the application to deploy (e.g., "54fb80af-576c-4fdc-ba4f-b596c83f15a1"). - **branch** (string) - Optional - The git branch to deploy from (e.g., "main"). - **docker_image** (string) - Optional - The Docker image to use for deployment (e.g., "myimage:v2"). - **is_restart** (boolean) - Optional - Default: false - Set to true to release without building the app (e.g., false). ### Request Example { "app_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1", "branch": "main", "docker_image": "myimage:v2", "is_restart": false } ### Response #### Success Response (200) - **deployment** (object) - The created deployment details. - **id** (string) - The unique ID of the deployment (e.g., "54fb80af-576c-4fdc-ba4f-b596c83f15a1"). #### Response Example { "deployment": { "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1" } } #### Error Response (401) - **message** (string) - Error message (e.g., "No or invalid API key provided to the request"). - **status** (number) - HTTP status code (e.g., 401). - **data** (object) - Additional error data. #### Error Response Example (401) { "message": "No or invalid API key provided to the request", "status": 401, "data": {} } #### Error Response (500) - **message** (string) - Error message (e.g., "Error occurred while processing your request"). - **status** (number) - HTTP status code (e.g., 500). - **data** (object) - Additional error data. #### Error Response Example (500) { "message": "Error occurred while processing your request", "status": 500, "data": {} } ``` -------------------------------- ### GET /api/applications Source: https://api-docs.sevalla.com/applications/get This endpoint retrieves detailed information for a specific application. ```APIDOC ## GET /api/applications ### Description Fetch detailed information about a specific application by its unique identifier. ### Method GET ### Endpoint /api/applications/{applicationId} ### Parameters #### Path Parameters - **applicationId** (string) - Required - The unique identifier of the application. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **applicationId** (string) - The unique identifier of the application. - **name** (string) - The name of the application. - **description** (string) - A description of the application. #### Response Example { "applicationId": "123e4567-e89b-12d3-a456-426614174000", "name": "Example Application", "description": "This is an example application." } ``` -------------------------------- ### GET Get Database Source: https://api-docs.sevalla.com/databases/get Retrieves detailed information about a specific database, including its configuration settings and current operational status. ```APIDOC ## GET /database ### Description Get details for a specific database, including configuration and status. ### Method GET ### Endpoint /database ### Parameters #### Path Parameters - **id** (string) - Required - Database identifier #### Query Parameters - **includeConfig** (boolean) - Optional - Include detailed configuration information #### Request Body None ### Request Example { "id": "db_12345", "includeConfig": true } ### Response #### Success Response (200) - **id** (string) - Database identifier - **name** (string) - Database name - **status** (string) - Current operational status - **config** (object) - Database configuration details #### Response Example { "id": "db_12345", "name": "production_db", "status": "active", "config": { "version": "12.5", "size": "500GB", "region": "us-east-1" } } #### Error Responses - **400** (Bad Request) - Invalid database ID - **404** (Not Found) - Database not found - **500** (Internal Server Error) - Server error occurred ``` -------------------------------- ### GET /websites/api-docs_sevalla/applications Source: https://api-docs.sevalla.com/applications/get Retrieves a list of applications. This endpoint provides detailed information about each application, including its configuration, status, and deployment history. ```APIDOC ## GET /websites/api-docs_sevalla/applications ### Description Retrieves a list of applications. This endpoint provides detailed information about each application, including its configuration, status, and deployment history. ### Method GET ### Endpoint /websites/api-docs_sevalla/applications ### Parameters #### Query Parameters #### Request Body ### Request Example ### Response #### Success Response (200) - **app** (object) - Details of the application, including: - **id** (string) - Unique identifier for the application. - **name** (string) - The name of the application. - **display_name** (string) - A user-friendly display name for the application. - **hibernation_enabled** (boolean) - Indicates if hibernation is enabled for the application. - **hibernate_after_seconds** (integer) - The number of seconds after which the application will hibernate if idle. - **status** (string) - The current status of the application (e.g., 'deploymentSuccess'). - **deployments** (array of objects) - A list of deployment records for the application. - **id** (string) - Unique identifier for the deployment. - **branch** (string) - The Git branch used for the deployment. - **repo_url** (string) - The URL of the Git repository. - **commit_message** (string) - The commit message for this deployment. - **created_at** (integer) - Timestamp when the deployment was created. - **processes** (array of objects) - A list of processes associated with the application. - **id** (string) - Unique identifier for the process. - **key** (string) - The key or name of the process. - **internal_connections** (array of objects) - A list of internal connections for the application. - **id** (string) - Unique identifier for the internal connection. - **app** (object) - Information about the connected application. - **id** (string) - Unique identifier for the connected application. - **name** (string) - Name of the connected application. - **database** (object) - Information about the connected database. - **id** (string) - Unique identifier for the database. - **name** (string) - Name of the database. #### Response Example ```json { "app": { "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1", "name": "unique-name", "display_name": "firstsite", "hibernation_enabled": true, "hibernate_after_seconds": 900, "status": "deploymentSuccess", "deployments": [ { "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1", "branch": "main", "repo_url": "http://example.com", "commit_message": "docs: example", "created_at": 1667489138845 } ], "processes": [ { "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1", "key": "web" } ], "internal_connections": [ { "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1", "app": { "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1", "name": "unique-name" }, "database": { "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1", "name": "unique-db-name" } } ] } } ``` #### Error Response (401) - **message** (string) - Error message indicating missing or invalid API key. - **status** (integer) - HTTP status code, expected to be 401. - **data** (any) - Additional error data. #### Response Example (401) ```json { "message": "No or invalid API key provided to the request", "status": 401, "data": null } ``` #### Error Response (404) - **message** (string) - Error message indicating that the resource could not be found or permissions are insufficient. - **status** (integer) - HTTP status code, expected to be 404. - **data** (any) - Additional error data. #### Response Example (404) ```json { "message": "Could not find data or the user does not have permissions to retrieve it", "status": 404, "data": null } ``` #### Error Response (500) - **message** (string) - Error message indicating an internal server error. - **status** (integer) - HTTP status code, expected to be 500. - **data** (any) - Additional error data. #### Response Example (500) ```json { "message": "Error occurred while processing your request", "status": 500, "data": null } ``` ``` -------------------------------- ### GET /api/static-sites Source: https://api-docs.sevalla.com/static-sites/get-all This endpoint lists all static sites available to a company. It provides a comprehensive overview of the available sites for management and access. ```APIDOC ## GET /api/static-sites ### Description List all static sites available to a company. ### Method GET ### Endpoint /api/static-sites ### Parameters #### Path Parameters #### Query Parameters #### Request Body ### Request Example ### Response #### Success Response (200) - **sites** (array) - An array of static site objects. #### Response Example { "sites": [ { "id": "123", "name": "Website 1", "url": "https://example.com" }, { "id": "456", "name": "Website 2", "url": "https://example2.com" } ] } ``` -------------------------------- ### GET /applications Source: https://api-docs.sevalla.com/applications/get-all Retrieves a list of applications associated with a company. Requires a valid API key in the Authorization header and a company identifier. Supports pagination with limit and offset parameters. ```APIDOC ## GET /applications ### Description Retrieves a list of applications associated with a company. Requires a valid API key in the Authorization header and a company identifier. Supports pagination with limit and offset parameters. ### Method GET ### Endpoint https://api.sevalla.com/v2/applications ### Parameters #### Path Parameters None #### Query Parameters - **company** (string) - Required - Company identifier (UUID format) - **limit** (number) - Optional - Number of results to return (default: 10) - **offset** (number) - Optional - Number of results to skip (default: 0) #### Request Body None ### Request Example ``` GET /applications?company=54fb80af-576c-4fdc-ba4f-b596c83f15a1&limit=10&offset=0 Authorization: Bearer ``` ### Response #### Success Response (200) - **company** (object) - Company applications object containing apps array #### Response Example ```json { "company": { "apps": { "items": [ { "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1", "name": "unique-name", "display_name": "firstsite", "status": "deploymentSuccess" } ] } } } ``` #### Error Responses - **401 Unauthorized**: No or invalid API key provided to the request - **404 Not Found**: Could not find data or the user does not have permissions to retrieve it - **500 Internal Server Error**: Error occurred while processing your request ``` -------------------------------- ### GET /processes Source: https://api-docs.sevalla.com/applications/processes/get Retrieves information about the running processes for a specific application. Use this endpoint to monitor application health and performance. ```APIDOC ## GET /processes ### Description Get information about the running processes for a specific application. ### Method GET ### Endpoint /processes ### Parameters #### Path Parameters #### Query Parameters - **applicationId** (string) - Required - The ID of the application to retrieve processes for. #### Request Body ### Request Example ### Response #### Success Response (200) - **processes** (array) - An array of process objects. #### Response Example { "processes": [ { "processId": "123", "status": "running", "resourceUsage": { "cpu": 0.5, "memory": 1.2 } } ] } ``` -------------------------------- ### GET /applications/{id} Source: https://api-docs.sevalla.com/applications/get Retrieves detailed information about a specific application by its ID. This includes application metadata, deployments, processes, and internal connections. ```APIDOC ## GET /applications/{id} ### Description Retrieves detailed information about a specific application by its ID. This includes application metadata, deployments, processes, and internal connections. ### Method GET ### Endpoint https://api.sevalla.com/v2/applications/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the application. Example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1 #### Headers - **Authorization** (string) - Required - Bearer token for authentication. ### Response #### Success Response (200) - **app** (object) - Contains application details. - **id** (string) - The application ID. - **name** (string) - The application name. - **display_name** (string) - The display name of the application. - **hibernation_enabled** (boolean) - Indicates if hibernation is enabled. - **hibernate_after_seconds** (number|null) - Time in seconds before hibernation. - **status** (string) - The current status of the application. - **deployments** (array) - List of deployments. - **id** (string) - Deployment ID. - **branch** (string) - Branch name. - **repo_url** (string) - Repository URL. - **commit_message** (string|null) - Commit message. - **created_at** (number) - Creation timestamp. - **processes** (array) - List of processes. - **id** (string) - Process ID. - **key** (string) - Process key. - **internal_connections** (array) - List of internal connections. - **id** (string) - Connection ID. - **app** (object|null) - Connected application details. - **id** (string) - Application ID. - **name** (string) - Application name. - **database** (object|null) - Connected database details. - **id** (string) - Database ID. - **name** (string) - Database name. #### Response Example { "app": { "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1", "name": "unique-name", "display_name": "firstsite", "hibernation_enabled": true, "hibernate_after_seconds": 900, "status": "deploymentSuccess", "deployments": [ { "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1", "branch": "main", "repo_url": "http://example.com", "commit_message": "docs: example", "created_at": 1667489138845 } ], "processes": [ { "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1", "key": "web" } ], "internal_connections": [ { "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1", "app": { "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1", "name": "unique-name" }, "database": { "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1", "name": "unique-db-name" } } ] } } ``` -------------------------------- ### GET /databases Source: https://api-docs.sevalla.com/databases/get-all Retrieves a list of databases associated with a company. Requires authentication via bearer token and a company identifier. ```APIDOC ## GET /databases ### Description Retrieves a list of databases associated with a company. Requires authentication via bearer token and a company identifier. ### Method GET ### Endpoint /databases ### Parameters #### Query Parameters - **company** (string) - Required - Company identifier - **limit** (number) - Optional - Number of items to return (default: 10) - **offset** (number) - Optional - Number of items to skip (default: 0) #### Header Parameters - **Authorization** (string) - Required - Bearer token for authentication ### Request Example ``` GET /databases?company=54fb80af-576c-4fdc-ba4f-b596c83f15a1&limit=10&offset=3 Authorization: Bearer ``` ### Response #### Success Response (200) - **databases** (object) - Contains array of database items - **items** (array) - Array of database objects - **id** (string) - Database identifier - **name** (string) - Unique database name - **display_name** (string) - Display name of the database - **status** (string) - Current status of the database - **updated_at** (number) - Timestamp of last update - **type** (string) - Database type (e.g., postgresql) - **version** (string) - Database version - **resource_type_name** (string) - Resource type identifier #### Response Example ```json { "databases": { "items": [ { "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1", "name": "unique-db-name", "display_name": "firstsite_db", "status": "ready", "updated_at": 1676218612219, "type": "postgresql", "version": "14", "resource_type_name": "db1" } ] } } ``` ### Error Responses #### 401 Unauthorized ```json { "message": "No or invalid API key provided to the request", "status": 401, "data": "" } ``` #### 404 Not Found ```json { "message": "Could not find data or the user does not have permissions to retrieve it", "status": 404, "data": "" } ``` #### 500 Internal Server Error ```json { "message": "Error occurred while processing your request", "status": 500, "data": "" } ``` ``` -------------------------------- ### GET /databases Source: https://api-docs.sevalla.com/databases/get-all Retrieves a list of all databases available to a company. This endpoint is useful for listing all accessible databases for administrative purposes. ```APIDOC ## GET /databases ### Description Retrieve a list of all databases available to a company. ### Method GET ### Endpoint /databases ### Parameters None ### Request Example N/A ### Response #### Success Response (200) - **databases** (array) - List of database objects #### Response Example { "databases": [ { "id": "db1", "name": "Customer Database", "type": "SQL" }, { "id": "db2", "name": "Product Database", "type": "NoSQL" } ] } ``` -------------------------------- ### GET /applications Endpoint Source: https://api-docs.sevalla.com/applications/get-all Retrieves a list of applications associated with a company. Requires an 'Authorization' header for authentication. Supports filtering by company ID and pagination using 'limit' and 'offset' query parameters. Returns a list of application objects on success or appropriate error messages for authentication, not found, or server errors. ```yaml paths: path: /applications method: get servers: - url: https://api.sevalla.com/v2 request: security: - title: bearerAuth parameters: query: {} header: Authorization: type: http scheme: bearer cookie: {} parameters: path: {} query: company: schema: - type: string required: true example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1 limit: schema: - type: number required: false default: 10 example: 10 offset: schema: - type: number required: false default: 0 example: 3 header: {} cookie: {} body: {} response: '200': application/json: schemaArray: - type: object properties: company: allOf: - $ref: '#/components/schemas/CompanyAppsSchema' refIdentifier: '#/components/schemas/MKApplications' requiredProperties: - company examples: example: value: company: apps: items: - id: 54fb80af-576c-4fdc-ba4f-b596c83f15a1 name: unique-name display_name: firstsite status: deploymentSuccess description: Response object of applications requests '401': application/json: schemaArray: - type: object properties: message: allOf: - type: string example: No or invalid API key provided to the request status: allOf: - type: number example: 401 data: allOf: - {} refIdentifier: '#/components/schemas/StatusResponseSchema401' requiredProperties: - message - status examples: example: value: message: No or invalid API key provided to the request status: 401 data: description: No or invalid API key provided to the request '404': application/json: schemaArray: - type: object properties: message: allOf: - type: string example: >- Could not find data or the user does not have permissions to retrieve it status: allOf: - type: number example: 404 data: allOf: - {} refIdentifier: '#/components/schemas/StatusResponseSchema404' requiredProperties: - message - status examples: example: value: message: >- Could not find data or the user does not have permissions to retrieve it status: 404 data: description: >- Could not find the company or the user does not have permissions to retrieve data '500': application/json: schemaArray: - type: object properties: message: allOf: - type: string example: Error occurred while processing your request status: allOf: - type: number example: 500 data: allOf: - {} refIdentifier: '#/components/schemas/StatusResponseSchema500' requiredProperties: - message - status examples: example: value: message: Error occurred while processing your request status: 500 data: description: Error occurred while retrieving applications deprecated: false type: path ``` -------------------------------- ### GET /static-sites Source: https://api-docs.sevalla.com/static-sites/get-all This endpoint retrieves a list of static sites associated with a given company. It requires authentication via Bearer token and supports pagination using limit and offset query parameters. The response includes site details such as ID, name, display name, and status. ```APIDOC ## GET /static-sites ### Description Retrieves a paginated list of static sites for the specified company. Authentication is required using a Bearer token in the Authorization header. ### Method GET ### Endpoint https://api.sevalla.com/v2/static-sites ### Parameters #### Path Parameters None #### Query Parameters - **company** (string) - Required - The company ID (UUID format). Example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1 - **limit** (number) - Optional - Number of items to return. Default: 10. Example: 10 - **offset** (number) - Optional - Starting index for pagination. Default: 0. Example: 3 #### Header Parameters - **Authorization** (string) - Required - Bearer token for authentication. Example: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... #### Request Body None ### Request Example GET https://api.sevalla.com/v2/static-sites?company=54fb80af-576c-4fdc-ba4f-b596c83f15a1&limit=10&offset=0 Headers: Authorization: Bearer ### Response #### Success Response (200) - **company** (object) - Contains the static_sites object with an items array of StaticSite objects. - **static_sites** (object) - **items** (array of objects) - **id** (string, UUID) - Unique identifier of the static site. Example: 54fb80af-576c-4fdc-ba4f-b596c83f15a1 - **name** (string) - Internal name of the site. Example: first-static-site - **display_name** (string) - Human-readable name. Example: First static site - **status** (string) - Deployment status. Example: deploymentSuccess #### Response Example { "company": { "static_sites": { "items": [ { "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1", "name": "first-static-site", "display_name": "First static site", "status": "deploymentSuccess" } ] } } } #### Error Response (401) - **message** (string) - Error message. Example: No or invalid API key provided to the request - **status** (number) - HTTP status code. Example: 401 - **data** (object) - Additional data (empty) #### Error Response Example (401) { "message": "No or invalid API key provided to the request", "status": 401, "data": {} } #### Error Response (404) - **message** (string) - Error message. Example: Could not find data or the user does not have permissions to retrieve it - **status** (number) - HTTP status code. Example: 404 - **data** (object) - Additional data (empty) #### Error Response Example (404) { "message": "Could not find data or the user does not have permissions to retrieve it", "status": 404, "data": {} } #### Error Response (500) - **message** (string) - Error message. Example: Error occurred while processing your request - **status** (number) - HTTP status code. Example: 500 - **data** (object) - Additional data (empty) #### Error Response Example (500) { "message": "Error occurred while processing your request", "status": 500, "data": {} } ``` -------------------------------- ### GET /static-sites/{id} Source: https://api-docs.sevalla.com/static-sites/get Retrieves detailed information about a specific static site by its ID. This endpoint requires authentication via Bearer token and returns site configuration, status, and deployment history. It is useful for checking site status and repository details after creation. ```APIDOC ## GET /static-sites/{id} ### Description This endpoint fetches a static site by its unique identifier, including its properties, status, and associated deployments. It operates on the Sevalla API v2 and requires a valid Bearer token for authentication. ### Method GET ### Endpoint https://api.sevalla.com/v2/static-sites/{id} ### Parameters #### Path Parameters - **id** (string) - Required - UUID format representing the static site ID, e.g., 54fb80af-576c-4fdc-ba4f-b596c83f15a1 #### Query Parameters None #### Request Body None ### Request Example No request body required for GET request. ### Response #### Success Response (200) - **static_site** (object) - The static site object containing id, name, display_name, status, repo_url, default_branch, auto_deploy, remote_repository_id, git_repository_id, git_type, hostname, build_command, created_at, updated_at, and deployments array. #### Response Example { "static_site": { "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1", "name": "first-static-site", "display_name": "First static site", "status": "deploymentSuccess", "repo_url": "https://github.com/user/project", "default_branch": "main", "auto_deploy": false, "remote_repository_id": "012345678", "git_repository_id": "4978765082", "git_type": "github", "hostname": "http://example.com", "build_command": "make build", "created_at": 1667489138845, "updated_at": 1667489138845, "deployments": [ { "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1", "status": "success", "repo_url": "https://github.com/user/project", "branch": "main", "commit_message": "Merge pull request #123", "created_at": 1665382600770 } ] } } #### Error Response (401) - **message** (string) - Error message, e.g., "No or invalid API key provided to the request" - **status** (number) - HTTP status code, e.g., 401 - **data** (object) - Additional data (empty) #### Error Response Example (401) { "message": "No or invalid API key provided to the request", "status": 401, "data": {} } #### Error Response (404) - **message** (string) - Error message, e.g., "Could not find data or the user does not have permissions to retrieve it" - **status** (number) - HTTP status code, e.g., 404 - **data** (object) - Additional data (empty) #### Error Response Example (404) { "message": "Could not find data or the user does not have permissions to retrieve it", "status": 404, "data": {} } #### Error Response (500) - **message** (string) - Error message, e.g., "Error occurred while processing your request" - **status** (number) - HTTP status code, e.g., 500 - **data** (object) - Additional data (empty) #### Error Response Example (500) { "message": "Error occurred while processing your request", "status": 500, "data": {} } ``` -------------------------------- ### GET /databases/{id} Source: https://api-docs.sevalla.com/databases/get Retrieve a database by its unique identifier. Returns detailed database information including connection strings, cluster details, and resource specifications. ```APIDOC ## GET /databases/{id} ### Description Retrieve a database by its unique identifier. Returns detailed database information including connection strings, cluster details, and resource specifications. ### Method GET ### Endpoint /databases/{id} ### Parameters #### Path Parameters - **id** (string) - Required - Unique identifier of the database ### Response #### Success Response (200) - **database.id** (string) - Unique identifier of the database - **database.name** (string) - Internal name of the database - **database.display_name** (string) - Display name of the database - **database.status** (string) - Current status of the database (e.g., ready) - **database.created_at** (number) - Timestamp of database creation - **database.memory_limit** (number) - Memory limit in MB - **database.cpu_limit** (number) - CPU limit in millicores - **database.storage_size** (number) - Storage size in MB - **database.type** (string) - Database type (e.g., postgresql) - **database.version** (string) - Database version - **database.cluster** (object) - Cluster information containing id, location, and display_name - **database.resource_type_name** (string) - Resource type identifier - **database.internal_hostname** (string) - Internal hostname for database connections - **database.internal_port** (string) - Internal port for database connections - **database.internal_connections** (array) - Array of internal connection objects - **database.data** (object) - Database credentials and configuration - **database.external_connection_string** (string) - External connection string for database access - **database.external_hostname** (string) - External hostname for database access - **database.external_port** (string) - External port for database access #### Response Example ```json { "database": { "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1", "name": "unique-db-name", "display_name": "firstsite-db", "status": "ready", "created_at": 1668697088806, "memory_limit": 250, "cpu_limit": 250, "storage_size": 1000, "type": "postgresql", "version": "14", "cluster": { "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1", "location": "europe-west3", "display_name": "Frankfurt, Germany Europe" }, "resource_type_name": "db1", "internal_hostname": "some-name.dns.svc.cluster.local", "internal_port": "5432", "internal_connections": [ { "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1", "type": "appResource" } ], "data": { "db_name": "firstsite-db", "db_password": "password", "db_root_password": "password", "db_user": "username" }, "external_connection_string": "postgresql://username:password@localhost:31866/firstsite-db", "external_hostname": "firstsite-db-postgresql.external.kinsta.app", "external_port": "31866" } } ``` ### Error Responses #### 401 Unauthorized ```json { "message": "No or invalid API key provided to the request", "status": 401, "data": "" } ``` #### 404 Not Found ```json { "message": "Could not find data or the user does not have permissions to retrieve it", "status": 404, "data": "" } ``` ``` -------------------------------- ### POST /static-sites/deployments Source: https://api-docs.sevalla.com/static-sites/deployments/start-deployment Initiates a new deployment for a static site. This endpoint requires the static site ID and the branch to deploy from. ```APIDOC ## POST /static-sites/deployments ### Description Starts a new deployment for a static site using this endpoint. Provide the `static_site_id` and the `branch` to deploy. ### Method POST ### Endpoint https://api.sevalla.com/v2/static-sites/deployments ### Parameters #### Query Parameters None #### Request Body - **static_site_id** (string, uuid) - Required - The ID of the static site to deploy. - **branch** (string) - Required - The branch of the repository to deploy. ### Request Example ```json { "static_site_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1", "branch": "main" } ``` ### Response #### Success Response (200) - **deployment** (object) - Details about the created deployment. - **id** (string, uuid) - The unique identifier for the deployment. - **status** (string) - The current status of the deployment (e.g., `waiting`, `inProgress`, `success`, `failed`, `cancelled`). #### Response Example (200) ```json { "deployment": { "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1", "status": "waiting" } } ``` #### Error Response (401) - **message** (string) - Error message indicating authentication failure. - **status** (number) - HTTP status code (401). - **data** (any) - Additional error data. #### Error Response (500) - **message** (string) - Error message indicating a server error. - **status** (number) - HTTP status code (500). - **data** (any) - Additional error data. ``` -------------------------------- ### POST /pipelines/{id}/create-preview-app Source: https://api-docs.sevalla.com/pipelines/create-preview-app Creates a preview application for a specific pipeline. Requires branch information and optionally a pull request number. ```APIDOC ## POST /pipelines/{id}/create-preview-app ### Description Create a preview application in a pipeline. Requires authentication via bearer token. ### Method POST ### Endpoint https://api.sevalla.com/v2/pipelines/{id}/create-preview-app ### Parameters #### Path Parameters - **id** (string) - Required - UUID of the pipeline (e.g., 54fb80af-576c-4fdc-ba4f-b596c83f15a1) #### Request Body - **branch** (string) - Required - Branch name (e.g., "main") - **pull_request_number** (number) - Optional - Pull request number (e.g., 14) ### Request Example { "branch": "main", "pull_request_number": 14 } ### Response #### Success Response (200) - **app** (object) - Preview app details - **id** (string) - UUID of the created app - **name** (string) - App name - **displayName** (string) - App display name #### Response Example { "app": { "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1", "name": "test-app", "displayName": "Test App" } } #### Error Responses - **401 Unauthorized**: No or invalid API key provided - **500 Internal Server Error**: Error occurred while processing request ``` -------------------------------- ### GET /pipelines Source: https://api-docs.sevalla.com/pipelines/get-all Retrieves pipelines for a company. Accepts company ID and optional pagination parameters. ```APIDOC ``` -------------------------------- ### POST /applications/promote Source: https://api-docs.sevalla.com/pipelines/promote Promotes a pipeline preview application to the next stage. Requires bearer token authentication and specific application identifiers in the request body. ```APIDOC ## POST /applications/promote ### Description Promote a pipeline preview application to the next stage. ### Method POST ### Endpoint /applications/promote ### Parameters #### Request Body - **source_app_id** (string) - Required - The ID of the source application to promote - **target_app_ids** (array of strings) - Required - Array of target application IDs to promote to ### Request Example { "source_app_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1", "target_app_ids": [ "14fb80af-576c-4fdc-ba4f-b596c83f15a1" ] } ### Response #### Success Response (200) - **promote** (array) - Array of promotion results containing target_app_id and deployment_id #### Response Example { "promote": [ { "target_app_id": "14fb80af-576c-4fdc-ba4f-b596c83f15a1", "deployment_id": "34fb80af-576c-4fdc-ba4f-b596c83f15a1" } ] } #### Error Responses - **401 Unauthorized**: No or invalid API key provided - **500 Internal Server Error**: Error occurred while processing your request ``` -------------------------------- ### Define Scaling Configuration (YAML) Source: https://api-docs.sevalla.com/applications/processes/get This section defines the configuration parameters for instance scaling. It includes properties such as instance count, scaling intervals, increment values, and resource utilization targets. The configuration is structured using YAML format and demonstrates different scaling strategies. ```YAML config: type: object properties: instanceCount: type: number minimum: 0 maximum: 50 minInstanceCount: type: number minimum: 1 maximum: 50 maxInstanceCount: type: number minimum: 1 maximum: 50 targetCpuPercent: type: number minimum: 1 maximum: 100 default: 80 targetMemoryPercent: type: number minimum: 1 maximum: 100 default: 80 scaleUpIntervalSeconds: type: number minimum: 1 maximum: 60000 default: 60 scaleUpIncrement: type: number minimum: 1 maximum: 5 default: 1 scaleDownIntervalSeconds: type: number minimum: 1 maximum: 60000 default: 600 scaleDownIncrement: type: number minimum: 1 maximum: 5 default: 1 ```