Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions specification/DigitalOcean-public.v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@ tags:

- `Accept: application/vnd.digitalocean.reserveip+json`

- name: Add-Ons
description: |-
Add-ons are third-party applications that can be added to your DigitalOcean account.
They are available through the [DigitalOcean Marketplace](https://marketplace.digitalocean.com/).
Add-ons can be used to enhance the functionality of your existing resources or to provide
additional services.

The Add-Ons API allows you to manage these resources, including creating, listing, and retrieving
details about specific add-on resources.

- name: Apps
description: |-
App Platform is a Platform-as-a-Service (PaaS) offering from DigitalOcean that allows
Expand Down Expand Up @@ -590,6 +600,32 @@ paths:
get:
$ref: "resources/actions/actions_get.yml"

/v2/add-ons/apps:
get:
$ref: "resources/addons/addons_get_app.yml"

/v2/add-ons/saas/apps/{app_slug}/metadata:
get:
$ref: "resources/addons/addons_get_app_metadata.yml"

/v2/add-ons/saas:
get:
$ref: "resources/addons/addons_list.yml"
post:
$ref: "resources/addons/addons_create.yml"

/v2/add-ons/saas/{resource_uuid}:
get:
$ref: "resources/addons/addons_get.yml"
delete:
$ref: "resources/addons/addons_delete.yml"
patch:
$ref: "resources/addons/addons_update.yml"

/v2/add-ons/saas/{resource_uuid}/plan:
patch:
$ref: "resources/addons/addons_update_plan.yml"

/v2/apps:
get:
$ref: "resources/apps/apps_list.yml"
Expand Down
49 changes: 49 additions & 0 deletions specification/resources/addons/addons_create.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
operationId: addons_create

summary: Create/Provision a New Add-on Resource

description: |
To create an add-on resource, send a POST request to `/v2/add-ons/saas` with required parameters.
Some add-ons require additional metadata to be provided in the request body. To find out
what metadata is required for a specific add-on, send a GET request to `/v2/add-ons/saas/apps/{app_slug}/metadata`.

tags:
- Add-Ons

requestBody:
required: true

content:
application/json:
schema:
allOf:
- $ref: 'models/addons_resource_new.yml'

required:
- name
- app_slug
- plan_slug
- metadata

responses:
'200':
$ref: 'responses/addons_create.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/addons_create.yml'

security:
- bearer_auth:
- 'addon:create'
37 changes: 37 additions & 0 deletions specification/resources/addons/addons_delete.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
operationId: addons_delete

summary: Delete/Deprovision an Add-on Resource

description: |
To delete an add-on resource, send a DELETE request to `/v2/add-ons/saas/{resource_uuid}` with the UUID of the resource to delete.
You cannot retrieve the resource after it has been deleted. The response indicates a request was sent to the 3rd party add-on provider to delete the resource.
You will no longer be billed for this resource.

tags:
- Add-Ons

parameters:
- $ref: 'parameters.yml#/resource_uuid'

responses:
'200':
$ref: '../../shared/responses/no_content.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/addons_delete.yml'

security:
- bearer_auth:
- 'addon:delete'
41 changes: 41 additions & 0 deletions specification/resources/addons/addons_get.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
operation: addons_get

summary: Get details on an Add-On Resource

description: |
To fetch details of a specific Add-On Resource, send a GET request to `/v2/add-ons/saas/{resource_uuid}`.
Replace `{resource_uuid}` with the UUID of the resource you want to retrieve.

tags:
- Add-Ons

parameters:
- name: resource_uuid
in: path
required: true
schema:
type: string
description: The UUID of the add-on resource to retrieve.

responses:
'200':
$ref: 'responses/addons_get.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/addons_get.yml'

security:
- bearer_auth:
- 'addon:read'
31 changes: 31 additions & 0 deletions specification/resources/addons/addons_get_app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
operationId: addons_get_app

summary: List Available Add-On Applications

description: |
To fetch details of all available Add-On Applications, send a GET request to `/v2/add-ons/apps`.

tags:
- Add-Ons

responses:
'200':
$ref: 'responses/addons_get_app.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/addons_get_app.yml'

security:
- bearer_auth: []
40 changes: 40 additions & 0 deletions specification/resources/addons/addons_get_app_metadata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
operationId: addons_get_app_metadata

summary: Get Metadata for an Add-On Application

description: |
To find out what metadata is required for a specific add-on, send a GET request to `/v2/add-ons/apps/{app_slug}/metadata`.
Metadata varies by application.

tags:
- Add-Ons

parameters:
- name: app_slug
in: path
required: true
schema:
type: string
description: The slug identifier for the application whose metadata is being requested.

responses:
'200':
$ref: 'responses/addons_get_app_metadata.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/addons_get_app_metadata.yml'

security:
- bearer_auth: []
32 changes: 32 additions & 0 deletions specification/resources/addons/addons_list.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
operation: addons_list

summary: List all Add-On Resources

description: |
To fetch all Add-On Resources under your team, send a GET request to `/v2/add-ons/saas`.

tags:
- Add-Ons

responses:
'200':
$ref: 'responses/addons_list.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/addons_list.yml'

security:
- bearer_auth:
- 'addon:read'
57 changes: 57 additions & 0 deletions specification/resources/addons/addons_update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
operation: addons_update

summary: Update the name for an Add-On Resource

description: |
To change the name of an Add-On Resource, send a PATCH request to `/v2/add-ons/saas/{resource_uuid}`.
Replace `{resource_uuid}` with the UUID of the resource for which you want to change the name.

tags:
- Add-Ons

parameters:
- name: resource_uuid
in: path
required: true
schema:
type: string
description: The UUID of the add-on resource to rename.

requestBody:
required: true

content:
application/json:
schema:
type: object
properties:
name:
type: string
description: The new name for the add-on resource.
example: "new-name"

required:
- name

responses:
'200':
$ref: 'responses/addons_update.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/addons_update.yml'

security:
- bearer_auth:
- 'addon:update'
Loading
Loading