Zum Inhalt springen
Odinex Cloud
API-Referenz

SSH-Schlüssel

Diese Referenz wird aus der OpenAPI-Spezifikation erzeugt; die Beschreibungen der Endpunkte und Felder sind auf Englisch.

List SSH keys

GET
/ssh_keys

Autorisierung

headerAutorisierungBearer <token>

Query-Parameter

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

Autorisierung

headerAutorisierungBearer <token>

Request-Body

application/json
  1. body
name*string
Länge1 <= length <= 64
public_key*string
Längelength <= 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}

Autorisierung

headerAutorisierungBearer <token>

Pfadparameter

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}

Autorisierung

headerAutorisierungBearer <token>

Pfadparameter

id*integer
Formatint64

Response-Body

Deleted

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

Update SSH key

PUT
/ssh_keys/{id}

Autorisierung

headerAutorisierungBearer <token>

Pfadparameter

id*integer
Formatint64

Request-Body

application/json
  1. body
name?string
Länge1 <= 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"  }}