diff --git a/specification/DigitalOcean-public.v2.yaml b/specification/DigitalOcean-public.v2.yaml index 18d9497a1..9a5103102 100644 --- a/specification/DigitalOcean-public.v2.yaml +++ b/specification/DigitalOcean-public.v2.yaml @@ -651,6 +651,14 @@ paths: post: $ref: 'resources/apps/apps_revert_rollback.yml' + /v2/apps/buildpacks: + get: + $ref: 'resources/apps/apps_list_buildpacks.yml' + + /v2/apps/{app_id}/upgrade_buildpack: + post: + $ref: 'resources/apps/apps_upgrade_buildpack.yml' + /v2/cdn/endpoints: get: $ref: 'resources/cdn/cdn_list_endpoints.yml' diff --git a/specification/resources/apps/apps_list_buildpacks.yml b/specification/resources/apps/apps_list_buildpacks.yml new file mode 100755 index 000000000..494f2b552 --- /dev/null +++ b/specification/resources/apps/apps_list_buildpacks.yml @@ -0,0 +1,35 @@ +operationId: apps_list_buildpacks + +summary: List Buildpacks + +description: >- + List all buildpacks available on App Platform. + + + Buildpacks are one of the ways App Platform can build apps from source. For more information, see: [Builds with Buildpacks](https://docs.digitalocean.com/products/app-platform/reference/buildpacks/). + +tags: + - Apps + +responses: + "200": + $ref: responses/list_buildpacks.yml + + "401": + $ref: ../../shared/responses/unauthorized.yml + + "429": + $ref: "../../shared/responses/too_many_requests.yml" + + "500": + $ref: ../../shared/responses/server_error.yml + + default: + $ref: ../../shared/responses/unexpected_error.yml + +x-codeSamples: + - $ref: "examples/curl/apps_list_buildpacks.yml" + +security: + - bearer_auth: + - "read" diff --git a/specification/resources/apps/apps_upgrade_buildpack.yml b/specification/resources/apps/apps_upgrade_buildpack.yml new file mode 100644 index 000000000..c65b3f97c --- /dev/null +++ b/specification/resources/apps/apps_upgrade_buildpack.yml @@ -0,0 +1,54 @@ +operationId: apps_upgrade_buildpack + +summary: Upgrade App Buildpack + +description: | + Upgrade an app's buildpack to a newer major version line. + + + The buildpack must already be part of the app's build + configuration. The "Retrieve an Existing App" operation will return the app's build configuration. In it, a buildpack + with a `latest` value of `false` indicates that an major version upgrade is available. + + + Before upgrading a buildpack, make sure to inspect its documentation page for the changelog as major version upgrades + are likely to introduce breaking changes to the buildpack's operation. + +tags: + - Apps + +parameters: + - $ref: parameters.yml#/app_id + +requestBody: + content: + application/json: + schema: + $ref: models/apps_upgrade_buildpack_request.yml + required: true + +responses: + "200": + $ref: responses/apps_upgrade_buildpack.yml + + "401": + $ref: ../../shared/responses/unauthorized.yml + + "404": + $ref: "../../shared/responses/not_found.yml" + + "429": + $ref: "../../shared/responses/too_many_requests.yml" + + "500": + $ref: ../../shared/responses/server_error.yml + + default: + $ref: ../../shared/responses/unexpected_error.yml + +x-codeSamples: + - $ref: "examples/curl/apps_upgrade_buildpack.yml" + +security: + - bearer_auth: + - "write" diff --git a/specification/resources/apps/examples/curl/apps_list_buildpacks.yml b/specification/resources/apps/examples/curl/apps_list_buildpacks.yml new file mode 100644 index 000000000..a3dbbd800 --- /dev/null +++ b/specification/resources/apps/examples/curl/apps_list_buildpacks.yml @@ -0,0 +1,6 @@ +lang: cURL +source: |- + curl -X GET \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ + "https://api.digitalocean.com/v2/apps/buildpacks" diff --git a/specification/resources/apps/examples/curl/apps_upgrade_buildpack.yml b/specification/resources/apps/examples/curl/apps_upgrade_buildpack.yml new file mode 100644 index 000000000..5cce58fa5 --- /dev/null +++ b/specification/resources/apps/examples/curl/apps_upgrade_buildpack.yml @@ -0,0 +1,7 @@ +lang: cURL +source: |- + curl -X POST \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ + -d '{ "id": "digitalocean/node" }' \ + "https://api.digitalocean.com/v2/apps/{app_id}/upgrade_buildpack" diff --git a/specification/resources/apps/models/app.yml b/specification/resources/apps/models/app.yml index 0651cec55..cca68f0d8 100755 --- a/specification/resources/apps/models/app.yml +++ b/specification/resources/apps/models/app.yml @@ -74,8 +74,10 @@ properties: example: 2020-12-01T00:42:16Z pinned_deployment: allOf: - - description: The deployment that the app is pinned to. + - description: The deployment that the app is pinned to following a rollback. - $ref: apps_deployment.yml + build_config: + $ref: app_build_config.yml required: -- spec + - spec type: object diff --git a/specification/resources/apps/models/app_build_config.yml b/specification/resources/apps/models/app_build_config.yml new file mode 100644 index 000000000..9951e0bb0 --- /dev/null +++ b/specification/resources/apps/models/app_build_config.yml @@ -0,0 +1,19 @@ +title: The app's build configuration. +type: object +properties: + cnb_versioning: + type: object + description: >- + Versioning configuration for Cloud Native Buildpacks-based builds. + + + Buildpacks are one of the ways App Platform can build apps from source. For more information, see: + [Builds with Buildpacks](https://docs.digitalocean.com/products/app-platform/reference/buildpacks/). + properties: + buildpacks: + type: array + description: >- + A list of versioned buildpacks used for the app's builds. Buildpacks are versioned at the major semver version + component, therefore exact version numbers are not available in the app's build configuration. + items: + $ref: apps_buildpack.yml diff --git a/specification/resources/apps/models/apps_buildpack.yml b/specification/resources/apps/models/apps_buildpack.yml new file mode 100755 index 000000000..704a13153 --- /dev/null +++ b/specification/resources/apps/models/apps_buildpack.yml @@ -0,0 +1,38 @@ +properties: + id: + title: The buildpack's ID. + type: string + example: digitalocean/node + version: + title: The buildpack's version number. + type: string + format: semver + example: "1.2.0" + major_version: + title: The major component of the buildpack's version number. This signifies the "major version line" of the buildpack. + type: integer + format: int32 + example: 1 + latest: + title: >- + Indicates whether the buildpack is on the latest major version line available. A value of `false` means there is + another buildpack with the same ID and a newer major version. + type: boolean + example: true + name: + title: A human-friendly name. + type: string + example: Node.js + description: + items: + type: string + title: A description of the buildpack's purpose and steps performed at build time. + type: array + example: + - Install Node.js, NPM, and Yarn. + - Install dependencies using `npm ci` or `yarn install`. + docs_link: + title: A link to the buildpack's documentation. + type: string + example: https://docs.digitalocean.com/products/app-platform/reference/buildpacks/nodejs/ +type: object diff --git a/specification/resources/apps/models/apps_deployment_job.yml b/specification/resources/apps/models/apps_deployment_job.yml index 6c6a821e9..9eb8979f7 100755 --- a/specification/resources/apps/models/apps_deployment_job.yml +++ b/specification/resources/apps/models/apps_deployment_job.yml @@ -4,7 +4,11 @@ properties: type: string example: migrate-db source_commit_hash: - title: The commit hash of the repository that was used to build this job + title: The commit hash of the repository that was used to build this job if a Git source was used type: string example: 54d4a727f457231062439895000d45437c7bb405 + source_image_digest: + title: The digest of the container image that was used for this job if an Image source was used + type: string + example: sha256:0285555a44f1a279ea91428ebb7ec27d2110f623739838837b070611060cd992 type: object diff --git a/specification/resources/apps/models/apps_deployment_service.yml b/specification/resources/apps/models/apps_deployment_service.yml index 91e30bb1a..d7a4fc72f 100755 --- a/specification/resources/apps/models/apps_deployment_service.yml +++ b/specification/resources/apps/models/apps_deployment_service.yml @@ -4,7 +4,17 @@ properties: type: string example: web source_commit_hash: - title: The commit hash of the repository that was used to build this service + title: The commit hash of the repository that was used to build this service if a Git source was used type: string example: 54d4a727f457231062439895000d45437c7bb405 + source_image_digest: + title: The digest of the container image that was used for this service if an Image source was used + type: string + example: sha256:0285555a44f1a279ea91428ebb7ec27d2110f623739838837b070611060cd992 + buildpacks: + type: array + items: + $ref: apps_buildpack.yml + description: >- + The list of buildpacks used to build this component. The buildpacks' full version numbers are included. type: object diff --git a/specification/resources/apps/models/apps_deployment_static_site.yml b/specification/resources/apps/models/apps_deployment_static_site.yml index 3939d28a4..ffaceb83d 100755 --- a/specification/resources/apps/models/apps_deployment_static_site.yml +++ b/specification/resources/apps/models/apps_deployment_static_site.yml @@ -7,4 +7,10 @@ properties: title: The commit hash of the repository that was used to build this static site type: string example: 54d4a727f457231062439895000d45437c7bb405 + buildpacks: + type: array + items: + $ref: apps_buildpack.yml + description: >- + The list of buildpacks used to build this component. The buildpacks' full version numbers are included. type: object diff --git a/specification/resources/apps/models/apps_deployment_worker.yml b/specification/resources/apps/models/apps_deployment_worker.yml index c0917aa95..eff2bd545 100755 --- a/specification/resources/apps/models/apps_deployment_worker.yml +++ b/specification/resources/apps/models/apps_deployment_worker.yml @@ -4,7 +4,11 @@ properties: type: string example: queue-runner source_commit_hash: - title: The commit hash of the repository that was used to build this worker + title: The commit hash of the repository that was used to build this worker if a Git source was used type: string example: 54d4a727f457231062439895000d45437c7bb405 + source_image_digest: + title: The digest of the container image that was used for this worker if an Image source was used + type: string + example: sha256:0285555a44f1a279ea91428ebb7ec27d2110f623739838837b070611060cd992 type: object diff --git a/specification/resources/apps/models/apps_list_buildpacks_response.yml b/specification/resources/apps/models/apps_list_buildpacks_response.yml new file mode 100755 index 000000000..024a11cd5 --- /dev/null +++ b/specification/resources/apps/models/apps_list_buildpacks_response.yml @@ -0,0 +1,6 @@ +properties: + buildpacks: + items: + $ref: apps_buildpack.yml + type: array +type: object diff --git a/specification/resources/apps/models/apps_upgrade_buildpack_request.yml b/specification/resources/apps/models/apps_upgrade_buildpack_request.yml new file mode 100644 index 000000000..194ff4cbd --- /dev/null +++ b/specification/resources/apps/models/apps_upgrade_buildpack_request.yml @@ -0,0 +1,22 @@ +type: object +properties: + buildpack_id: + type: string + description: The ID of the buildpack to upgrade. + example: digitalocean/node + major_version: + type: integer + format: int32 + description: >- + The major version line to upgrade the buildpack to. If omitted, the latest available major version line will be + used. + example: 2 + trigger_deployment: + type: boolean + description: >- + Whether to trigger a new app deployment to apply the buildpack upgrade. If `false`, the upgrade will be applied by + the next app deployment. + default: true + example: true +required: + - buildpack_id diff --git a/specification/resources/apps/responses/apps_upgrade_buildpack.yml b/specification/resources/apps/responses/apps_upgrade_buildpack.yml new file mode 100644 index 000000000..311ea972f --- /dev/null +++ b/specification/resources/apps/responses/apps_upgrade_buildpack.yml @@ -0,0 +1,34 @@ +description: A JSON object with the upgrade results. + +content: + application/json: + schema: + type: object + properties: + affected_components: + type: array + description: Contains a list of components affected by the buildpack upgrade. + items: + type: string + example: + - component name + deployment: + allOf: + - description: >- + The new deployment that was created for the buildpack upgrade if `trigger_deployment` was + specified in the request. + - $ref: ../models/apps_deployment.yml + examples: + Request with `trigger_deployment` set to `false`: + value: + affected_components: + - api + - frontend + +headers: + ratelimit-limit: + $ref: ../../../shared/headers.yml#/ratelimit-limit + ratelimit-remaining: + $ref: ../../../shared/headers.yml#/ratelimit-remaining + ratelimit-reset: + $ref: ../../../shared/headers.yml#/ratelimit-reset diff --git a/specification/resources/apps/responses/examples.yml b/specification/resources/apps/responses/examples.yml index e36cc6295..d2097e98c 100644 --- a/specification/resources/apps/responses/examples.yml +++ b/specification/resources/apps/responses/examples.yml @@ -51,21 +51,21 @@ apps: - name: build status: SUCCESS steps: - - name: initialize - status: SUCCESS - started_at: 2020-12-01T00:40:11.979305214Z - ended_at: 2020-12-01T00:40:12.470972033Z - - name: components - status: SUCCESS - steps: - - name: sample-php + - name: initialize status: SUCCESS - started_at: 0001-01-01T00:00:00Z - ended_at: 0001-01-01T00:00:00Z - component_name: sample-php - message_base: Building service - started_at: 2020-12-01T00:40:12.470996857Z - ended_at: 2020-12-01T00:41:26.180360487Z + started_at: 2020-12-01T00:40:11.979305214Z + ended_at: 2020-12-01T00:40:12.470972033Z + - name: components + status: SUCCESS + steps: + - name: sample-php + status: SUCCESS + started_at: 0001-01-01T00:00:00Z + ended_at: 0001-01-01T00:00:00Z + component_name: sample-php + message_base: Building service + started_at: 2020-12-01T00:40:12.470996857Z + ended_at: 2020-12-01T00:41:26.180360487Z started_at: 2020-12-01T00:40:11.979257919Z ended_at: 2020-12-01T00:41:26.653989756Z phase: ACTIVE @@ -78,15 +78,14 @@ apps: flag: germany continent: Europe data_centers: - - fra1 + - fra1 tier_slug: basic live_url_base: https://sample-php-iaj87.ondigitalocean.app live_domain: sample-php-iaj87.ondigitalocean.app links: pages: {} meta: - total: - 1 + total: 1 app: value: @@ -96,26 +95,6 @@ app: spec: name: sample-golang services: - - name: web - github: - repo: ChiefMateStarbuck/sample-golang - branch: main - run_command: bin/sample-golang - environment_slug: go - instance_size_slug: basic-xxs - instance_count: 1 - http_port: 8080 - routes: - - path: "/" - region: ams - default_ingress: https://sample-golang-zyhgn.ondigitalocean.app - created_at: '2021-02-10T16:45:14Z' - updated_at: '2021-02-10T17:06:56Z' - active_deployment: - id: 991dfa59-6a23-459f-86d6-67dfa2c6f1e3 - spec: - name: sample-golang - services: - name: web github: repo: ChiefMateStarbuck/sample-golang @@ -126,70 +105,90 @@ app: instance_count: 1 http_port: 8080 routes: - - path: "/" + - path: "/" + region: ams + default_ingress: https://sample-golang-zyhgn.ondigitalocean.app + created_at: "2021-02-10T16:45:14Z" + updated_at: "2021-02-10T17:06:56Z" + active_deployment: + id: 991dfa59-6a23-459f-86d6-67dfa2c6f1e3 + spec: + name: sample-golang + services: + - name: web + github: + repo: ChiefMateStarbuck/sample-golang + branch: main + run_command: bin/sample-golang + environment_slug: go + instance_size_slug: basic-xxs + instance_count: 1 + http_port: 8080 + routes: + - path: "/" region: ams services: - - name: web - source_commit_hash: db6936cb46047c576962962eed81ad52c21f35d7 - phase_last_updated_at: '2021-02-10T17:06:53Z' - created_at: '2021-02-10T17:05:30Z' - updated_at: '2021-02-10T17:06:53Z' + - name: web + source_commit_hash: db6936cb46047c576962962eed81ad52c21f35d7 + phase_last_updated_at: "2021-02-10T17:06:53Z" + created_at: "2021-02-10T17:05:30Z" + updated_at: "2021-02-10T17:06:53Z" cause: manual progress: success_steps: 6 total_steps: 6 steps: - - name: build - status: SUCCESS - steps: - - name: initialize - status: SUCCESS - started_at: '2021-02-10T17:05:35.572347485Z' - ended_at: '2021-02-10T17:05:36.093995229Z' - - name: components + - name: build status: SUCCESS steps: - - name: web - status: SUCCESS - component_name: web - message_base: Building service - started_at: '2021-02-10T17:05:36.094015928Z' - ended_at: '2021-02-10T17:06:19.461737040Z' - started_at: '2021-02-10T17:05:35.572287990Z' - ended_at: '2021-02-10T17:06:19.807834070Z' - - name: deploy - status: SUCCESS - steps: - - name: initialize - status: SUCCESS - started_at: '2021-02-10T17:06:25.143957508Z' - ended_at: '2021-02-10T17:06:26.120343872Z' - - name: components + - name: initialize + status: SUCCESS + started_at: "2021-02-10T17:05:35.572347485Z" + ended_at: "2021-02-10T17:05:36.093995229Z" + - name: components + status: SUCCESS + steps: + - name: web + status: SUCCESS + component_name: web + message_base: Building service + started_at: "2021-02-10T17:05:36.094015928Z" + ended_at: "2021-02-10T17:06:19.461737040Z" + started_at: "2021-02-10T17:05:35.572287990Z" + ended_at: "2021-02-10T17:06:19.807834070Z" + - name: deploy status: SUCCESS steps: - - name: web - status: SUCCESS - steps: - - name: deploy + - name: initialize status: SUCCESS - component_name: web - message_base: Deploying service - - name: wait + started_at: "2021-02-10T17:06:25.143957508Z" + ended_at: "2021-02-10T17:06:26.120343872Z" + - name: components status: SUCCESS - component_name: web - message_base: Waiting for service - component_name: web - started_at: '2021-02-10T17:06:26.120385561Z' - ended_at: '2021-02-10T17:06:50.029695913Z' - - name: finalize - status: SUCCESS - started_at: '2021-02-10T17:06:50.348459495Z' - ended_at: '2021-02-10T17:06:53.404065961Z' - started_at: '2021-02-10T17:06:25.143932418Z' - ended_at: '2021-02-10T17:06:53.404104185Z' + steps: + - name: web + status: SUCCESS + steps: + - name: deploy + status: SUCCESS + component_name: web + message_base: Deploying service + - name: wait + status: SUCCESS + component_name: web + message_base: Waiting for service + component_name: web + started_at: "2021-02-10T17:06:26.120385561Z" + ended_at: "2021-02-10T17:06:50.029695913Z" + - name: finalize + status: SUCCESS + started_at: "2021-02-10T17:06:50.348459495Z" + ended_at: "2021-02-10T17:06:53.404065961Z" + started_at: "2021-02-10T17:06:25.143932418Z" + ended_at: "2021-02-10T17:06:53.404104185Z" phase: ACTIVE tier_slug: basic - last_deployment_created_at: '2021-02-10T17:05:30Z' + last_deployment_created_at: "2021-02-10T17:05:30Z" live_url: https://sample-golang-zyhgn.ondigitalocean.app region: slug: ams @@ -197,11 +196,24 @@ app: flag: netherlands continent: Europe data_centers: - - ams3 + - ams3 tier_slug: basic live_url_base: https://sample-golang-zyhgn.ondigitalocean.app live_domain: sample-golang-zyhgn.ondigitalocean.app project_id: 88b72d1a-b78a-4d9f-9090-b53c4399073f + build_config: + cnb_versioning: + buildpacks: + - id: digitalocean/python + major_version: 1 + latest: true + name: Python + docs_link: https://docs.digitalocean.com/products/app-platform/reference/buildpacks/python/ + - id: digitalocean/node + major_version: 0 + latest: false + name: Node.js (v0, deprecated) + docs_link: https://docs.digitalocean.com/products/app-platform/reference/buildpacks/nodejs/ deployments: value: @@ -224,6 +236,12 @@ deployments: services: - name: web source_commit_hash: 9a4df0b8e161e323bc3cdf1dc71878080fe144fa + buildpacks: + - id: digitalocean/go + major_version: 1 + latest: true + name: Golang + docs_link: https://docs.digitalocean.com/products/app-platform/reference/buildpacks/go/ phase_last_updated_at: 0001-01-01T00:00:00Z created_at: 2020-07-28T18:00:00Z updated_at: 2020-07-28T18:00:00Z @@ -232,47 +250,46 @@ deployments: pending_steps: 6 total_steps: 6 steps: - - name: build - status: PENDING - steps: - - name: initialize - status: PENDING - - name: components + - name: build status: PENDING steps: - - name: web - status: PENDING - component_name: web - message_base: Building service - - name: deploy - status: PENDING - steps: - - name: initialize - status: PENDING - - name: components + - name: initialize + status: PENDING + - name: components + status: PENDING + steps: + - name: web + status: PENDING + component_name: web + message_base: Building service + - name: deploy status: PENDING steps: - - name: web - status: PENDING - steps: - - name: deploy + - name: initialize status: PENDING - component_name: web - message_base: Deploying service - - name: wait + - name: components + status: PENDING + steps: + - name: web + status: PENDING + steps: + - name: deploy + status: PENDING + component_name: web + message_base: Deploying service + - name: wait + status: PENDING + component_name: web + message_base: Waiting for service + component_name: web + - name: finalize status: PENDING - component_name: web - message_base: Waiting for service - component_name: web - - name: finalize - status: PENDING phase: PENDING_BUILD tier_slug: basic links: pages: {} meta: - total: - 1 + total: 1 deployment: value: @@ -295,6 +312,12 @@ deployment: services: - name: web source_commit_hash: 9a4df0b8e161e323bc3cdf1dc71878080fe144fa + buildpacks: + - id: digitalocean/go + major_version: 1 + latest: true + name: Golang + docs_link: https://docs.digitalocean.com/products/app-platform/reference/buildpacks/go/ phase_last_updated_at: 0001-01-01T00:00:00Z created_at: 2020-07-28T18:00:00Z updated_at: 2020-07-28T18:00:00Z @@ -303,67 +326,66 @@ deployment: pending_steps: 6 total_steps: 6 steps: - - name: build - status: PENDING - steps: - - name: initialize - status: PENDING - - name: components + - name: build status: PENDING steps: - - name: web - status: PENDING - component_name: web - message_base: Building service - - name: deploy - status: PENDING - steps: - - name: initialize - status: PENDING - - name: components + - name: initialize + status: PENDING + - name: components + status: PENDING + steps: + - name: web + status: PENDING + component_name: web + message_base: Building service + - name: deploy status: PENDING steps: - - name: web - status: PENDING - steps: - - name: deploy + - name: initialize status: PENDING - component_name: web - message_base: Deploying service - - name: wait + - name: components + status: PENDING + steps: + - name: web + status: PENDING + steps: + - name: deploy + status: PENDING + component_name: web + message_base: Deploying service + - name: wait + status: PENDING + component_name: web + message_base: Waiting for service + component_name: web + - name: finalize status: PENDING - component_name: web - message_base: Waiting for service - component_name: web - - name: finalize - status: PENDING phase: PENDING_BUILD tier_slug: basic - tiers: value: tiers: - - name: Starter - slug: starter - egress_bandwidth_bytes: '1073741824' - build_seconds: '6000' - - name: Basic - slug: basic - egress_bandwidth_bytes: '42949672960' - build_seconds: '24000' - - name: Professional - slug: professional - egress_bandwidth_bytes: '107374182400' - build_seconds: '60000' + - name: Starter + slug: starter + egress_bandwidth_bytes: "1073741824" + build_seconds: "6000" + - name: Basic + slug: basic + egress_bandwidth_bytes: "42949672960" + build_seconds: "24000" + - name: Professional + slug: professional + egress_bandwidth_bytes: "107374182400" + build_seconds: "60000" tier: value: tier: name: Basic slug: basic - egress_bandwidth_bytes: '42949672960' - build_seconds: '24000' + egress_bandwidth_bytes: "42949672960" + build_seconds: "24000" logs: value: @@ -375,150 +397,150 @@ logs: regions: value: regions: - - slug: ams - label: Amsterdam - flag: netherlands - continent: Europe - data_centers: - - ams3 - - slug: nyc - label: New York - flag: usa - continent: North America - data_centers: - - nyc1 - - nyc3 - default: true - - slug: fra - label: Frankfurt - flag: germany - continent: Europe - data_centers: - - fra1 - - slug: sfo - label: San Francisco - flag: usa - continent: North America - data_centers: - - sfo3 - - slug: sgp - label: Singapore - flag: singapore - continent: Asia - data_centers: - - sgp1 - - slug: blr - label: Bangalore - flag: india - continent: Asia - data_centers: - - blr1 - - slug: tor - label: Toronto - flag: canada - continent: North America - data_centers: - - tor1 - - slug: lon - label: London - flag: uk - continent: Europe - data_centers: - - lon1 + - slug: ams + label: Amsterdam + flag: netherlands + continent: Europe + data_centers: + - ams3 + - slug: nyc + label: New York + flag: usa + continent: North America + data_centers: + - nyc1 + - nyc3 + default: true + - slug: fra + label: Frankfurt + flag: germany + continent: Europe + data_centers: + - fra1 + - slug: sfo + label: San Francisco + flag: usa + continent: North America + data_centers: + - sfo3 + - slug: sgp + label: Singapore + flag: singapore + continent: Asia + data_centers: + - sgp1 + - slug: blr + label: Bangalore + flag: india + continent: Asia + data_centers: + - blr1 + - slug: tor + label: Toronto + flag: canada + continent: North America + data_centers: + - tor1 + - slug: lon + label: London + flag: uk + continent: Europe + data_centers: + - lon1 instance_sizes: value: instance_sizes: - - name: Basic XXS - slug: basic-xxs - cpu_type: SHARED - cpus: '1' - memory_bytes: '536870912' - usd_per_month: '5.00' - usd_per_second: '0.000002066799' - tier_slug: basic - tier_upgrade_to: professional-xs - - name: Basic XS - slug: basic-xs - cpu_type: SHARED - cpus: '1' - memory_bytes: '1073741824' - usd_per_month: '10.00' - usd_per_second: '0.000004133598' - tier_slug: basic - tier_upgrade_to: professional-xs - - name: Basic S - slug: basic-s - cpu_type: SHARED - cpus: '1' - memory_bytes: '2147483648' - usd_per_month: '20.00' - usd_per_second: '0.000008267196' - tier_slug: basic - tier_upgrade_to: professional-s - - name: Basic M - slug: basic-m - cpu_type: SHARED - cpus: '2' - memory_bytes: '4294967296' - usd_per_month: '40.00' - usd_per_second: '0.000016534392' - tier_slug: basic - tier_upgrade_to: professional-m - - name: Professional XS - slug: professional-xs - cpu_type: SHARED - cpus: '1' - memory_bytes: '1073741824' - usd_per_month: '12.00' - usd_per_second: '0.000004960317' - tier_slug: professional - tier_downgrade_to: basic-xs - - name: Professional S - slug: professional-s - cpu_type: SHARED - cpus: '1' - memory_bytes: '2147483648' - usd_per_month: '25.00' - usd_per_second: '0.000010333995' - tier_slug: professional - tier_downgrade_to: basic-s - - name: Professional M - slug: professional-m - cpu_type: SHARED - cpus: '2' - memory_bytes: '4294967296' - usd_per_month: '50.00' - usd_per_second: '0.000020667989' - tier_slug: professional - tier_downgrade_to: basic-s - - name: Professional 1L - slug: professional-1l - cpu_type: DEDICATED - cpus: '1' - memory_bytes: '4294967296' - usd_per_month: '75.00' - usd_per_second: '0.000031001984' - tier_slug: professional - tier_downgrade_to: basic-m - - name: Professional L - slug: professional-l - cpu_type: DEDICATED - cpus: '2' - memory_bytes: '8589934592' - usd_per_month: '150.00' - usd_per_second: '0.000062003968' - tier_slug: professional - tier_downgrade_to: basic-s - - name: Professional XL - slug: professional-xl - cpu_type: DEDICATED - cpus: '4' - memory_bytes: '17179869184' - usd_per_month: '300.00' - usd_per_second: '0.000124007937' - tier_slug: professional - tier_downgrade_to: basic-s + - name: Basic XXS + slug: basic-xxs + cpu_type: SHARED + cpus: "1" + memory_bytes: "536870912" + usd_per_month: "5.00" + usd_per_second: "0.000002066799" + tier_slug: basic + tier_upgrade_to: professional-xs + - name: Basic XS + slug: basic-xs + cpu_type: SHARED + cpus: "1" + memory_bytes: "1073741824" + usd_per_month: "10.00" + usd_per_second: "0.000004133598" + tier_slug: basic + tier_upgrade_to: professional-xs + - name: Basic S + slug: basic-s + cpu_type: SHARED + cpus: "1" + memory_bytes: "2147483648" + usd_per_month: "20.00" + usd_per_second: "0.000008267196" + tier_slug: basic + tier_upgrade_to: professional-s + - name: Basic M + slug: basic-m + cpu_type: SHARED + cpus: "2" + memory_bytes: "4294967296" + usd_per_month: "40.00" + usd_per_second: "0.000016534392" + tier_slug: basic + tier_upgrade_to: professional-m + - name: Professional XS + slug: professional-xs + cpu_type: SHARED + cpus: "1" + memory_bytes: "1073741824" + usd_per_month: "12.00" + usd_per_second: "0.000004960317" + tier_slug: professional + tier_downgrade_to: basic-xs + - name: Professional S + slug: professional-s + cpu_type: SHARED + cpus: "1" + memory_bytes: "2147483648" + usd_per_month: "25.00" + usd_per_second: "0.000010333995" + tier_slug: professional + tier_downgrade_to: basic-s + - name: Professional M + slug: professional-m + cpu_type: SHARED + cpus: "2" + memory_bytes: "4294967296" + usd_per_month: "50.00" + usd_per_second: "0.000020667989" + tier_slug: professional + tier_downgrade_to: basic-s + - name: Professional 1L + slug: professional-1l + cpu_type: DEDICATED + cpus: "1" + memory_bytes: "4294967296" + usd_per_month: "75.00" + usd_per_second: "0.000031001984" + tier_slug: professional + tier_downgrade_to: basic-m + - name: Professional L + slug: professional-l + cpu_type: DEDICATED + cpus: "2" + memory_bytes: "8589934592" + usd_per_month: "150.00" + usd_per_second: "0.000062003968" + tier_slug: professional + tier_downgrade_to: basic-s + - name: Professional XL + slug: professional-xl + cpu_type: DEDICATED + cpus: "4" + memory_bytes: "17179869184" + usd_per_month: "300.00" + usd_per_second: "0.000124007937" + tier_slug: professional + tier_downgrade_to: basic-s instance_size: value: @@ -526,10 +548,10 @@ instance_size: name: Basic XXS slug: basic-xxs cpu_type: SHARED - cpus: '1' - memory_bytes: '536870912' - usd_per_month: '5.00' - usd_per_second: '0.000002066799' + cpus: "1" + memory_bytes: "536870912" + usd_per_month: "5.00" + usd_per_second: "0.000002066799" tier_slug: basic tier_upgrade_to: professional-xs @@ -552,22 +574,22 @@ components: propose: value: app_name_available: true - existing_static_apps: '2' - max_free_static_apps: '3' + existing_static_apps: "2" + max_free_static_apps: "3" spec: name: sample-golang services: - - name: web - github: - repo: digitalocean/sample-golang - branch: branch - run_command: bin/sample-golang - environment_slug: go - instance_size_slug: basic-xxs - instance_count: 1 - http_port: 8080 - routes: - - path: "/" + - name: web + github: + repo: digitalocean/sample-golang + branch: branch + run_command: bin/sample-golang + environment_slug: go + instance_size_slug: basic-xxs + instance_count: 1 + http_port: 8080 + routes: + - path: "/" region: ams app_cost: 5 app_tier_upgrade_cost: 17 @@ -575,33 +597,33 @@ propose: alerts: value: alerts: - - id: e552e1f9-c1b0-4e6d-8777-ad6f27767306 - spec: - rule: DEPLOYMENT_FAILED - emails: - - sammy@digitalocean.com - phase: ACTIVE - progress: - steps: - - name: alert-configure-insight-alert - status: SUCCESS - started_at: 2020-07-28T18:00:00Z - ended_at: 2020-07-28T18:00:00Z - - id: b58cc9d4-0702-4ffd-ab45-4c2a8d979527 - spec: - rule: CPU_UTILIZATION - operator: GREATER_THAN - value: 85.0 - window: FIVE_MINUTES - emails: - - sammy@digitalocean.com - phase: ACTIVE - progress: - steps: - - name: alert-configure-insight-alert - status: SUCCESS - started_at: 2020-07-28T18:00:00Z - ended_at: 2020-07-28T18:00:00Z + - id: e552e1f9-c1b0-4e6d-8777-ad6f27767306 + spec: + rule: DEPLOYMENT_FAILED + emails: + - sammy@digitalocean.com + phase: ACTIVE + progress: + steps: + - name: alert-configure-insight-alert + status: SUCCESS + started_at: 2020-07-28T18:00:00Z + ended_at: 2020-07-28T18:00:00Z + - id: b58cc9d4-0702-4ffd-ab45-4c2a8d979527 + spec: + rule: CPU_UTILIZATION + operator: GREATER_THAN + value: 85.0 + window: FIVE_MINUTES + emails: + - sammy@digitalocean.com + phase: ACTIVE + progress: + steps: + - name: alert-configure-insight-alert + status: SUCCESS + started_at: 2020-07-28T18:00:00Z + ended_at: 2020-07-28T18:00:00Z alert: value: @@ -610,11 +632,33 @@ alert: spec: rule: DEPLOYMENT_FAILED emails: - - sammy@digitalocean.com + - sammy@digitalocean.com phase: ACTIVE progress: steps: - - name: alert-configure-insight-alert - status: SUCCESS - started_at: 2020-07-28T18:00:00Z - ended_at: 2020-07-28T18:00:00Z \ No newline at end of file + - name: alert-configure-insight-alert + status: SUCCESS + started_at: 2020-07-28T18:00:00Z + ended_at: 2020-07-28T18:00:00Z + +buildpacks: + value: + buildpacks: + - id: digitalocean/node + version: "1.2.0" + major_version: 1 + latest: true + name: Node.js + description: + - Install Node.js, NPM, and Yarn. + - Install dependencies using `npm ci` or `yarn install`. + docs_link: https://docs.digitalocean.com/products/app-platform/reference/buildpacks/nodejs/ + - id: digitalocean/node + version: "0.0.5" + major_version: 0 + latest: false + name: Node.js (v0, deprecated) + description: + - An example of a second buildpack with the same ID but a different major version line. + - Install Node.js, NPM, and Yarn. + docs_link: https://docs.digitalocean.com/products/app-platform/reference/buildpacks/nodejs/ diff --git a/specification/resources/apps/responses/list_buildpacks.yml b/specification/resources/apps/responses/list_buildpacks.yml new file mode 100644 index 000000000..fdf83d8e1 --- /dev/null +++ b/specification/resources/apps/responses/list_buildpacks.yml @@ -0,0 +1,17 @@ +description: A JSON object with a list of buildpacks. + +content: + application/json: + schema: + $ref: ../models/apps_list_buildpacks_response.yml + examples: + buildpacks: + $ref: examples.yml#/buildpacks + +headers: + ratelimit-limit: + $ref: ../../../shared/headers.yml#/ratelimit-limit + ratelimit-remaining: + $ref: ../../../shared/headers.yml#/ratelimit-remaining + ratelimit-reset: + $ref: ../../../shared/headers.yml#/ratelimit-reset