Fleet
15 routes de l'API publique. Textes de la source : openapi-csp.json du dépôt platform.
List tag keys
GET /tag-keys
Accès : Clé API du MSP, portée read.
Réponses
| Code | Description |
|---|---|
200 | Success |
default | Error (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504) |
Réponse 200 (application/json)
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
items | array of object | oui | |
items[].id | string (uuid) | oui | |
items[].key | string | oui | |
items[].created_at | string (date-time) | oui | |
items[].endpoint_count | integer | oui | Live endpoints with this key. Valeur minimum : 0. |
items[].tree_level | integer | null | oui | Level of the fleet tree under the client (1: the first key), set by PUT /tree-levels; null: a free key. |
Create tag key
POST /tag-keys
Accès : Clé API du MSP, portée operate.
Corps de la requête (application/json)
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
key | string | oui | Longueur : 1 à 64. |
Réponses
| Code | Description |
|---|---|
201 | Success |
default | Error (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504) |
Réponse 201 (application/json)
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
id | string (uuid) | oui | |
key | string | oui | |
created_at | string (date-time) | oui | |
endpoint_count | integer | oui | Live endpoints with this key. Valeur minimum : 0. |
tree_level | integer | null | oui | Level of the fleet tree under the client (1: the first key), set by PUT /tree-levels; null: a free key. |
Update tag key
PATCH /tag-keys/{id}
Accès : Clé API du MSP, portée operate.
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | chemin | string (uuid) | oui |
Corps de la requête (application/json)
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
key | string | oui | Longueur : 1 à 64. |
Réponses
| Code | Description |
|---|---|
200 | Success |
default | Error (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504) |
Réponse 200 (application/json)
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
id | string (uuid) | oui | |
key | string | oui | |
created_at | string (date-time) | oui | |
endpoint_count | integer | oui | Live endpoints with this key. Valeur minimum : 0. |
tree_level | integer | null | oui | Level of the fleet tree under the client (1: the first key), set by PUT /tree-levels; null: a free key. |
Delete tag key
DELETE /tag-keys/{id}
Accès : Clé API du MSP, portée operate.
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | chemin | string (uuid) | oui | |
confirm | requête | "true" | non |
Réponses
| Code | Description |
|---|---|
200 | Success |
default | Error (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504) |
Réponse 200 (application/json)
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
id | string (uuid) | oui | |
key | string | oui | |
removed_tags | integer | oui | Valeur minimum : 0. |
tree_level | integer | null | oui | The level the key had in the fleet tree; null: a free key. |
List tag values
GET /tag-keys/{id}/values
Accès : Clé API du MSP, portée read.
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | chemin | string (uuid) | oui | |
q | requête | string | non | Longueur : 1 à 128. |
limit | requête | integer | non | Défaut : 20. Valeur : 1 à 100. |
Réponses
| Code | Description |
|---|---|
200 | Success |
default | Error (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504) |
Réponse 200 (application/json)
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
items | array of object | oui | |
items[].value | string | oui | |
items[].endpoint_count | integer | oui | Valeur minimum : 0. |
List endpoint tags
GET /endpoints/{id}/tags
Accès : Clé API du MSP, portée read.
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | chemin | string (uuid) | oui |
Réponses
| Code | Description |
|---|---|
200 | Success |
default | Error (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504) |
Réponse 200 (application/json)
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
items | array of object | oui | |
items[].key_id | string (uuid) | oui | |
items[].key | string | oui | |
items[].value | string | oui |
Set endpoint tag
POST /endpoints/{id}/tags
Accès : Clé API du MSP, portée operate.
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | chemin | string (uuid) | oui |
Corps de la requête (application/json)
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
key | string | oui | Longueur : 1 à 64. |
value | string | oui | Longueur : 1 à 128. |
Réponses
| Code | Description |
|---|---|
200 | Success |
default | Error (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504) |
Réponse 200 (application/json)
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
items | array of object | oui | |
items[].key_id | string (uuid) | oui | |
items[].key | string | oui | |
items[].value | string | oui |
Remove endpoint tag
DELETE /endpoints/{id}/tags/{keyId}
Accès : Clé API du MSP, portée operate.
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
id | chemin | string (uuid) | oui | |
keyId | chemin | string (uuid) | oui |
Réponses
| Code | Description |
|---|---|
200 | Success |
default | Error (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504) |
Réponse 200 (application/json)
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
items | array of object | oui | |
items[].key_id | string (uuid) | oui | |
items[].key | string | oui | |
items[].value | string | oui |
Bulk endpoint tags
POST /endpoint-tags
Accès : Clé API du MSP, portée operate.
Corps de la requête (application/json)
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
endpoint_ids | array of string (uuid) | oui | Éléments : 1 à 500. |
set | array of object | non | Défaut : []. Éléments maximum : 20. |
set[].key | string | oui | Longueur : 1 à 64. |
set[].value | string | oui | Longueur : 1 à 128. |
remove | array of string | non | Défaut : []. Éléments maximum : 20. |
Réponses
| Code | Description |
|---|---|
200 | Success |
default | Error (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504) |
Réponse 200 (application/json)
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
endpoints | integer | oui | Valeur minimum : 0. |
added | integer | oui | Valeur minimum : 0. |
changed | integer | oui | Valeur minimum : 0. |
removed | integer | oui | Valeur minimum : 0. |
Get tree levels
GET /tree-levels
Accès : Clé API du MSP, portée read.
Réponses
| Code | Description |
|---|---|
200 | Success |
default | Error (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504) |
Réponse 200 (application/json)
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
items | array of object | oui | |
items[].level | integer | oui | Valeur : 1 à 20. |
items[].key_id | string (uuid) | oui | |
items[].key | string | oui |
Get fleet tree
GET /fleet/tree
Accès : Clé API du MSP, portée read.
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
client_id | requête | string (uuid) | non | Client of the parent node; absent: the root. |
tag | requête | string | array of string | non | key:value, repeat for several (AND). Key and value compare without case. |
no_tag | requête | string | array of string | non | A tag key, repeat for several (AND): the endpoint does not have the key. Compares without case. |
q | requête | string | non | Case-insensitive substring of the client name, a tree tag value or the endpoint name: keeps the nodes with a matching endpoint. Longueur : 1 à 255. |
problems | requête | "true" | non | Keeps the nodes with a failed or warning endpoint. |
stale_days | requête | integer | non | stale counts agents without a succeeded backup for this number of days. Défaut : 7. Valeur : 1 à 90. |
Réponses
| Code | Description |
|---|---|
200 | Success |
default | Error (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504) |
Réponse 200 (application/json)
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
as_of | string (date-time) | oui | |
stale_days | integer | oui | Valeur minimum : 0. |
levels | array of object | oui | Tree keys of the MSP under the client level, in order. Empty: the tree has the client level only. Éléments maximum : 20. |
levels[].key_id | string (uuid) | oui | |
levels[].key | string | oui | |
parent | object | oui | The parent node, before q and problems |
parent.depth | integer | oui | 0: the root, 1: a client, n: a client and n - 1 tree keys. Valeur minimum : 0. |
parent.endpoints | integer | oui | Live endpoints of the node: the items of GET /endpoints with filter Valeur minimum : 0. |
parent.failed_endpoints | integer | oui | Agents whose last_backup or last_baremetal_backup is failed (red) Valeur minimum : 0. |
parent.warning_endpoints | integer | oui | Agents not failed that are offline, whose last backup is interrupted, missed or partial, or without a succeeded backup for stale_days days (orange) Valeur minimum : 0. |
parent.state | "failed" | "warning" | "ok" | oui | failed with a failed endpoint, else warning with a warning endpoint, else ok |
level | object | null | oui | The level of nodes; null: the parent is a leaf. |
nodes | array of object | oui | Clients by name, or values by value then the node without the key. Only nodes with an endpoint (and a match with q or problems) |
Summarize fleet selection
POST /fleet/selection
Accès : Clé API du MSP, portée operate.
Corps de la requête (application/json)
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
selection | object | oui |
Réponses
| Code | Description |
|---|---|
200 | Success |
default | Error (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504) |
Réponse 200 (application/json)
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
endpoints | integer | oui | Valeur minimum : 0. |
agents | integer | oui | agent endpoints of the selection: the ones a backup can start on. Valeur minimum : 0. |
clients | integer | oui | Distinct clients of the selection. Valeur minimum : 0. |
client_id | string (uuid) | null | oui | The client when the selection is in one client (clients = 1); else null. |
keys | array of object | oui | Tag keys of the selection, by key, with the endpoints that have each one. |
keys[].key_id | string (uuid) | oui | |
keys[].key | string | oui | |
keys[].endpoints | integer | oui | Valeur minimum : 0. |
Set fleet tags
POST /fleet/tags
Accès : Clé API du MSP, portée operate.
Corps de la requête (application/json)
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
selection | object | oui | |
expected_endpoints | integer | oui | Valeur minimum : 1. |
set | array of object | non | Défaut : []. Éléments maximum : 20. |
set[].key | string | oui | Longueur : 1 à 64. |
set[].value | string | oui | Longueur : 1 à 128. |
remove | array of string | non | Défaut : []. Éléments maximum : 20. |
Réponses
| Code | Description |
|---|---|
200 | Success |
default | Error (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504) |
Réponse 200 (application/json)
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
endpoints | integer | oui | Valeur minimum : 0. |
clients | integer | oui | Valeur minimum : 0. |
added | integer | oui | Valeur minimum : 0. |
changed | integer | oui | Valeur minimum : 0. |
removed | integer | oui | Valeur minimum : 0. |
Move fleet endpoints
POST /fleet/move
Accès : Clé API du MSP, portée operate.
Corps de la requête (application/json)
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
selection | object | oui | |
expected_endpoints | integer | oui | Valeur minimum : 1. |
to | object | oui | |
to.client_id | string (uuid) | oui | |
to.tag | array of string | non | Défaut : []. Éléments maximum : 20. |
to.no_tag | array of string | non | Défaut : []. Éléments maximum : 20. |
Réponses
| Code | Description |
|---|---|
200 | Success |
default | Error (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504) |
Réponse 200 (application/json)
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
endpoints | integer | oui | Valeur minimum : 0. |
clients | integer | oui | Valeur minimum : 0. |
added | integer | oui | Valeur minimum : 0. |
changed | integer | oui | Valeur minimum : 0. |
removed | integer | oui | Valeur minimum : 0. |
Start fleet backups
POST /fleet/backups
Accès : Clé API du MSP, portée operate.
Corps de la requête (application/json)
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
selection | object | oui | |
expected_endpoints | integer | oui | Valeur minimum : 1. |
type | "backup" | "baremetal_backup" | oui |
Réponses
| Code | Description |
|---|---|
202 | Success |
default | Error (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504) |
Réponse 202 (application/json)
| Nom | Type | Obligatoire | Description |
|---|---|---|---|
endpoints | integer | oui | Valeur minimum : 0. |
started | integer | oui | Valeur minimum : 0. |
skipped | array of object | oui | One row per reason with at least one endpoint. |
skipped[].reason | "not_agent" | "agent_offline" | "agent_too_old" | "job_active" | "repo_not_ready" | "no_policy" | "baremetal_unsupported_boot" | "no_file_policy" | oui | |
skipped[].endpoints | integer | oui | Valeur minimum : 0. |