Docs
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
  1. import { Agental } from "agental-sdk";
  2. const agental = new Agental();
  3. const template = await agental.templates.get("tpl_0123456789abcdef");
  4. 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

idrequired
string
e.g. "tpl_0123456789abcdef"
keyIdrequired
string
The key's id, as the list gives it. e.g. "nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8"

Headers

Authorizationrequired
Bearer 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

403key_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.