Aller au contenu principal

Endpoints

14 routes de l'API publique. Textes de la source : openapi-csp.json du dépôt platform.

List endpoints​

GET /endpoints

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

Paramètres

NomEmplacementTypeObligatoireDescription
limitrequêteintegernonDéfaut : 50. Valeur : 1 à 100.
cursorrequêtestringnonLongueur minimum : 1.
client_idrequêtestring (uuid)non
typerequête"agent" | "m365"non
agent_statusrequête"online" | "offline"nonPresence at the time of the request.
versionrequêtestringnonExact agent version (agent.version) Longueur : 1 à 64.
qrequêtestringnonCase-insensitive substring of name or display_name Longueur : 1 à 255.
problemsrequête"true"nonProblem endpoints only: an offline agent, or last_backup.status or last_baremetal_backup.status failed, interrupted, missed or partial.
bootrequête"uefi" | "bios" | "unknown"nonBoot mode (agent.boot): uefi, UEFI firmware and GPT system disk; bios, BIOS firmware or MBR system disk (no image backup); unknown, the rest (an agent that sends no boot mode, a system disk it could not read, an M365 tenant)
too_oldrequête"true"nonAgent endpoints with agent_version_state too_old only: the version of the last hello is below min_agent_version
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.

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)ouiFor an agent, also its agent_id
items[].client_idstring (uuid)oui
items[].type"agent" | "m365"oui
items[].namestringouiHostname of an agent at enrollment, domain of an M365 tenant. Never changes.
items[].display_namestring | nullouiName given by an operator (PATCH /endpoints/:id); null: show name. Restores and audit keep name
items[].status"active" | "deleted"oui
items[].created_atstring (date-time)oui
items[].agentobject | nullouiagent endpoints only.
items[].last_backupobject | nullouiagent endpoints only: the newest file backup job (by scheduled_at) with an outcome; null before the first one.
items[].last_baremetal_backupobject | nullouiagent endpoints only: the newest bare metal image job (by scheduled_at) with an outcome, never partial; null before the first one.
items[].tagsarray of objectouiTags of the endpoint, by key (docs/tags-api.md)
items[].first_backup_alertobject | nullouiagent endpoints only: days before the "first backup unfinished" alert
items[].first_backup_resetobject | nullouiagent endpoints only: reset of an abandoned first backup
items[].agent_versionstring | nullnonagent endpoints only: version reported by the last hello (as agent.version); null before it, and for other types. Optional for older readers [C13].
items[].min_agent_versionstring | nullnonagent endpoints only: oldest supported agent version of the platform (MIN_AGENT_VERSION, setting minAgentVersion); null for other types. Optional for older readers [C13].
items[].agent_version_state"supported" | "too_old" | "unknown" | nullnonagent endpoints only: too_old when agent_version is below min_agent_version (spec S6): every order except the automatic update is refused with 409 agent_too_old. unknown before the first hello. Null for other types. Optional for older readers [C13].
next_cursorstring | nulloui

Export endpoints​

GET /endpoints/export

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

Paramètres

NomEmplacementTypeObligatoireDescription
client_idrequêtestring (uuid)non
typerequête"agent" | "m365"non
agent_statusrequête"online" | "offline"nonPresence at the time of the request.
versionrequêtestringnonExact agent version (agent.version) Longueur : 1 à 64.
qrequêtestringnonCase-insensitive substring of name or display_name Longueur : 1 à 255.
problemsrequête"true"nonProblem endpoints only: an offline agent, or last_backup.status or last_baremetal_backup.status failed, interrupted, missed or partial.
bootrequête"uefi" | "bios" | "unknown"nonBoot mode (agent.boot): uefi, UEFI firmware and GPT system disk; bios, BIOS firmware or MBR system disk (no image backup); unknown, the rest (an agent that sends no boot mode, a system disk it could not read, an M365 tenant)
too_oldrequête"true"nonAgent endpoints with agent_version_state too_old only: the version of the last hello is below min_agent_version
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.

