Skip to content

Commit 87b5d83

Browse files
committed
Add documentation for accepting image account transfers
1 parent 665cb21 commit 87b5d83

4 files changed

Lines changed: 84 additions & 2 deletions

File tree

specification/DigitalOcean-public.v2.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,14 +1409,18 @@ paths:
14091409
post:
14101410
$ref: "resources/images/images_post_account_transfer_create.yml"
14111411

1412-
/v2/images/{image_id}/account_transfer/decline:
1412+
/v2/images/{image_id}/account_transfer/accept:
14131413
post:
1414-
$ref: "resources/images/images_post_account_transfer_decline.yml"
1414+
$ref: "resources/images/images_post_account_transfer_accept.yml"
14151415

14161416
/v2/images/{image_id}/account_transfer/cancel:
14171417
post:
14181418
$ref: "resources/images/images_post_account_transfer_cancel.yml"
14191419

1420+
/v2/images/{image_id}/account_transfer/decline:
1421+
post:
1422+
$ref: "resources/images/images_post_account_transfer_decline.yml"
1423+
14201424
/v2/images/{image_id}/actions:
14211425
get:
14221426
$ref: "resources/images/imageActions_list.yml"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
lang: cURL
2+
source: |-
3+
curl -X POST \
4+
-H "Content-Type: application/json" \
5+
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
6+
-d '{"transfer_id": 3164444, "recipient_uuid": "4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf"}' \
7+
"https://api.digitalocean.com/v2/images/9375231/account_transfer/accept"
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
operationId: images_post_account_transfer_accept
2+
3+
summary: Accept an Image Account Transfer
4+
5+
description: |
6+
To accept an account transfer for an image, send a POST request to
7+
`/v2/images/$IMAGE_ID/account_transfer/accept`.
8+
9+
tags:
10+
- Images
11+
12+
parameters:
13+
- $ref: 'parameters.yml#/image_id'
14+
15+
requestBody:
16+
required: true
17+
18+
content:
19+
application/json:
20+
schema:
21+
$ref: 'models/images_post_account_transfer_accept.yml'
22+
23+
responses:
24+
'201':
25+
$ref: '../../shared/responses/no_content.yml'
26+
27+
'400':
28+
$ref: '../../shared/responses/bad_request.yml'
29+
30+
'401':
31+
$ref: '../../shared/responses/unauthorized.yml'
32+
33+
'404':
34+
$ref: '../../shared/responses/not_found.yml'
35+
36+
'429':
37+
$ref: '../../shared/responses/too_many_requests.yml'
38+
39+
'500':
40+
$ref: '../../shared/responses/server_error.yml'
41+
42+
default:
43+
$ref: '../../shared/responses/unexpected_error.yml'
44+
45+
x-codeSamples:
46+
- $ref: 'examples/curl/images_post_account_transfer_accept.yml'
47+
48+
security:
49+
- bearer_auth:
50+
- 'image:create'
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
allOf:
2+
- title: Transfer ID
3+
type: object
4+
properties:
5+
transfer_id:
6+
type: integer
7+
description: >-
8+
A unique number that used to identify and reference an image account transfer.
9+
example: 3164444
10+
required:
11+
- transfer_id
12+
13+
- title: Recipient Team UUID
14+
type: object
15+
properties:
16+
recipient_uuid:
17+
type: string
18+
description: The UUID of the team that the image will be transferred to.
19+
example: 4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf
20+
required:
21+
- recipient_uuid

0 commit comments

Comments
 (0)