{ "opencollection": "1.0.0", "info": { "name": "DigitalOcean SSH Keys API", "version": "2.0" }, "request": { "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "items": [ { "info": { "name": "SSH Keys", "type": "folder" }, "items": [ { "info": { "name": "List All SSH Keys", "type": "http" }, "http": { "method": "GET", "url": "https://api.digitalocean.com/v2/account/keys", "params": [ { "name": "per_page", "value": "2", "type": "query", "description": "Number of items returned per page" }, { "name": "page", "value": "1", "type": "query", "description": "Which 'page' of paginated results to return." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "To list all of the keys in your account, send a GET request to `/v2/account/keys`. The response will be a JSON object with a key set to `ssh_keys`. The value of this will be an array of ssh_key objects, each of which contains the standard ssh_key attributes." }, { "info": { "name": "Create a New SSH Key", "type": "http" }, "http": { "method": "POST", "url": "https://api.digitalocean.com/v2/account/keys", "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "To add a new SSH public key to your DigitalOcean account, send a POST request to `/v2/account/keys`. Set the `name` attribute to the name you wish to use and the `public_key` attribute to the full public key you are adding." }, { "info": { "name": "Retrieve an Existing SSH Key", "type": "http" }, "http": { "method": "GET", "url": "https://api.digitalocean.com/v2/account/keys/:ssh_key_identifier", "params": [ { "name": "ssh_key_identifier", "value": "512189", "type": "path", "description": "Either the ID or the fingerprint of an existing SSH key." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "To get information about a key, send a GET request to `/v2/account/keys/$KEY_ID` or `/v2/account/keys/$KEY_FINGERPRINT`.\nThe response will be a JSON object with the key `ssh_key` and value an ssh_key object which contains the standard ssh_key attributes." }, { "info": { "name": "Update an SSH Key's Name", "type": "http" }, "http": { "method": "PUT", "url": "https://api.digitalocean.com/v2/account/keys/:ssh_key_identifier", "params": [ { "name": "ssh_key_identifier", "value": "512189", "type": "path", "description": "Either the ID or the fingerprint of an existing SSH key." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "To update the name of an SSH key, send a PUT request to either `/v2/account/keys/$SSH_KEY_ID` or `/v2/account/keys/$SSH_KEY_FINGERPRINT`. Set the `name` attribute to the new name you want to use." }, { "info": { "name": "Delete an SSH Key", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.digitalocean.com/v2/account/keys/:ssh_key_identifier", "params": [ { "name": "ssh_key_identifier", "value": "512189", "type": "path", "description": "Either the ID or the fingerprint of an existing SSH key." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "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`.\nA 204 status will be returned, indicating that the action was successful and that the response body is empty." } ] } ], "bundled": true }