swagger: '2.0' info: title: Koyeb Rest activity Services API description: 'The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. ' version: 1.0.0 host: app.koyeb.com schemes: - https security: - Bearer: [] tags: - name: Services paths: /v1/service_events: get: summary: List Service events operationId: ListServiceEvents responses: '200': description: A successful response. schema: $ref: '#/definitions/ListServiceEventsReply' '400': description: Validation error schema: $ref: '#/definitions/ErrorWithFields' '401': description: Returned when the token is not valid. schema: $ref: '#/definitions/Error' '403': description: Returned when the user does not have permission to access the resource. schema: $ref: '#/definitions/Error' '404': description: Returned when the resource does not exist. schema: $ref: '#/definitions/Error' '500': description: Returned in case of server error. schema: $ref: '#/definitions/Error' '503': description: Service is unavailable. schema: $ref: '#/definitions/Error' default: description: An unexpected error response. schema: $ref: '#/definitions/google.rpc.Status' parameters: - name: service_id description: (Optional) Filter on service id in: query required: false type: string - name: types description: (Optional) Filter on service event types in: query required: false type: array items: type: string collectionFormat: multi - name: limit description: (Optional) The number of items to return in: query required: false type: string - name: offset description: (Optional) The offset in the list of item to return in: query required: false type: string - name: order description: (Optional) Sorts the list in the ascending or the descending order in: query required: false type: string tags: - Services /v1/services: get: summary: List Services operationId: ListServices responses: '200': description: A successful response. schema: $ref: '#/definitions/ListServicesReply' '400': description: Validation error schema: $ref: '#/definitions/ErrorWithFields' '401': description: Returned when the token is not valid. schema: $ref: '#/definitions/Error' '403': description: Returned when the user does not have permission to access the resource. schema: $ref: '#/definitions/Error' '404': description: Returned when the resource does not exist. schema: $ref: '#/definitions/Error' '500': description: Returned in case of server error. schema: $ref: '#/definitions/Error' '503': description: Service is unavailable. schema: $ref: '#/definitions/Error' default: description: An unexpected error response. schema: $ref: '#/definitions/google.rpc.Status' parameters: - name: app_id description: (Optional) The id of the app in: query required: false type: string - name: limit description: (Optional) The number of items to return in: query required: false type: string - name: offset description: (Optional) The offset in the list of item to return in: query required: false type: string - name: name description: (Optional) A filter for name in: query required: false type: string - name: types description: (Optional) Filter on service types in: query required: false type: array items: type: string enum: - INVALID_TYPE - WEB - WORKER - DATABASE - SANDBOX collectionFormat: multi - name: statuses description: (Optional) Filter on service statuses in: query required: false type: array items: type: string enum: - STARTING - HEALTHY - DEGRADED - UNHEALTHY - DELETING - DELETED - PAUSING - PAUSED - RESUMING collectionFormat: multi - name: regions description: (Optional) Filter on regions in: query required: false type: array items: type: string collectionFormat: multi - name: project_id description: (Optional) A filter for the project ID in: query required: false type: string tags: - Services post: summary: Create Service operationId: CreateService responses: '200': description: A successful response. schema: $ref: '#/definitions/CreateServiceReply' '400': description: Validation error schema: $ref: '#/definitions/ErrorWithFields' '401': description: Returned when the token is not valid. schema: $ref: '#/definitions/Error' '403': description: Returned when the user does not have permission to access the resource. schema: $ref: '#/definitions/Error' '404': description: Returned when the resource does not exist. schema: $ref: '#/definitions/Error' '500': description: Returned in case of server error. schema: $ref: '#/definitions/Error' '503': description: Service is unavailable. schema: $ref: '#/definitions/Error' default: description: An unexpected error response. schema: $ref: '#/definitions/google.rpc.Status' parameters: - name: service in: body required: true schema: $ref: '#/definitions/CreateService' - name: dry_run description: If set only run validation in: query required: false type: boolean tags: - Services /v1/services-autocomplete: post: summary: Autocomplete definition description: Generate autocomplete definition for a service operationId: Autocomplete responses: '200': description: A successful response. schema: $ref: '#/definitions/AutocompleteReply' '400': description: Validation error schema: $ref: '#/definitions/ErrorWithFields' '401': description: Returned when the token is not valid. schema: $ref: '#/definitions/Error' '403': description: Returned when the user does not have permission to access the resource. schema: $ref: '#/definitions/Error' '404': description: Returned when the resource does not exist. schema: $ref: '#/definitions/Error' '500': description: Returned in case of server error. schema: $ref: '#/definitions/Error' '503': description: Service is unavailable. schema: $ref: '#/definitions/Error' default: description: An unexpected error response. schema: $ref: '#/definitions/google.rpc.Status' parameters: - name: body in: body required: true schema: $ref: '#/definitions/AutocompleteRequest' tags: - Services /v1/services/{id}: get: summary: Get Service operationId: GetService responses: '200': description: A successful response. schema: $ref: '#/definitions/GetServiceReply' '400': description: Validation error schema: $ref: '#/definitions/ErrorWithFields' '401': description: Returned when the token is not valid. schema: $ref: '#/definitions/Error' '403': description: Returned when the user does not have permission to access the resource. schema: $ref: '#/definitions/Error' '404': description: Returned when the resource does not exist. schema: $ref: '#/definitions/Error' '500': description: Returned in case of server error. schema: $ref: '#/definitions/Error' '503': description: Service is unavailable. schema: $ref: '#/definitions/Error' default: description: An unexpected error response. schema: $ref: '#/definitions/google.rpc.Status' parameters: - name: id description: The id of the Service in: path required: true type: string tags: - Services delete: summary: Delete Service description: Service deletion is allowed for all status. operationId: DeleteService responses: '200': description: A successful response. schema: $ref: '#/definitions/DeleteServiceReply' '400': description: Validation error schema: $ref: '#/definitions/ErrorWithFields' '401': description: Returned when the token is not valid. schema: $ref: '#/definitions/Error' '403': description: Returned when the user does not have permission to access the resource. schema: $ref: '#/definitions/Error' '404': description: Returned when the resource does not exist. schema: $ref: '#/definitions/Error' '500': description: Returned in case of server error. schema: $ref: '#/definitions/Error' '503': description: Service is unavailable. schema: $ref: '#/definitions/Error' default: description: An unexpected error response. schema: $ref: '#/definitions/google.rpc.Status' parameters: - name: id description: The id of the entity to delete in: path required: true type: string tags: - Services put: summary: Update Service operationId: UpdateService responses: '200': description: A successful response. schema: $ref: '#/definitions/UpdateServiceReply' '400': description: Validation error schema: $ref: '#/definitions/ErrorWithFields' '401': description: Returned when the token is not valid. schema: $ref: '#/definitions/Error' '403': description: Returned when the user does not have permission to access the resource. schema: $ref: '#/definitions/Error' '404': description: Returned when the resource does not exist. schema: $ref: '#/definitions/Error' '500': description: Returned in case of server error. schema: $ref: '#/definitions/Error' '503': description: Service is unavailable. schema: $ref: '#/definitions/Error' default: description: An unexpected error response. schema: $ref: '#/definitions/google.rpc.Status' parameters: - name: id description: The id of the entity to update in: path required: true type: string - name: service in: body required: true schema: $ref: '#/definitions/UpdateService' - name: update_mask in: query required: false type: string - name: dry_run description: If set, run validation and check that the service exists in: query required: false type: boolean tags: - Services patch: summary: Update Service operationId: UpdateService2 responses: '200': description: A successful response. schema: $ref: '#/definitions/UpdateServiceReply' '400': description: Validation error schema: $ref: '#/definitions/ErrorWithFields' '401': description: Returned when the token is not valid. schema: $ref: '#/definitions/Error' '403': description: Returned when the user does not have permission to access the resource. schema: $ref: '#/definitions/Error' '404': description: Returned when the resource does not exist. schema: $ref: '#/definitions/Error' '500': description: Returned in case of server error. schema: $ref: '#/definitions/Error' '503': description: Service is unavailable. schema: $ref: '#/definitions/Error' default: description: An unexpected error response. schema: $ref: '#/definitions/google.rpc.Status' parameters: - name: id description: The id of the entity to update in: path required: true type: string - name: service in: body required: true schema: $ref: '#/definitions/UpdateService' - name: update_mask in: query required: false type: string - name: dry_run description: If set, run validation and check that the service exists in: query required: false type: boolean tags: - Services /v1/services/{id}/pause: post: summary: Pause Service description: "Service pause action is allowed for the following status:\n - starting\n - healthy\n - degraded\n - unhealthy\n - resuming" operationId: PauseService responses: '200': description: A successful response. schema: $ref: '#/definitions/PauseServiceReply' '400': description: Validation error schema: $ref: '#/definitions/ErrorWithFields' '401': description: Returned when the token is not valid. schema: $ref: '#/definitions/Error' '403': description: Returned when the user does not have permission to access the resource. schema: $ref: '#/definitions/Error' '404': description: Returned when the resource does not exist. schema: $ref: '#/definitions/Error' '500': description: Returned in case of server error. schema: $ref: '#/definitions/Error' '503': description: Service is unavailable. schema: $ref: '#/definitions/Error' default: description: An unexpected error response. schema: $ref: '#/definitions/google.rpc.Status' parameters: - name: id description: The id of the service to pause. in: path required: true type: string tags: - Services /v1/services/{id}/redeploy: post: summary: ReDeploy Service operationId: ReDeploy responses: '200': description: A successful response. schema: $ref: '#/definitions/RedeployReply' '400': description: Validation error schema: $ref: '#/definitions/ErrorWithFields' '401': description: Returned when the token is not valid. schema: $ref: '#/definitions/Error' '403': description: Returned when the user does not have permission to access the resource. schema: $ref: '#/definitions/Error' '404': description: Returned when the resource does not exist. schema: $ref: '#/definitions/Error' '500': description: Returned in case of server error. schema: $ref: '#/definitions/Error' '503': description: Service is unavailable. schema: $ref: '#/definitions/Error' default: description: An unexpected error response. schema: $ref: '#/definitions/google.rpc.Status' parameters: - name: id in: path required: true type: string - name: info in: body required: true schema: $ref: '#/definitions/RedeployRequest.Info' tags: - Services /v1/services/{id}/resume: post: summary: Resume Service description: "Service resume action is allowed for the following status:\n - paused" operationId: ResumeService responses: '200': description: A successful response. schema: $ref: '#/definitions/ResumeServiceReply' '400': description: Validation error schema: $ref: '#/definitions/ErrorWithFields' '401': description: Returned when the token is not valid. schema: $ref: '#/definitions/Error' '403': description: Returned when the user does not have permission to access the resource. schema: $ref: '#/definitions/Error' '404': description: Returned when the resource does not exist. schema: $ref: '#/definitions/Error' '500': description: Returned in case of server error. schema: $ref: '#/definitions/Error' '503': description: Service is unavailable. schema: $ref: '#/definitions/Error' default: description: An unexpected error response. schema: $ref: '#/definitions/google.rpc.Status' parameters: - name: id description: The id of the service to pause. in: path required: true type: string - name: skip_build description: 'If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead. The call fails if no previous successful builds happened.' in: query required: false type: boolean - name: use_cache in: query required: false type: boolean tags: - Services /v1/services/{id}/scale: get: summary: Get Service Scaling description: Returns the current scaling configuration for a service operationId: GetServiceScaling responses: '200': description: A successful response. schema: $ref: '#/definitions/GetServiceScalingReply' '400': description: Validation error schema: $ref: '#/definitions/ErrorWithFields' '401': description: Returned when the token is not valid. schema: $ref: '#/definitions/Error' '403': description: Returned when the user does not have permission to access the resource. schema: $ref: '#/definitions/Error' '404': description: Returned when the resource does not exist. schema: $ref: '#/definitions/Error' '500': description: Returned in case of server error. schema: $ref: '#/definitions/Error' '503': description: Service is unavailable. schema: $ref: '#/definitions/Error' default: description: An unexpected error response. schema: $ref: '#/definitions/google.rpc.Status' parameters: - name: id description: The id of the service in: path required: true type: string tags: - Services delete: summary: Delete Service Scaling description: "Deletes the manual scaling configuration for a service, reverting to \nthe scaling defined in the deployment definition." operationId: DeleteServiceScaling responses: '200': description: A successful response. schema: $ref: '#/definitions/DeleteServiceScalingReply' '400': description: Validation error schema: $ref: '#/definitions/ErrorWithFields' '401': description: Returned when the token is not valid. schema: $ref: '#/definitions/Error' '403': description: Returned when the user does not have permission to access the resource. schema: $ref: '#/definitions/Error' '404': description: Returned when the resource does not exist. schema: $ref: '#/definitions/Error' '500': description: Returned in case of server error. schema: $ref: '#/definitions/Error' '503': description: Service is unavailable. schema: $ref: '#/definitions/Error' default: description: An unexpected error response. schema: $ref: '#/definitions/google.rpc.Status' parameters: - name: id description: The id of the service in: path required: true type: string tags: - Services put: summary: Update Service Scaling description: Stores or updates the scaling configuration for a service to use manual scaling operationId: UpdateServiceScaling responses: '200': description: A successful response. schema: $ref: '#/definitions/UpdateServiceScalingReply' '400': description: Validation error schema: $ref: '#/definitions/ErrorWithFields' '401': description: Returned when the token is not valid. schema: $ref: '#/definitions/Error' '403': description: Returned when the user does not have permission to access the resource. schema: $ref: '#/definitions/Error' '404': description: Returned when the resource does not exist. schema: $ref: '#/definitions/Error' '500': description: Returned in case of server error. schema: $ref: '#/definitions/Error' '503': description: Service is unavailable. schema: $ref: '#/definitions/Error' default: description: An unexpected error response. schema: $ref: '#/definitions/google.rpc.Status' parameters: - name: id description: The id of the service to scale in: path required: true type: string - name: body in: body required: true schema: type: object properties: scalings: type: array items: $ref: '#/definitions/ManualServiceScaling' title: The new scaling configuration tags: - Services definitions: DeploymentProvisioningInfo.Stage.BuildAttempt: type: object properties: id: type: integer format: int64 status: $ref: '#/definitions/DeploymentProvisioningInfo.Stage.Status' messages: type: array items: type: string started_at: type: string format: date-time finished_at: type: string format: date-time steps: type: array items: $ref: '#/definitions/DeploymentProvisioningInfo.Stage.BuildAttempt.BuildStep' image_pushed: type: boolean internal_failure: type: boolean retryable_failure: type: boolean wait_completion: type: boolean description: This flag is used to finalize the build, and continue the deployment in case of success, or cancel and potentially retry the build in case of failure. DeploymentScalingTargetSleepIdleDelay: type: object properties: value: type: integer format: int64 description: 'DEPRECATED: use deep_sleep_value instead. Delay in seconds after which a service which received 0 request is put to deep sleep.' deep_sleep_value: type: integer format: int64 description: Delay in seconds after which a service which received 0 request is put to deep sleep. light_sleep_value: type: integer format: int64 description: Delay in seconds after which a service which received 0 request is put to light sleep. DeploymentProxyPort: type: object properties: port: type: integer format: int64 protocol: $ref: '#/definitions/ProxyPortProtocol' RedeployRequest.Info: type: object properties: deployment_group: type: string sha: type: string use_cache: type: boolean skip_build: type: boolean description: 'If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead. The call fails if no previous successful builds happened.' ErrorWithFields: type: object properties: status: type: integer format: int32 code: type: string message: type: string fields: type: array items: $ref: '#/definitions/ErrorField' DeleteServiceScalingReply: type: object title: Empty reply - success is indicated by no error GitDeploymentMetadata: type: object properties: last_provisioned_deployment_id: type: string git_env: $ref: '#/definitions/GitEnvDeploymentMetadata' ArchiveSource: type: object properties: id: type: string title: The ID of the archive to deploy buildpack: $ref: '#/definitions/BuildpackBuilder' docker: $ref: '#/definitions/DockerBuilder' UpdateServiceReply: type: object properties: service: $ref: '#/definitions/Service' title: The entity updated UpdateService: type: object properties: definition: $ref: '#/definitions/DeploymentDefinition' metadata: $ref: '#/definitions/DeploymentMetadata' skip_build: type: boolean description: 'If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead. The call fails if no previous successful builds happened.' save_only: type: boolean title: If set, do not trigger a deployment, only store the new settings life_cycle: $ref: '#/definitions/ServiceLifeCycle' DeleteServiceReply: type: object DeploymentDefinition.Type: type: string enum: - INVALID - WEB - WORKER - DATABASE - SANDBOX default: INVALID DeploymentDatabaseInfo: type: object properties: neon_postgres: $ref: '#/definitions/DeploymentNeonPostgresDatabaseInfo' ServiceListItem: type: object properties: id: type: string name: type: string type: $ref: '#/definitions/Service.Type' organization_id: type: string app_id: type: string updated_at: type: string format: date-time created_at: type: string format: date-time status: $ref: '#/definitions/Service.Status' messages: type: array items: type: string version: type: string format: uint64 title: A version updated whenever this state changes (useful for caching) state: $ref: '#/definitions/ServiceState' active_deployment_id: type: string latest_deployment_id: type: string life_cycle: $ref: '#/definitions/ServiceLifeCycle' HTTPHealthCheck: type: object properties: port: type: integer format: int64 title: The port to use to perform the health check, must be declared in the ports section path: type: string title: The path to use to perform the HTTP health check method: type: string title: An optional HTTP method to use to perform the health check, default is GET headers: type: array items: $ref: '#/definitions/HTTPHeader' title: An optional list of HTTP headers to provide when performing the request, default is empty TriggerGitDeploymentMetadata: type: object properties: provider: $ref: '#/definitions/TriggerGitDeploymentMetadata.Provider' repository: type: string branch: type: string sha: type: string message: type: string sender_username: type: string sender_avatar_url: type: string sender_profile_url: type: string DesiredDeployment.Group: type: object properties: name: type: string deployment_ids: type: array items: type: string BasicAuthPolicy: type: object properties: username: type: string password: type: string Deployment.Role: type: string enum: - INVALID - ACTIVE - UPCOMING - CURRENT default: INVALID RedeployReply: type: object properties: deployment: $ref: '#/definitions/Deployment' title: The entity updated DeploymentMetadata: type: object properties: trigger: $ref: '#/definitions/TriggerDeploymentMetadata' database: $ref: '#/definitions/DatabaseDeploymentMetadata' git: $ref: '#/definitions/GitDeploymentMetadata' archive: $ref: '#/definitions/ArchiveDeploymentMetadata' proxy_ports: type: array items: $ref: '#/definitions/DeploymentProxyPortMetadata' DeploymentProvisioningInfo.Stage.BuildAttempt.BuildStep: type: object properties: name: type: string status: $ref: '#/definitions/DeploymentProvisioningInfo.Stage.Status' messages: type: array items: type: string started_at: type: string format: date-time finished_at: type: string format: date-time BuildpackBuilder: type: object properties: build_command: type: string title: A command used to override the build command, run after all build steps run_command: type: string title: A command used to override the default run command privileged: type: boolean title: A flag to run the container in privileged mode DeploymentStrategyType: type: string enum: - DEPLOYMENT_STRATEGY_TYPE_INVALID - DEPLOYMENT_STRATEGY_TYPE_DEFAULT - DEPLOYMENT_STRATEGY_TYPE_CANARY - DEPLOYMENT_STRATEGY_TYPE_ROLLING - DEPLOYMENT_STRATEGY_TYPE_BLUE_GREEN - DEPLOYMENT_STRATEGY_TYPE_IMMEDIATE default: DEPLOYMENT_STRATEGY_TYPE_INVALID description: " - DEPLOYMENT_STRATEGY_TYPE_INVALID: DEPRECATED: Use DEPLOYMENT_STRATEGY_TYPE_DEFAULT instead.\n - DEPLOYMENT_STRATEGY_TYPE_DEFAULT: Default/unspecified strategy (resolves to platform default, currently ROLLING).\n - DEPLOYMENT_STRATEGY_TYPE_CANARY: Use canary strategy.\n - DEPLOYMENT_STRATEGY_TYPE_ROLLING: Use rolling strategy.\n - DEPLOYMENT_STRATEGY_TYPE_BLUE_GREEN: Use blue green strategy.\n - DEPLOYMENT_STRATEGY_TYPE_IMMEDIATE: Use immediate strategy." NeonPostgresDatabase.NeonDatabase: type: object properties: name: type: string owner: type: string DeploymentProxyPortMetadata: type: object properties: host: type: string public_port: type: integer format: int64 port: type: integer format: int64 protocol: $ref: '#/definitions/ProxyPortProtocol' DeploymentProvisioningInfo.Stage.Status: type: string enum: - UNKNOWN - PENDING - RUNNING - FAILED - COMPLETED - ABORTED default: UNKNOWN TriggerDeploymentMetadata.TriggerType: type: string enum: - UNKNOWN_TYPE - GIT - RESUME - DATABASE_SYNC default: UNKNOWN_TYPE ListServiceEventsReply: type: object properties: events: type: array items: $ref: '#/definitions/ServiceEvent' title: The collection of events limit: type: integer format: int64 title: The limit in the request offset: type: integer format: int64 title: The offset in the request order: type: string title: The order in the request has_next: type: boolean title: If there is more items after in the collection DockerBuilder: type: object properties: dockerfile: type: string title: A path to the Dockerfile entrypoint: type: array items: type: string title: The docker ENTRYPOINT command: type: string title: The docker CMD args: type: array items: type: string title: The docker CMD args target: type: string title: The target for multi-stage builds privileged: type: boolean title: A flag to run the container in privileged mode GitEnvDeploymentMetadata: type: object properties: sha: type: string commit_author: type: string commit_message: type: string DeploymentHealthCheck: type: object properties: grace_period: type: integer format: int64 title: An optional initial period in seconds to wait for the instance to become healthy, default is 5s interval: type: integer format: int64 title: An optional period in seconds between two health checks, default is 60s restart_limit: type: integer format: int64 title: An optional number of consecutive failures before attempting to restart the service, default is 3 timeout: type: integer format: int64 title: An optional maximum time to wait in seconds before considering the check as a failure, default is 5s tcp: $ref: '#/definitions/TCPHealthCheck' http: $ref: '#/definitions/HTTPHealthCheck' Service.Status: type: string enum: - STARTING - HEALTHY - DEGRADED - UNHEALTHY - DELETING - DELETED - PAUSING - PAUSED - RESUMING default: STARTING DeploymentScalingTargetRequestsResponseTime: type: object properties: value: type: integer format: int64 quantile: type: integer format: int64 description: 'The quantile to use for autoscaling. For example, set to 95 to use the 95th percentile (p95) for autoscaling. Valid values are between 0 and 100.' GetServiceScalingReply: type: object properties: scalings: type: array items: $ref: '#/definitions/ManualServiceScaling' title: The current manual scaling configuration google.protobuf.Any: type: object properties: '@type': type: string additionalProperties: {} ServiceLifeCycle: type: object properties: delete_after_sleep: type: integer format: int64 delete_after_create: type: integer format: int64 PauseServiceReply: type: object DatabaseDeploymentMetadata: type: object properties: neon_postgres: $ref: '#/definitions/NeonPostgresDatabaseDeploymentMetadata' ServiceState: type: object properties: desired_deployment: $ref: '#/definitions/DesiredDeployment' auto_release: $ref: '#/definitions/AutoRelease' AutoRelease: type: object properties: groups: type: array items: $ref: '#/definitions/AutoRelease.Group' CreateServiceReply: type: object properties: service: $ref: '#/definitions/Service' title: The entity created DeploymentStrategy: type: object properties: type: $ref: '#/definitions/DeploymentStrategyType' title: Strategy type DesiredDeployment: type: object properties: groups: type: array items: $ref: '#/definitions/DesiredDeployment.Group' DeploymentPort: type: object properties: port: type: integer format: int64 protocol: type: string title: One of http, http2, tcp DeploymentScalingTargetAverageCPU: type: object properties: value: type: integer format: int64 DeploymentScaling: type: object properties: scopes: type: array items: type: string min: type: integer format: int64 max: type: integer format: int64 targets: type: array items: $ref: '#/definitions/DeploymentScalingTarget' NeonPostgresDatabase: type: object properties: pg_version: type: integer format: int64 region: type: string instance_type: type: string roles: type: array items: $ref: '#/definitions/NeonPostgresDatabase.NeonRole' databases: type: array items: $ref: '#/definitions/NeonPostgresDatabase.NeonDatabase' ArchiveDeploymentMetadata: type: object properties: last_provisioned_deployment_id: type: string Service.Type: type: string enum: - INVALID_TYPE - WEB - WORKER - DATABASE - SANDBOX default: INVALID_TYPE ErrorField: type: object properties: field: type: string description: type: string Error: type: object properties: status: type: integer format: int32 code: type: string message: type: string DeploymentRoute: type: object properties: port: type: integer format: int64 path: type: string security_policies: $ref: '#/definitions/SecurityPolicies' google.rpc.Status: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: $ref: '#/definitions/google.protobuf.Any' ResumeServiceReply: type: object DatabaseSource: type: object properties: neon_postgres: $ref: '#/definitions/NeonPostgresDatabase' ListServicesReply: type: object properties: services: type: array items: $ref: '#/definitions/ServiceListItem' limit: type: integer format: int64 title: The limit in the request offset: type: integer format: int64 title: The offset in the request count: type: integer format: int64 title: The total number of items has_next: type: boolean title: If there is more items after in the collection DeploymentProvisioningInfo: type: object properties: sha: type: string description: The git sha for this build (we resolve the reference at the start of the build). image: type: string description: The docker image built as a result of this build. stages: type: array items: $ref: '#/definitions/DeploymentProvisioningInfo.Stage' description: Some info about the build. DeploymentScalingTargetAverageMem: type: object properties: value: type: integer format: int64 SecurityPolicies: type: object properties: basic_auths: type: array items: $ref: '#/definitions/BasicAuthPolicy' api_keys: type: array items: type: string DeploymentProvisioningInfo.Stage: type: object properties: name: type: string status: $ref: '#/definitions/DeploymentProvisioningInfo.Stage.Status' messages: type: array items: type: string started_at: type: string format: date-time finished_at: type: string format: date-time build_attempts: type: array items: $ref: '#/definitions/DeploymentProvisioningInfo.Stage.BuildAttempt' TriggerDeploymentMetadata: type: object properties: type: $ref: '#/definitions/TriggerDeploymentMetadata.TriggerType' actor: $ref: '#/definitions/TriggerDeploymentMetadata.ActorType' git: $ref: '#/definitions/TriggerGitDeploymentMetadata' TriggerGitDeploymentMetadata.Provider: type: string enum: - UNKNOWN - GITHUB default: UNKNOWN DeploymentNeonPostgresDatabaseInfo: type: object properties: active_time_seconds: type: string format: int64 compute_time_seconds: type: string format: int64 written_data_bytes: type: string format: int64 data_transfer_bytes: type: string format: int64 data_storage_bytes_hour: type: string format: int64 server_host: type: string server_port: type: integer format: int64 endpoint_state: type: string endpoint_last_active: type: string format: date-time default_branch_id: type: string default_branch_name: type: string default_branch_state: type: string default_branch_logical_size: type: string format: int64 roles: type: array items: $ref: '#/definitions/DeploymentNeonPostgresDatabaseInfoRole' Service: type: object properties: id: type: string created_at: type: string format: date-time updated_at: type: string format: date-time started_at: type: string format: date-time succeeded_at: type: string format: date-time paused_at: type: string format: date-time resumed_at: type: string format: date-time terminated_at: type: string format: date-time name: type: string type: $ref: '#/definitions/Service.Type' organization_id: type: string app_id: type: string status: $ref: '#/definitions/Service.Status' messages: type: array items: type: string version: type: string format: uint64 active_deployment_id: type: string latest_deployment_id: type: string last_provisioned_deployment_id: type: string state: $ref: '#/definitions/ServiceState' title: Legacy stuff life_cycle: $ref: '#/definitions/ServiceLifeCycle' GitSource: type: object properties: repository: type: string description: 'A url to a git repository (contains the provider as well) .e.g: github.com/koyeb/test.' branch: type: string title: A git branch that will be tracked for new commits and deployments will be created tag: type: string title: A git tag that should be built sha: type: string title: A git commit that should be built (useful for pinning to a commit, this will always be set when a deployment is created by a code push) build_command: type: string title: A command used to override the build command, run after all build steps — deprecated, use buildpack.build_command instead run_command: type: string title: A command used to override the default run command - deprecated, use buildpack.run_command instead no_deploy_on_push: type: boolean title: A flag to disable a new deployment when a push event is detected workdir: type: string title: A subdirectory to use as the build directory buildpack: $ref: '#/definitions/BuildpackBuilder' docker: $ref: '#/definitions/DockerBuilder' NeonPostgresDatabase.NeonRole: type: object properties: name: type: string secret: type: string TriggerDeploymentMetadata.ActorType: type: string enum: - UNKNOWN_ACTOR - USER - SYSTEM default: UNKNOWN_ACTOR DeploymentDefinition: type: object properties: name: type: string type: $ref: '#/definitions/DeploymentDefinition.Type' strategy: $ref: '#/definitions/DeploymentStrategy' routes: type: array items: $ref: '#/definitions/DeploymentRoute' ports: type: array items: $ref: '#/definitions/DeploymentPort' proxy_ports: type: array items: $ref: '#/definitions/DeploymentProxyPort' env: type: array items: $ref: '#/definitions/DeploymentEnv' regions: type: array items: type: string scalings: type: array items: $ref: '#/definitions/DeploymentScaling' instance_types: type: array items: $ref: '#/definitions/DeploymentInstanceType' health_checks: type: array items: $ref: '#/definitions/DeploymentHealthCheck' volumes: type: array items: $ref: '#/definitions/DeploymentVolume' config_files: type: array items: $ref: '#/definitions/ConfigFile' skip_cache: type: boolean docker: $ref: '#/definitions/DockerSource' git: $ref: '#/definitions/GitSource' database: $ref: '#/definitions/DatabaseSource' archive: $ref: '#/definitions/ArchiveSource' ProxyPortProtocol: type: string enum: - tcp default: tcp DockerSource: type: object properties: image: type: string command: type: string args: type: array items: type: string image_registry_secret: type: string entrypoint: type: array items: type: string privileged: type: boolean title: A flag to run the container in privileged mode AutocompleteReply: type: object properties: secrets: type: array items: type: string title: List of available secrets user_env: type: array items: type: string title: List of available user's environment variables system_env: type: array items: type: string title: List of available system's environment variables DeploymentScalingTarget: type: object properties: average_cpu: $ref: '#/definitions/DeploymentScalingTargetAverageCPU' average_mem: $ref: '#/definitions/DeploymentScalingTargetAverageMem' requests_per_second: $ref: '#/definitions/DeploymentScalingTargetRequestsPerSecond' concurrent_requests: $ref: '#/definitions/DeploymentScalingTargetConcurrentRequests' requests_response_time: $ref: '#/definitions/DeploymentScalingTargetRequestsResponseTime' sleep_idle_delay: $ref: '#/definitions/DeploymentScalingTargetSleepIdleDelay' DeploymentScalingTargetConcurrentRequests: type: object properties: value: type: integer format: int64 AutoRelease.Group: type: object properties: name: type: string repository: type: string git_ref: type: string title: 'A git ref to track (.e.g: refs/tags/ or refs/heads/' latest_sha: type: string title: The last hash that was resolved (used to avoid triggering releases when things haven't changed) title: Configuration extracted from the latest deployment in this deployment_group Deployment.Status: type: string enum: - PENDING - PROVISIONING - SCHEDULED - CANCELING - CANCELED - ALLOCATING - STARTING - HEALTHY - DEGRADED - UNHEALTHY - STOPPING - STOPPED - ERRORING - ERROR - STASHED - SLEEPING default: PENDING CreateService: type: object properties: app_id: type: string definition: $ref: '#/definitions/DeploymentDefinition' life_cycle: $ref: '#/definitions/ServiceLifeCycle' project_id: type: string title: (Optional) The project ID to associate with the service AutocompleteRequest: type: object properties: definition: $ref: '#/definitions/DeploymentDefinition' title: Deployment definition Deployment: type: object properties: id: type: string created_at: type: string format: date-time updated_at: type: string format: date-time allocated_at: type: string format: date-time started_at: type: string format: date-time succeeded_at: type: string format: date-time terminated_at: type: string format: date-time organization_id: type: string app_id: type: string service_id: type: string parent_id: type: string child_id: type: string status: $ref: '#/definitions/Deployment.Status' metadata: $ref: '#/definitions/DeploymentMetadata' definition: $ref: '#/definitions/DeploymentDefinition' messages: type: array items: type: string provisioning_info: $ref: '#/definitions/DeploymentProvisioningInfo' database_info: $ref: '#/definitions/DeploymentDatabaseInfo' skip_build: type: boolean role: $ref: '#/definitions/Deployment.Role' version: type: string format: uint64 deployment_group: type: string DeploymentInstanceType: type: object properties: scopes: type: array items: type: string type: type: string ServiceEvent: type: object properties: id: type: string when: type: string format: date-time organization_id: type: string service_id: type: string type: type: string message: type: string metadata: type: object DeploymentEnv: type: object properties: scopes: type: array items: type: string key: type: string value: type: string secret: type: string NeonPostgresDatabaseDeploymentMetadata: type: object properties: reset_role_passwords: type: array items: type: string DeploymentScalingTargetRequestsPerSecond: type: object properties: value: type: integer format: int64 ManualServiceScaling: type: object properties: scopes: type: array items: type: string instances: type: integer format: int64 HTTPHeader: type: object properties: key: type: string value: type: string DeploymentNeonPostgresDatabaseInfoRole: type: object properties: name: type: string secret_id: type: string TCPHealthCheck: type: object properties: port: type: integer format: int64 title: The port to use to perform the health check, must be declared in the ports section ConfigFile: type: object properties: path: type: string title: the path where the file is copied permissions: type: string title: the permissions of the file in format 0644 content: type: string title: the content of the file UpdateServiceScalingReply: type: object title: Empty reply - success is indicated by no error DeploymentVolume: type: object properties: id: type: string title: the id of the volume path: type: string title: the path where the volume is mounted to replica_index: type: integer format: int64 title: optionally, explicitly choose the replica index to mount the volume to scopes: type: array items: type: string title: scope of the associated GetServiceReply: type: object properties: service: $ref: '#/definitions/Service' title: The Service retrieved securityDefinitions: Bearer: type: apiKey name: Authorization in: header x-tagGroups: - name: Introduction tags: - intro - name: API tags: - Profile - Sessions - Users - organization - OrganizationMembers - OrganizationInvitations - OrganizationConfirmations - Subscriptions - Coupons - Credentials - Secrets - activity - Apps - Services - Deployments - Archives - RegionalDeployments - Instances - Domains - PersistentVolumes - Snapshots - Compose - Repositories - Logs - Metrics - Catalog - CatalogRegions - CatalogInstances - Usages - Summary - DockerHelper