SSH ›
Remove template ssh key
DELETE
/v1/templates/{id}/ssh/keys/{keyId}Takes a key out of what the sandboxes made from the template from now on are given. The sandboxes already made keep it: DELETE /v1/sandboxes/{id}/ssh/keys/{keyId} takes it out of one.
RequestTypeScript
- import { Agental } from "agental-sdk";
- const agental = new Agental();
- const template = await agental.templates.get("tpl_0123456789abcdef");
- await template.removeSshKey(key.id);
Answer204 No Content
No body: the status says it was done.
The key is let in to no sandbox made from now on.
Path
idrequiredstring | e.g. "tpl_0123456789abcdef" |
keyIdrequiredstring | The key's id, as the list gives it. e.g. "nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8" |
Headers
AuthorizationrequiredBearer key | An API key that may make this call. |
Returns
204 The key is let in to no sandbox made from now on.
Errors and other answers
| 403 | key_action_forbidden the key does not take the action ssh, or it is limited to some sandboxes and not to this template. Nothing was changed. |
| 404 | Not found. |
Every error answers { "error": { "code", "message" } }; a key without the action a call needs answers 403 key_action_forbidden, naming it.