Docs
SSH ›

Get template ssh

GET/v1/templates/{id}/ssh

What a sandbox made from the template is given for SSH as it is made: whether SSH is turned on for it, and the public keys let in to its machine.

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

Whether SSH is turned on as a sandbox is made, and the keys let in.

Path

idrequired
string
e.g. "tpl_0123456789abcdef"

Headers

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

Returns

200 Whether SSH is turned on as a sandbox is made, and the keys let in.

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

404 Not found.

Every error answers { "error": { "code", "message" } }; a key without the action a call needs answers 403 key_action_forbidden, naming it.