Réponses

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

Get endpoint​

GET /endpoints/{id}

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
idstring (uuid)ouiFor an agent, also its agent_id
client_idstring (uuid)oui
type"agent" | "m365"oui
namestringouiHostname of an agent at enrollment, domain of an M365 tenant. Never changes.
display_namestring | nullouiName given by an operator (PATCH /endpoints/:id); null: show name. Restores and audit keep name
status"active" | "deleted"oui
created_atstring (date-time)oui
agentobject | nullouiagent endpoints only.
last_backupobject | nullouiagent endpoints only: the newest file backup job (by scheduled_at) with an outcome; null before the first one.
last_baremetal_backupobject | nullouiagent endpoints only: the newest bare metal image job (by scheduled_at) with an outcome, never partial; null before the first one.
tagsarray of objectouiTags of the endpoint, by key (docs/tags-api.md)
tags[].key_idstring (uuid)oui
tags[].keystringoui
tags[].valuestringoui
first_backup_alertobject | nullouiagent endpoints only: days before the "first backup unfinished" alert
first_backup_resetobject | nullouiagent endpoints only: reset of an abandoned first backup
agent_versionstring | nullnonagent endpoints only: version reported by the last hello (as agent.version); null before it, and for other types. Optional for older readers [C13].
min_agent_versionstring | nullnonagent endpoints only: oldest supported agent version of the platform (MIN_AGENT_VERSION, setting minAgentVersion); null for other types. Optional for older readers [C13].
agent_version_state"supported" | "too_old" | "unknown" | nullnonagent endpoints only: too_old when agent_version is below min_agent_version (spec S6): every order except the automatic update is refused with 409 agent_too_old. unknown before the first hello. Null for other types. Optional for older readers [C13].

Update endpoint​

PATCH /endpoints/{id}

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

Paramètres

NomEmplacementTypeObligatoireDescription
idcheminstring (uuid)oui

Corps de la requête (application/json)

NomTypeObligatoireDescription
display_namestring | nullnon
first_backup_alert_daysinteger | nullnon
first_backup_reset_daysinteger | nullnon

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)ouiFor an agent, also its agent_id
client_idstring (uuid)oui
type"agent" | "m365"oui
namestringouiHostname of an agent at enrollment, domain of an M365 tenant. Never changes.
display_namestring | nullouiName given by an operator (PATCH /endpoints/:id); null: show name. Restores and audit keep name
status"active" | "deleted"oui
created_atstring (date-time)oui
agentobject | nullouiagent endpoints only.
last_backupobject | nullouiagent endpoints only: the newest file backup job (by scheduled_at) with an outcome; null before the first one.
last_baremetal_backupobject | nullouiagent endpoints only: the newest bare metal image job (by scheduled_at) with an outcome, never partial; null before the first one.
tagsarray of objectouiTags of the endpoint, by key (docs/tags-api.md)
tags[].key_idstring (uuid)oui
tags[].keystringoui
tags[].valuestringoui
first_backup_alertobject | nullouiagent endpoints only: days before the "first backup unfinished" alert
first_backup_resetobject | nullouiagent endpoints only: reset of an abandoned first backup
agent_versionstring | nullnonagent endpoints only: version reported by the last hello (as agent.version); null before it, and for other types. Optional for older readers [C13].
min_agent_versionstring | nullnonagent endpoints only: oldest supported agent version of the platform (MIN_AGENT_VERSION, setting minAgentVersion); null for other types. Optional for older readers [C13].
agent_version_state"supported" | "too_old" | "unknown" | nullnonagent endpoints only: too_old when agent_version is below min_agent_version (spec S6): every order except the automatic update is refused with 409 agent_too_old. unknown before the first hello. Null for other types. Optional for older readers [C13].

Delete endpoint​

DELETE /endpoints/{id}

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

Paramètres

