Zum Inhalt springen
Odinex Cloud
API-Referenz

Platzierungsgruppen

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

List placement groups

GET
/placement_groups

Autorisierung

headerAutorisierungBearer <token>

Query-Parameter

label_selector?string

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

Response-Body

Placement Groups

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

Create placement group

POST
/placement_groups

Autorisierung

headerAutorisierungBearer <token>

Request-Body

application/json
  1. body
name*string
Länge1 <= length <= 64
location*string
type?string

spread (anti-affinity): servers on different hosts where possible, so one host failing affects only one of them. affinity: servers on the same host where possible, for the lowest latency between them. Fixed once created.

Standard"spread"
Wert in"spread""affinity"
labels?

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

Response-Body

Created

application/json
  1. response
placement_group*
action?|null
curl -X POST "https://example.com/placement_groups" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "location": "string"  }'
{  "placement_group": {    "id": 0,    "name": "string",    "type": "spread",    "location": "string",    "servers": [      0    ],    "labels": {      "property1": "string",      "property2": "string"    },    "created": "2019-08-24T14:15:22Z"  },  "action": {    "id": 0,    "command": "create_server",    "status": "running",    "progress": 0,    "started": "2019-08-24T14:15:22Z",    "finished": "2019-08-24T14:15:22Z",    "resources": [      {        "id": 0,        "type": "server"      }    ],    "error": {      "code": "string",      "message": "string"    }  }}

Get placement group

GET
/placement_groups/{id}

Autorisierung

headerAutorisierungBearer <token>

Pfadparameter

id*integer
Formatint64

Response-Body

PlacementGroup

application/json
  1. response
placement_group*
curl -X GET "https://example.com/placement_groups/0"
{  "placement_group": {    "id": 0,    "name": "string",    "type": "spread",    "location": "string",    "servers": [      0    ],    "labels": {      "property1": "string",      "property2": "string"    },    "created": "2019-08-24T14:15:22Z"  }}

Delete placement group

DELETE
/placement_groups/{id}

Autorisierung

headerAutorisierungBearer <token>

Pfadparameter

id*integer
Formatint64

Response-Body

Deleted

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

Update placement group

PUT
/placement_groups/{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
placement_group*
curl -X PUT "https://example.com/placement_groups/0" \  -H "Content-Type: application/json" \  -d '{}'
{  "placement_group": {    "id": 0,    "name": "string",    "type": "spread",    "location": "string",    "servers": [      0    ],    "labels": {      "property1": "string",      "property2": "string"    },    "created": "2019-08-24T14:15:22Z"  }}