Aller au contenu principal

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

CodeDescription
200Success
defaultError (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504)

Réponse 200 (application/json)

NomTypeObligatoireDescription
itemsarray of objectoui
items[].idstring (uuid)oui
items[].keystringoui
items[].created_atstring (date-time)oui
items[].endpoint_countintegerouiLive endpoints with this key. Valeur minimum : 0.
items[].tree_levelinteger | nullouiLevel 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)

NomTypeObligatoireDescription
keystringouiLongueur : 1 à 64.

Réponses

CodeDescription
201Success
defaultError (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504)

Réponse 201 (application/json)

NomTypeObligatoireDescription
idstring (uuid)oui
keystringoui
created_atstring (date-time)oui
endpoint_countintegerouiLive endpoints with this key. Valeur minimum : 0.
tree_levelinteger | nullouiLevel 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

NomEmplacementTypeObligatoireDescription
idcheminstring (uuid)oui

Corps de la requête (application/json)

NomTypeObligatoireDescription
keystringouiLongueur : 1 à 64.

Réponses

CodeDescription
200Success
defaultError (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504)

Réponse 200 (application/json)

NomTypeObligatoireDescription
idstring (uuid)oui
keystringoui
created_atstring (date-time)oui
endpoint_countintegerouiLive endpoints with this key. Valeur minimum : 0.
tree_levelinteger | nullouiLevel 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

NomEmplacementTypeObligatoireDescription
idcheminstring (uuid)oui
confirmrequête"true"non

Réponses

CodeDescription
200Success
defaultError (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504)

Réponse 200 (application/json)

NomTypeObligatoireDescription
idstring (uuid)oui
keystringoui
removed_tagsintegerouiValeur minimum : 0.
tree_levelinteger | nullouiThe 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

NomEmplacementTypeObligatoireDescription
idcheminstring (uuid)oui
qrequêtestringnonLongueur : 1 à 128.
limitrequêteintegernonDéfaut : 20. Valeur : 1 à 100.

Réponses

CodeDescription
200Success
defaultError (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504)

Réponse 200 (application/json)

NomTypeObligatoireDescription
itemsarray of objectoui
items[].valuestringoui
items[].endpoint_countintegerouiValeur minimum : 0.

List endpoint tags​

GET /endpoints/{id}/tags

Accès : Clé API du MSP, portée read.

Paramètres

NomEmplacementTypeObligatoireDescription
idcheminstring (uuid)oui

Réponses

CodeDescription
200Success
defaultError (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504)

Réponse 200 (application/json)

NomTypeObligatoireDescription
itemsarray of objectoui
items[].key_idstring (uuid)oui
items[].keystringoui
items[].valuestringoui

Set endpoint tag​

POST /endpoints/{id}/tags

Accès : Clé API du MSP, portée operate.

Paramètres

NomEmplacementTypeObligatoireDescription
idcheminstring (uuid)oui

Corps de la requête (application/json)

NomTypeObligatoireDescription
keystringouiLongueur : 1 à 64.
valuestringouiLongueur : 1 à 128.

Réponses

CodeDescription
200Success
defaultError (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504)

Réponse 200 (application/json)

NomTypeObligatoireDescription
itemsarray of objectoui
items[].key_idstring (uuid)oui
items[].keystringoui
items[].valuestringoui

Remove endpoint tag​

DELETE /endpoints/{id}/tags/{keyId}

Accès : Clé API du MSP, portée operate.

Paramètres

NomEmplacementTypeObligatoireDescription
idcheminstring (uuid)oui
keyIdcheminstring (uuid)oui

Réponses

CodeDescription
200Success
defaultError (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504)

Réponse 200 (application/json)

NomTypeObligatoireDescription
itemsarray of objectoui
items[].key_idstring (uuid)oui
items[].keystringoui
items[].valuestringoui

Bulk endpoint tags​

POST /endpoint-tags

Accès : Clé API du MSP, portée operate.

Corps de la requête (application/json)

NomTypeObligatoireDescription
endpoint_idsarray of string (uuid)ouiÉléments : 1 à 500.
setarray of objectnonDéfaut : []. Éléments maximum : 20.
set[].keystringouiLongueur : 1 à 64.
set[].valuestringouiLongueur : 1 à 128.
removearray of stringnonDéfaut : []. Éléments maximum : 20.

Réponses

CodeDescription
200Success
defaultError (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504)

Réponse 200 (application/json)

NomTypeObligatoireDescription
endpointsintegerouiValeur minimum : 0.
addedintegerouiValeur minimum : 0.
changedintegerouiValeur minimum : 0.
removedintegerouiValeur minimum : 0.

Get tree levels​

GET /tree-levels

Accès : Clé API du MSP, portée read.

Réponses

CodeDescription
200Success
defaultError (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504)

Réponse 200 (application/json)

NomTypeObligatoireDescription
itemsarray of objectoui
items[].levelintegerouiValeur : 1 à 20.
items[].key_idstring (uuid)oui
items[].keystringoui

