Skip to content
Odinex Cloud
API reference

SSH Keys

List SSH keys

GET
/ssh_keys

Authorization

headerAuthorizationBearer <token>

Query Parameters

label_selector?string

Filter by labels: env=prod, env!=prod, env (has key), !env; comma = AND

Response Body

SSH keys

application/json
  1. response
ssh_keys*array<>
curl -X GET "https://example.com/ssh_keys"
{  "ssh_keys": [    {      "id": 0,      "name": "string",      "fingerprint": "SHA256:...",      "public_key": "string",      "labels": {        "property1": "string",        "property2": "string"      },      "created": "2019-08-24T14:15:22Z"    }  ]}

Create SSH key

POST
/ssh_keys

Authorization

headerAuthorizationBearer <token>

Request Body

application/json
  1. body
name*string
Length1 <= length <= 64
public_key*string
Lengthlength <= 16384
labels?

Up to 64 key/value pairs; keys and values up to 63 characters

Response Body

Created

application/json
  1. response
ssh_key*
curl -X POST "https://example.com/ssh_keys" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "public_key": "string"  }'
{  "ssh_key": {    "id": 0,    "name": "string",    "fingerprint": "SHA256:...",    "public_key": "string",    "labels": {      "property1": "string",      "property2": "string"    },    "created": "2019-08-24T14:15:22Z"  }}

Get SSH key

GET
/ssh_keys/{id}

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Response Body

SSH key

application/json
  1. response
ssh_key*
curl -X GET "https://example.com/ssh_keys/0"
{  "ssh_key": {    "id": 0,    "name": "string",    "fingerprint": "SHA256:...",    "public_key": "string",    "labels": {      "property1": "string",      "property2": "string"    },    "created": "2019-08-24T14:15:22Z"  }}

Delete SSH key

DELETE
/ssh_keys/{id}

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Response Body

Deleted

curl -X DELETE "https://example.com/ssh_keys/0"
Empty

Update SSH key

PUT
/ssh_keys/{id}

Authorization

headerAuthorizationBearer <token>

Path Parameters

id*integer
Formatint64

Request Body

application/json
  1. body
name?string
Length1 <= length <= 64
labels?

Up to 64 key/value pairs; keys and values up to 63 characters

Response Body

Updated

application/json
  1. response
ssh_key*
curl -X PUT "https://example.com/ssh_keys/0" \  -H "Content-Type: application/json" \  -d '{}'
{  "ssh_key": {    "id": 0,    "name": "string",    "fingerprint": "SHA256:...",    "public_key": "string",    "labels": {      "property1": "string",      "property2": "string"    },    "created": "2019-08-24T14:15:22Z"  }}