NomEmplacementTypeObligatoireDescription
idcheminstring (uuid)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
endpoint_idstring (uuid)oui
pending_action_idstring (uuid)oui
requested_atstring (date-time)oui
effective_atstring (date-time)ouiRequest + 72 h.
purge_atstring (date-time)ouiPlanned earliest purge: effective_at + 7 days; actual purge is at least 7 days after deleted_at.

Get endpoint agent​

GET /endpoints/{id}/agent

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
idstring (uuid)ouiThe endpoint id.
client_idstring (uuid)oui
hostnamestringoui
osstring | nulloui
archstring | nulloui
versionstring | nullouiVersion reported by the last hello
status"online" | "offline"oui
last_connected_atstring (date-time) | nulloui
last_disconnected_atstring (date-time) | nulloui
access_revokedbooleanouiA deletion request revoked the agent (security review H2). After a cancelled deletion, POST /endpoints/:id/reattach-token gives it back.
created_atstring (date-time)oui
deletion_effective_atstring (date-time) | nullnonEffective date of the pending deletion of the endpoint, null without one. Optional for older readers [C13], always sent.
upload_limitnumber | nullnonException of the agent to the upload limit of its policies, MiB/s. Null: no exception, the limit of the policy applies (null there: no limit). Optional for older readers [C13], always sent.
upload_limit_maxnumber | nullnonServer cap of the upload of one agent, MiB/s (HAProxy bwlim, set by the platform). The API refuses a higher upload_limit on the agent or on its policies (422 upload_limit_above_cap). Null: no cap. Optional for older readers [C13].
bootobject | nullnonBoot mode of the machine from its last hello that sent one. Null: unknown (an older agent). A bios firmware or an mbr system disk: no image backup (baremetal_unsupported_boot). Optional for older readers [C13], always sent.
install_profile_idstring (uuid) | nullnonInstall profile the agent was installed with, from its layout.json at enrollment; a later change of the profile does not change it. Null: the BaaStide profile, or an agent older than the white label (install_profile_revision null). Optional for older readers [C13], always sent.
install_profile_revisioninteger | nullnonRevision of that profile at install; 0: the BaaStide profile; null: not sent by the agent (older than the white label). Optional for older readers [C13], always sent.
mssql_service_accountstring | nullnonWindows account of the agent service, NT SERVICE\<service name> from the last hello (NT SERVICE\BaaStide for an older agent). This account needs a SQL Server login with the sysadmin role when an instance has no credentials. Null: not a Windows agent. Optional for older readers [C13], always sent.

Set agent upload limit​

PUT /endpoints/{id}/agent/upload-limit

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

Paramètres

NomEmplacementTypeObligatoireDescription
idcheminstring (uuid)oui

Corps de la requête (application/json)

NomTypeObligatoireDescription
upload_limitnumber | nullouiNull: remove the exception.

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)ouiThe endpoint id.
client_idstring (uuid)oui
hostnamestringoui
osstring | nulloui
archstring | nulloui
versionstring | nullouiVersion reported by the last hello
status"online" | "offline"oui
last_connected_atstring (date-time) | nulloui
last_disconnected_atstring (date-time) | nulloui
access_revokedbooleanouiA deletion request revoked the agent (security review H2). After a cancelled deletion, POST /endpoints/:id/reattach-token gives it back.
created_atstring (date-time)oui
deletion_effective_atstring (date-time) | nullnonEffective date of the pending deletion of the endpoint, null without one. Optional for older readers [C13], always sent.
upload_limitnumber | nullnonException of the agent to the upload limit of its policies, MiB/s. Null: no exception, the limit of the policy applies (null there: no limit). Optional for older readers [C13], always sent.
upload_limit_maxnumber | nullnonServer cap of the upload of one agent, MiB/s (HAProxy bwlim, set by the platform). The API refuses a higher upload_limit on the agent or on its policies (422 upload_limit_above_cap). Null: no cap. Optional for older readers [C13].
bootobject | nullnonBoot mode of the machine from its last hello that sent one. Null: unknown (an older agent). A bios firmware or an mbr system disk: no image backup (baremetal_unsupported_boot). Optional for older readers [C13], always sent.
install_profile_idstring (uuid) | nullnonInstall profile the agent was installed with, from its layout.json at enrollment; a later change of the profile does not change it. Null: the BaaStide profile, or an agent older than the white label (install_profile_revision null). Optional for older readers [C13], always sent.
install_profile_revisioninteger | nullnonRevision of that profile at install; 0: the BaaStide profile; null: not sent by the agent (older than the white label). Optional for older readers [C13], always sent.
mssql_service_accountstring | nullnonWindows account of the agent service, NT SERVICE\<service name> from the last hello (NT SERVICE\BaaStide for an older agent). This account needs a SQL Server login with the sysadmin role when an instance has no credentials. Null: not a Windows agent. Optional for older readers [C13], always sent.