Get fleet tree​

GET /fleet/tree

Accès : Clé API du MSP, portée read.

Paramètres

NomEmplacementTypeObligatoireDescription
client_idrequêtestring (uuid)nonClient of the parent node; absent: the root.
tagrequêtestring | array of stringnonkey:value, repeat for several (AND). Key and value compare without case.
no_tagrequêtestring | array of stringnonA tag key, repeat for several (AND): the endpoint does not have the key. Compares without case.
qrequêtestringnonCase-insensitive substring of the client name, a tree tag value or the endpoint name: keeps the nodes with a matching endpoint. Longueur : 1 à 255.
problemsrequête"true"nonKeeps the nodes with a failed or warning endpoint.
stale_daysrequêteintegernonstale counts agents without a succeeded backup for this number of days. Défaut : 7. Valeur : 1 à 90.

Réponses

CodeDescription
200Success
defaultError (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504)

Réponse 200 (application/json)

NomTypeObligatoireDescription
as_ofstring (date-time)oui
stale_daysintegerouiValeur minimum : 0.
levelsarray of objectouiTree keys of the MSP under the client level, in order. Empty: the tree has the client level only. Éléments maximum : 20.
levels[].key_idstring (uuid)oui
levels[].keystringoui
parentobjectouiThe parent node, before q and problems
parent.depthintegeroui0: the root, 1: a client, n: a client and n - 1 tree keys. Valeur minimum : 0.
parent.endpointsintegerouiLive endpoints of the node: the items of GET /endpoints with filter Valeur minimum : 0.
parent.failed_endpointsintegerouiAgents whose last_backup or last_baremetal_backup is failed (red) Valeur minimum : 0.
parent.warning_endpointsintegerouiAgents 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"ouifailed with a failed endpoint, else warning with a warning endpoint, else ok
levelobject | nullouiThe level of nodes; null: the parent is a leaf.
nodesarray of objectouiClients 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)

NomTypeObligatoireDescription
selectionobjectoui

Réponses

CodeDescription
200Success
defaultError (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504)

Réponse 200 (application/json)

NomTypeObligatoireDescription
endpointsintegerouiValeur minimum : 0.
agentsintegerouiagent endpoints of the selection: the ones a backup can start on. Valeur minimum : 0.
clientsintegerouiDistinct clients of the selection. Valeur minimum : 0.
client_idstring (uuid) | nullouiThe client when the selection is in one client (clients = 1); else null.
keysarray of objectouiTag keys of the selection, by key, with the endpoints that have each one.
keys[].key_idstring (uuid)oui
keys[].keystringoui
keys[].endpointsintegerouiValeur minimum : 0.

Set fleet tags​

POST /fleet/tags

Accès : Clé API du MSP, portée operate.

Corps de la requête (application/json)

NomTypeObligatoireDescription
selectionobjectoui
expected_endpointsintegerouiValeur minimum : 1.
setarray of objectnonDéfaut : []. Éléments maximum : 20.
set[].keystringouiLongueur : 1 à 64.
set[].valuestringouiLongueur : 1 à 128.
removearray of stringnonDéfaut : []. Éléments maximum : 20.

Réponses

CodeDescription
200Success
defaultError (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504)

Réponse 200 (application/json)

NomTypeObligatoireDescription
endpointsintegerouiValeur minimum : 0.
clientsintegerouiValeur minimum : 0.
addedintegerouiValeur minimum : 0.
changedintegerouiValeur minimum : 0.
removedintegerouiValeur minimum : 0.

Move fleet endpoints​

POST /fleet/move

Accès : Clé API du MSP, portée operate.

Corps de la requête (application/json)

NomTypeObligatoireDescription
selectionobjectoui
expected_endpointsintegerouiValeur minimum : 1.
toobjectoui
to.client_idstring (uuid)oui
to.tagarray of stringnonDéfaut : []. Éléments maximum : 20.
to.no_tagarray of stringnonDéfaut : []. Éléments maximum : 20.

Réponses

CodeDescription
200Success
defaultError (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504)

Réponse 200 (application/json)

NomTypeObligatoireDescription
endpointsintegerouiValeur minimum : 0.
clientsintegerouiValeur minimum : 0.
addedintegerouiValeur minimum : 0.
changedintegerouiValeur minimum : 0.
removedintegerouiValeur minimum : 0.

Start fleet backups​

POST /fleet/backups

Accès : Clé API du MSP, portée operate.

Corps de la requête (application/json)

NomTypeObligatoireDescription
selectionobjectoui
expected_endpointsintegerouiValeur minimum : 1.
type"backup" | "baremetal_backup"oui

Réponses

CodeDescription
202Success
defaultError (400, 401, 403, 404, 409, 415, 422, 429, 500, 502, 503 or 504)

Réponse 202 (application/json)

NomTypeObligatoireDescription
endpointsintegerouiValeur minimum : 0.
startedintegerouiValeur minimum : 0.
skippedarray of objectouiOne 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[].endpointsintegerouiValeur minimum : 0.