Docs
SSH ›

Disable template ssh

DELETE/v1/templates/{id}/ssh

A sandbox made from the template from now on has SSH off as it is made. A sandbox already made keeps SSH as it has it, and the template's keys are left as they are.

RequestTypeScript
  1. import { Agental } from "agental-sdk";
  2. const agental = new Agental();
  3. const template = await agental.templates.get("tpl_0123456789abcdef");
  4. await template.sshOff();
Answer200 OK · TemplateSsh
  1. {
  2. "enabled": boolean,
  3. "enabledAt": string | null,
  4. "keys": [{
  5. "id": string,
  6. "fingerprint": string,
  7. "type": string,
  8. "comment": string | null,
  9. }],
  10. }

SSH is off as a sandbox is made.

Path

idrequired
string
e.g. "tpl_0123456789abcdef"

Headers

Authorizationrequired
Bearer key
An API key that may make this call.

Returns

200 SSH is off as a sandbox is made.

TemplateSsh3 fields
enabled
boolean
Whether a sandbox made from the template has SSH turned on as it is made, as PUT /v1/sandboxes/{id}/ssh would: GET /v1/sandboxes/{id}/ssh then says where to connect.
enabledAt
stringnull
keys
SshKey[]4 fields
The public keys let in to a sandbox's machine as it is made, as POST /v1/sandboxes/{id}/ssh/keys would, in the order they were added.
More At most 50.
id
string
What the key is named by when it is removed: the SHA-256 of the key, written so that it can stand in a path.
fingerprint
string
The same, as ssh-keygen -l prints it.
type
string
comment
stringnull
What follows the key on its line.
More Null when nothing does.

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.