Browse agent​

POST /endpoints/{id}/browse

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

Paramètres

NomEmplacementTypeObligatoireDescription
idcheminstring (uuid)oui

Corps de la requête (application/json)

NomTypeObligatoireDescription
pathstringouiAbsolute path of the directory, in the form of the agent's OS. Linux: the api normalizes // and a final /; ., .., NUL or over 4096 bytes: 400 invalid_path. Windows: / (the drives) or a normalized windowsPath, as is; another form: 400 invalid_path. Another or unknown OS: 400 invalid_path Longueur minimum : 1.
cursorstringnonnext_cursor of the previous page. Absent: first page. With \\ on a Windows agent: 400 invalid_path Longueur maximum : 255.
limitintegernonMax entries, default 500. Valeur : 1 à 1000.

Réponses

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

Réponse 200 (application/json)

NomTypeObligatoireDescription
pathstringouiThe listed path, normalized.
entriesarray of objectoui
entries[].namestringouiName of the entry, without the path. UTF-8. Longueur minimum : 1.
entries[].type"dir" | "file" | "symlink" | "other"ouiother: socket, fifo, device.
entries[].sizeintegernonBytes, for file only. Valeur minimum : 0.
entries[].mtimestring (date-time)nonLast modification, information only.
entries[].mountbooleannonTrue for a mount point: another st_dev than the listed directory.
entries[].driveobjectnonWindows, list_dir of / only: one ready fixed or removable drive (name = C:, type = dir)
entries[].invalid_namebooleannonTrue if the name is not valid UTF-8: name then has U+FFFD for the bad bytes, the entry cannot be opened or selected.
next_cursorstring | nullouiNull on the last page.
hidden_countintegerouiEntries hidden by the forbidden path list of the agent. Valeur minimum : 0.

List agent shares​

GET /endpoints/{id}/shares

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[].idstring (uuid)oui
items[].endpoint_idstring (uuid)ouiThe agent.
items[].keystringouiFixed short name of a network share of the agent.
items[].labelstringoui
items[].protocol"smb" | "nfs"oui
items[].hoststringoui
items[].sharestringoui
items[].optionsobjectoui
items[].usernamestring | nullouiSMB only, else null.
items[].domainstring | nullouiSMB only, else null.
items[].has_passwordbooleanouiSMB: a password is stored. NFS: false.
items[].credential_updated_atstring (date-time) | nullouiLast change of the credentials. NFS: null.
items[].created_atstring (date-time)oui
items[].updated_atstring (date-time)oui

Create agent share​

POST /endpoints/{id}/shares

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

Paramètres

NomEmplacementTypeObligatoireDescription
idcheminstring (uuid)oui

Corps de la requête (application/json)

Type : object.

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
endpoint_idstring (uuid)ouiThe agent.
keystringouiFixed short name of a network share of the agent.
labelstringoui
protocol"smb" | "nfs"oui
hoststringoui
sharestringoui
optionsobjectoui
usernamestring | nullouiSMB only, else null.
domainstring | nullouiSMB only, else null.
has_passwordbooleanouiSMB: a password is stored. NFS: false.
credential_updated_atstring (date-time) | nullouiLast change of the credentials. NFS: null.
created_atstring (date-time)oui
updated_atstring (date-time)oui

