Skip to content

SSH keys

Public keys copied into new instances.

Paths are relative to your API address. See Authentication and Operations. Changes that answer 202 Accepted return an operation to follow.

Request and response examples are generated from the schema; the tables under Schemas are the reference.

List SSH keys

GET /v1/orgs/{org_id}/ssh-keys

The SSH keys the caller can use or manage.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
cursor query string Yes
limit query integer Yes
org_id path string No
project_id query string Yes

Responses

{
    "items": [
        {
            "created_at": "2022-04-13T15:42:05.901Z",
            "display_name": "string",
            "fingerprint": "string",
            "id": "string",
            "key_type": "string",
            "owner": {
                "principal_id": "string",
                "project_id": "string",
                "type": "principal"
            },
            "public_key": "string"
        }
    ],
    "next_cursor": "string"
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Add an SSH key

POST /v1/orgs/{org_id}/ssh-keys

Adds a public SSH key, personal or shared with a project, to choose when creating instances.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
idempotency-key header string Yes
org_id path string No

Request body

{
    "display_name": "string",
    "project_id": "string",
    "public_key": "string"
}

Responses

{
    "created_at": "2022-04-13T15:42:05.901Z",
    "display_name": "string",
    "fingerprint": "string",
    "id": "string",
    "key_type": "string",
    "owner": {
        "principal_id": "string",
        "project_id": "string",
        "type": "principal"
    },
    "public_key": "string"
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Delete an SSH key

DELETE /v1/orgs/{org_id}/ssh-keys/{key_id}

Removes the key from NubeStack Cloud. Instances that already have it keep it.

Input parameters

Parameter In Type Default Nullable Description
Authorization header string N/A No Bearer followed by a service account's API key. The console uses your signed-in session instead.
idempotency-key header string Yes
key_id path string No
org_id path string No

Responses

{
    "deleted": true,
    "id": "string"
}
{
    "detail": [
        {
            "ctx": {},
            "input": null,
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string"
        }
    ]
}

Schemas

HTTPValidationError

Name Type Description
detail Array<ValidationError>

KeyBody

Name Type Description
display_name string
project_id string | null
public_key string

KeyOwner

Name Type Description
principal_id string A personal key: its owner (usr_…).
project_id string A project key: the project (prj_…).
type string

SshKey

Name Type Description
created_at string(date-time)
display_name string
fingerprint string Its SHA-256 fingerprint.
id string The key (ssh_…).
key_type string Such as ssh-ed25519.
owner KeyOwner
public_key string The public key, without its comment.

SshKeyDeleted

Name Type Description
deleted boolean
id string

SshKeyList

Name Type Description
items Array<SshKey>
next_cursor string | null Pass as cursor for the next page; null on the last page.

ValidationError

Name Type Description
ctx
input
loc Array<>
msg string
type string