Skip to content

Commit

Permalink
add DELETE /v2/account/keys/{ssh_key_identifier}
Browse files Browse the repository at this point in the history
  • Loading branch information
Hilary Holz authored and hilary committed Jul 20, 2020
1 parent 0c1b8f4 commit 8fe6b27
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
3 changes: 3 additions & 0 deletions DigitalOcean-public.v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ paths:
get:
$ref: 'resources/ssh_keys/retrieve_an_existing_key.yml'

delete:
$ref: 'resources/ssh_keys/destroy_a_key.yml'

components:
securitySchemes:
bearerAuth:
Expand Down
30 changes: 30 additions & 0 deletions resources/ssh_keys/destroy_a_key.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
operationId: destroy_a_key

summary: Delete an existing SSH key from your account.

description: >-
To destroy a public SSH key that you have in your account, send a DELETE request
to `/v2/account/keys/$KEY_ID` or `/v2/account/keys/$KEY_FINGERPRINT`.
A 204 status will be returned, indicating that the action was successful and that
the response body is empty.
tags:
- Account
- SSH Keys

parameters:
- $ref: 'parameters/ssh_key_identifier.yml'

responses:
'204':
$ref: '../../shared/responses/no_content.yml'

'401':
$ref: '../../shared/responses/unauthorized.yml'

'404':
$ref: '../../shared/responses/not_found.yml'

default:
$ref: '../../shared/responses/unexpected_error.yml'
9 changes: 9 additions & 0 deletions shared/responses/no_content.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description: The action was successful and the response body is empty.

headers:
ratelimit-limit:
$ref: '../headers.yml#/ratelimit-limit'
ratelimit-remaining:
$ref: '../headers.yml#/ratelimit-remaining'
ratelimit-reset:
$ref: '../headers.yml#/ratelimit-reset'

0 comments on commit 8fe6b27

Please sign in to comment.