Update agent share​

PATCH /endpoints/{id}/shares/{shareId}

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

Paramètres

NomEmplacementTypeObligatoireDescription
idcheminstring (uuid)oui
shareIdcheminstring (uuid)oui

Corps de la requête (application/json)

NomTypeObligatoireDescription
labelstringnonName shown in the portal, at most 100 characters. Longueur : 1 à 100.
hoststring | string (ipv6)nonDNS name, IPv4 or IPv6 address of the server, without port or brackets.
sharestringnon
optionsobjectnonAll the options of the protocol of the share.
usernamestringnonSMB account, without ,, = or a code 0 to 31. Longueur : 1 à 256.
domainstringnonSMB domain or workgroup, can be empty; without ,, = or a code 0 to 31. Longueur maximum : 255.
passwordstringnonSMB password, 1 to 256 characters, no NUL. A secret: never stored in clear, logged or returned by the api. Longueur : 1 à 256.

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
endpoint_idstring (uuid)ouiThe agent.
keystringouiFixed short name of a network share of the agent.
labelstringoui
protocol"smb" | "nfs"oui
hoststringoui
sharestringoui
optionsobjectoui
usernamestring | nullouiSMB only, else null.
domainstring | nullouiSMB only, else null.
has_passwordbooleanouiSMB: a password is stored. NFS: false.
credential_updated_atstring (date-time) | nullouiLast change of the credentials. NFS: null.
created_atstring (date-time)oui
updated_atstring (date-time)oui

Delete agent share​

DELETE /endpoints/{id}/shares/{shareId}

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

Paramètres

NomEmplacementTypeObligatoireDescription
idcheminstring (uuid)oui
shareIdcheminstring (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
idstring (uuid)oui
endpoint_idstring (uuid)ouiThe agent.
keystringouiFixed short name of a network share of the agent.
labelstringoui
protocol"smb" | "nfs"oui
hoststringoui
sharestringoui
optionsobjectoui
usernamestring | nullouiSMB only, else null.
domainstring | nullouiSMB only, else null.
has_passwordbooleanouiSMB: a password is stored. NFS: false.
credential_updated_atstring (date-time) | nullouiLast change of the credentials. NFS: null.
created_atstring (date-time)oui
updated_atstring (date-time)oui

Check agent share​

POST /endpoints/{id}/shares/check

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

Paramètres

NomEmplacementTypeObligatoireDescription
idcheminstring (uuid)oui

Corps de la requête (application/json)

Type : object.

Réponses

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

Réponse 200 (application/json)

NomTypeObligatoireDescription
status"ok" | "error"oui
codestring | nullouiOne of SHARE_ERROR_CODES when status is error; else null.
entries_seenintegerouiEntries read at the root of the share. Valeur : 0 à 1000.
root_squash_suspectedbooleanouiNFS: the root belongs to nobody or root cannot read it.

List endpoint vms​

GET /endpoints/{id}/vms

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
endpoint_idstring (uuid)oui
hypervbooleanouiThe agent declared HYPERV_AGENT_CAPABILITY in its current session.
proxmoxbooleanouiThe agent declared PROXMOX_AGENT_CAPABILITY in its current session.
hypervisor"hyperv" | "proxmox" | nullouiHypervisor of the last inventory; null before the first one.
collected_atstring (date-time) | nullouiServer time of the last inventory; null before the first one.
hostobject | nullouiHyper-V host data; null for a Proxmox node.
proxmox_hostobject | nullouiProxmox node data (storages, bridges, versions); null for a Hyper-V host.
unprotectable_reason"pve_unsupported_version" | nullouiNot null: no VM or container of the endpoint can be protected, the backend creates no job. The portal shows "Proxmox version out of support".
truncatedbooleanoui
vmsarray of objectoui