SSH ›
Get template ssh
GET
/v1/templates/{id}/sshWhat 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
- import { Agental } from "agental-sdk";
- const agental = new Agental();
- const template = await agental.templates.get("tpl_0123456789abcdef");
- const ssh = await template.ssh();
Answer200 OK · TemplateSsh
- {
- "enabled": boolean,
- "enabledAt": string | null,
- "keys": [{
- "id": string,
- "fingerprint": string,
- "type": string,
- "comment": string | null,
- }],
- }
Whether SSH is turned on as a sandbox is made, and the keys let in.
Path
idrequiredstring | e.g. "tpl_0123456789abcdef" |
Headers
AuthorizationrequiredBearer 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
enabledboolean
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.
enabledAtstringnull
keysSshKey[]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.idstring
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.
fingerprintstring
The same, as ssh-keygen -l prints it.
typestring
commentstringnull
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.