swagger: '2.0' info: title: Koyeb Rest activity RegionalDeployments 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: RegionalDeployments paths: /v1/regional_deployment_events: get: summary: List Regional Deployment events operationId: ListRegionalDeploymentEvents responses: '200': description: A successful response. schema: $ref: '#/definitions/ListRegionalDeploymentEventsReply' '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: regional_deployment_id description: (Optional) Filter on regional deployment id in: query required: false type: string - name: types description: (Optional) Filter on regional deployment 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: - RegionalDeployments /v1/regional_deployments: get: summary: List Regional Deployments description: 'Experimental: use at your own risk' operationId: ListRegionalDeployments responses: '200': description: A successful response. schema: $ref: '#/definitions/ListRegionalDeploymentsReply' '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: deployment_id description: (Optional) Filter on deployment id 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 tags: - RegionalDeployments /v1/regional_deployments/{id}: get: summary: Get Regional Deployment description: 'Experimental: use at your own risk' operationId: GetRegionalDeployment responses: '200': description: A successful response. schema: $ref: '#/definitions/GetRegionalDeploymentReply' '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 regional deployment in: path required: true type: string tags: - RegionalDeployments definitions: RegionalDeploymentDefinition: type: object properties: name: type: string type: $ref: '#/definitions/RegionalDeploymentDefinition.Type' strategy: $ref: '#/definitions/DeploymentStrategy' routes: type: array items: $ref: '#/definitions/Route' ports: type: array items: $ref: '#/definitions/Port' env: type: array items: $ref: '#/definitions/Env' region: type: string scaling: $ref: '#/definitions/Scaling' instance_type: type: string deployment_group: type: string health_checks: type: array items: $ref: '#/definitions/DeploymentHealthCheck' volumes: type: array items: $ref: '#/definitions/RegionalDeploymentVolume' config_files: type: array items: $ref: '#/definitions/ConfigFile' skip_cache: type: boolean docker: $ref: '#/definitions/DockerSource' git: $ref: '#/definitions/GitSource' archive: $ref: '#/definitions/ArchiveSource' 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' RegionalDeploymentVolume: 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: the replica index to mount the volume to RegionalDeploymentListItem: type: object properties: id: type: string created_at: type: string format: date-time updated_at: type: string format: date-time region: type: string status: $ref: '#/definitions/RegionalDeployment.Status' messages: type: array items: type: string definition: $ref: '#/definitions/RegionalDeploymentDefinition' BasicAuthPolicy: type: object properties: username: type: string password: type: string 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. DeploymentStrategy: type: object properties: type: $ref: '#/definitions/DeploymentStrategyType' title: Strategy type RegionalDeploymentDefinition.Type: type: string enum: - INVALID - WEB - WORKER - _ - SANDBOX default: INVALID title: '- _: We match with DeploymentDefinition.Type, so we skip 3 which is DATABASE' 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 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 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 DeploymentScalingTargetAverageCPU: type: object properties: value: type: integer format: int64 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 RegionalDeploymentMetadata: type: object Route: type: object properties: port: type: integer format: int64 path: type: string security_policies: $ref: '#/definitions/SecurityPolicies' RegionalDeployment.Status: type: string enum: - PENDING - PROVISIONING - SCHEDULED - CANCELING - CANCELED - ALLOCATING - STARTING - HEALTHY - DEGRADED - UNHEALTHY - STOPPING - STOPPED - ERRORING - ERROR - SLEEPING default: PENDING 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." ListRegionalDeploymentEventsReply: type: object properties: events: type: array items: $ref: '#/definitions/RegionalDeploymentEvent' 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 ErrorWithFields: type: object properties: status: type: integer format: int32 code: type: string message: type: string fields: type: array items: $ref: '#/definitions/ErrorField' RegionalDeployment.Role: type: string enum: - INVALID - ACTIVE - UPCOMING - CURRENT default: INVALID 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 ArchiveSource: type: object properties: id: type: string title: The ID of the archive to deploy buildpack: $ref: '#/definitions/BuildpackBuilder' docker: $ref: '#/definitions/DockerBuilder' google.rpc.Status: type: object properties: code: type: integer format: int32 message: type: string details: type: array items: $ref: '#/definitions/google.protobuf.Any' DeploymentProvisioningInfo.Stage.Status: type: string enum: - UNKNOWN - PENDING - RUNNING - FAILED - COMPLETED - ABORTED default: UNKNOWN GetRegionalDeploymentReply: type: object properties: regional_deployment: $ref: '#/definitions/RegionalDeployment' Scaling: type: object properties: min: type: integer format: int64 max: type: integer format: int64 targets: type: array items: $ref: '#/definitions/DeploymentScalingTarget' 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 DeploymentScalingTargetRequestsPerSecond: type: object properties: value: type: integer format: int64 HTTPHeader: type: object properties: key: type: string value: 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' Env: type: object properties: key: type: string value: type: string secret: type: string RegionalDeploymentEvent: type: object properties: id: type: string when: type: string format: date-time organization_id: type: string regional_deployment_id: type: string type: type: string message: type: string metadata: type: object 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. 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 DeploymentScalingTargetAverageMem: type: object properties: value: type: integer format: int64 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 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 SecurityPolicies: type: object properties: basic_auths: type: array items: $ref: '#/definitions/BasicAuthPolicy' api_keys: type: array items: type: string 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.' google.protobuf.Any: type: object properties: '@type': type: string additionalProperties: {} 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' ListRegionalDeploymentsReply: type: object properties: regional_deployments: type: array items: $ref: '#/definitions/RegionalDeploymentListItem' title: The collection of regional deployments 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 Port: type: object properties: port: type: integer format: int64 protocol: type: string RegionalDeployment: type: object properties: id: type: string created_at: type: string format: date-time updated_at: type: string format: date-time scheduled_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 region: type: string parent_id: type: string child_id: type: string status: $ref: '#/definitions/RegionalDeployment.Status' messages: type: array items: type: string definition: $ref: '#/definitions/RegionalDeploymentDefinition' datacenters: type: array items: type: string metadata: $ref: '#/definitions/RegionalDeploymentMetadata' provisioning_info: $ref: '#/definitions/DeploymentProvisioningInfo' role: $ref: '#/definitions/RegionalDeployment.Role' version: type: string format: uint64 deployment_group: type: string title: Legacy stuff deployment_id: type: string 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