> For the complete documentation index, see [llms.txt](https://documentation.atempo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.atempo.com/lina-7.4/lina-7.4-en/release-information/rest-api-reference/administration/stats.md). Agents can also search and read this documentation through its [MCP server](https://documentation.atempo.com/~gitbook/mcp).

# Stats

Stats requests

## List contexts

> List all contexts

```json
{"openapi":"3.0.1","info":{"title":"Lina Admin API","version":"7.3.0"},"tags":[{"name":"Stats","description":"Stats requests"}],"servers":[{"url":"/"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY"}},"schemas":{"StatusCode":{"type":"integer","format":"int32","enum":[0,1,3,4,5,6,7,8,9,10,11,13,103,105,106,107,108,109,111,199,999],"description":"Status code:\n* 0 - HSX_ADMIN_OK (OK)\n* 1 - HSX_ADMIN_ERR_UNDEFID (Undefined ID)\n* 3 - HSX_ADMIN_ERR_REFERENCED (Object if referenced)\n* 4 - HSX_ADMIN_ERR_NAMEALREADYEXISTS (Name already exists)\n* 5 - HSX_ADMIN_ERR_UNDEFREFID (Undefined referenced ID)\n* 6 - HSX_ADMIN_ERR_PARAM (Bad parameter)\n* 7 - HSX_ADMIN_ERR_IMMUTABLE (Immutable)\n* 8 - HSX_ADMIN_ERR_BADPATH (Bad path format)\n* 9 - HSX_ADMIN_ERR_BADEXT (Bad extension format)\n* 10 - HSX_ADMIN_ERR_BADNAME (Bad name format)\n* 11 - HSX_ADMIN_ERR_BUFFERTOOSHORT (Buffer too short)\n* 13 - HSX_ADMIN_ERR_PERM (Authentification error)\n* 103 - HSX_ADMIN_ERR_XML (Bad XML format)\n* 105 - HSX_ADMIN_ERR_MEM (Memory allocation issue)\n* 106 - HSX_ADMIN_ERR_DEL (Agent is waiting for deletion)\n* 107 - HSX_ADMIN_ERR_BAD_DATA_HEADER (POST data not prefixed with 'data=' or '<?xml')\n* 108 - HSX_ADMIN_ERR_BAD_COMMAND (Bad command)\n* 109 - HSX_ADMIN_ERR_BAD_DATA (Cannot get POST data)\n* 111 - HSX_ADMIN_ERR_NONEX (Object does not exist)\n* 199 - HSX_ADMIN_ERR_INT (Internal error)\n* 999 - HSX_ADMIN_ERR (Generic error)\n","default":0},"StatusMsg":{"type":"string","description":"Status message","enum":["HSX_ADMIN_OK","HSX_ADMIN_ERR_UNDEFID","HSX_ADMIN_ERR_REFERENCED","HSX_ADMIN_ERR_NAMEALREADYEXISTS","HSX_ADMIN_ERR_UNDEFREFID","HSX_ADMIN_ERR_PARAM","HSX_ADMIN_ERR_IMMUTABLE","HSX_ADMIN_ERR_BADPATH","HSX_ADMIN_ERR_BADEXT","HSX_ADMIN_ERR_BADNAME","HSX_ADMIN_ERR_BUFFERTOOSHORT","HSX_ADMIN_ERR_PERM","HSX_ADMIN_ERR_XML","HSX_ADMIN_ERR_MEM","HSX_ADMIN_ERR_DEL","HSX_ADMIN_ERR_BAD_DATA_HEADER","HSX_ADMIN_ERR_BAD_COMMAND","HSX_ADMIN_ERR_BAD_DATA","HSX_ADMIN_ERR_NONEX","HSX_ADMIN_ERR_INT","HSX_ADMIN_ERR"],"default":"HSX_ADMIN_OK"}}},"paths":{"/stats_contexts.json":{"get":{"tags":["Stats"],"summary":"List contexts","description":"List all contexts","operationId":"stats_contexts","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"Contexts":{"type":"object","properties":{"Type":{"type":"string","enum":["B","i","I","R","o","O","D","S","w","W","T"],"description":"Context type:\n* 'B' - CTXTYP_AGTBKP (backup)\n* 'i' - CTXTYP_REPLIIN (replication in)\n* 'I' - CTXTYP_REVREPIN (reverse replication in)\n* 'R' - CTXTYP_AGTRST (restore)\n* 'o' - CTXTYP_REPLIOUT (replication out)\n* 'O' - CTXTYP_REVREPOUT (reverse replication out)\n* 'D' - CTXTYP_RLDB (restore local database)\n* 'S' - CTXTYP_DBS (data browse / search)\n* 'w' - CTXTYP_WBROW (web browse)\n* 'W' - CTXTYP_WREST (web restore)\n* 'T' - CTXTYP_STATS (stats)\n"},"Index":{"type":"integer","format":"int32","description":"index of the context"},"ID":{"type":"integer","format":"int32","description":"ID of the context"},"ClientName":{"type":"string","description":"Name of the agent owning the context"},"ClientID":{"type":"integer","format":"int32","description":"ID of the agent owning the context"},"InUse":{"type":"integer","format":"int32","enum":[0,1],"description":"Context is in use? (0/1)","default":1},"Active":{"type":"integer","format":"int32","enum":[0,1],"description":"Context is active? (0/1)","default":0},"DeletePending":{"type":"integer","format":"int64","description":"Timestamp of delete request (or 0)","default":0},"IdleTime":{"type":"integer","format":"int64","description":"Idle time (ms)","default":0}}},"status":{"$ref":"#/components/schemas/StatusCode"},"status_msg":{"$ref":"#/components/schemas/StatusMsg"}}}}}}}}}}}
```

## Get version & agents global infos

> Get version & agents global infos

```json
{"openapi":"3.0.1","info":{"title":"Lina Admin API","version":"7.3.0"},"tags":[{"name":"Stats","description":"Stats requests"}],"servers":[{"url":"/"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY"}},"schemas":{"StatusCode":{"type":"integer","format":"int32","enum":[0,1,3,4,5,6,7,8,9,10,11,13,103,105,106,107,108,109,111,199,999],"description":"Status code:\n* 0 - HSX_ADMIN_OK (OK)\n* 1 - HSX_ADMIN_ERR_UNDEFID (Undefined ID)\n* 3 - HSX_ADMIN_ERR_REFERENCED (Object if referenced)\n* 4 - HSX_ADMIN_ERR_NAMEALREADYEXISTS (Name already exists)\n* 5 - HSX_ADMIN_ERR_UNDEFREFID (Undefined referenced ID)\n* 6 - HSX_ADMIN_ERR_PARAM (Bad parameter)\n* 7 - HSX_ADMIN_ERR_IMMUTABLE (Immutable)\n* 8 - HSX_ADMIN_ERR_BADPATH (Bad path format)\n* 9 - HSX_ADMIN_ERR_BADEXT (Bad extension format)\n* 10 - HSX_ADMIN_ERR_BADNAME (Bad name format)\n* 11 - HSX_ADMIN_ERR_BUFFERTOOSHORT (Buffer too short)\n* 13 - HSX_ADMIN_ERR_PERM (Authentification error)\n* 103 - HSX_ADMIN_ERR_XML (Bad XML format)\n* 105 - HSX_ADMIN_ERR_MEM (Memory allocation issue)\n* 106 - HSX_ADMIN_ERR_DEL (Agent is waiting for deletion)\n* 107 - HSX_ADMIN_ERR_BAD_DATA_HEADER (POST data not prefixed with 'data=' or '<?xml')\n* 108 - HSX_ADMIN_ERR_BAD_COMMAND (Bad command)\n* 109 - HSX_ADMIN_ERR_BAD_DATA (Cannot get POST data)\n* 111 - HSX_ADMIN_ERR_NONEX (Object does not exist)\n* 199 - HSX_ADMIN_ERR_INT (Internal error)\n* 999 - HSX_ADMIN_ERR (Generic error)\n","default":0},"StatusMsg":{"type":"string","description":"Status message","enum":["HSX_ADMIN_OK","HSX_ADMIN_ERR_UNDEFID","HSX_ADMIN_ERR_REFERENCED","HSX_ADMIN_ERR_NAMEALREADYEXISTS","HSX_ADMIN_ERR_UNDEFREFID","HSX_ADMIN_ERR_PARAM","HSX_ADMIN_ERR_IMMUTABLE","HSX_ADMIN_ERR_BADPATH","HSX_ADMIN_ERR_BADEXT","HSX_ADMIN_ERR_BADNAME","HSX_ADMIN_ERR_BUFFERTOOSHORT","HSX_ADMIN_ERR_PERM","HSX_ADMIN_ERR_XML","HSX_ADMIN_ERR_MEM","HSX_ADMIN_ERR_DEL","HSX_ADMIN_ERR_BAD_DATA_HEADER","HSX_ADMIN_ERR_BAD_COMMAND","HSX_ADMIN_ERR_BAD_DATA","HSX_ADMIN_ERR_NONEX","HSX_ADMIN_ERR_INT","HSX_ADMIN_ERR"],"default":"HSX_ADMIN_OK"}}},"paths":{"/stats_globals.json":{"get":{"tags":["Stats"],"summary":"Get version & agents global infos","description":"Get version & agents global infos","operationId":"stats_globals","parameters":[{"name":"get_waiting","in":"query","description":"Tag 'NbWaiting' is provided only if 'get_waiting' is set","required":false,"schema":{"type":"boolean"},"allowEmptyValue":true},{"name":"domain_id","in":"query","description":"Get infos of tenant ID 'domain_id' (reserved for super-admin)","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"inactive_time","in":"query","description":"To calculate the number of inactive clients since N second(s)","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"Infos":{"type":"object","properties":{"PluginVersion":{"type":"string","description":"Version of the plugin"},"PluginEngineVersion":{"type":"integer","format":"int32","description":"Version of the plugin (engine)"},"NumberOfClients":{"type":"integer","format":"int32","description":"Total number of agents"},"NbAgents":{"type":"integer","format":"int32","description":"Number of agents in normal state"},"NbDeletion":{"type":"integer","format":"int32","description":"Number of agents awaiting deletion"},"NbHVDS":{"type":"integer","format":"int32","description":"Number of HVDS streams"},"NbUnlinked":{"type":"integer","format":"int32","description":"Number of agents awaiting declaration"},"NbSyncAlerts":{"type":"integer","format":"int32","description":"Number of synchronisation alerts"},"NbQuotaAlerts":{"type":"integer","format":"int32","description":"Number of quota alerts"},"NbInactive":{"type":"integer","format":"int32","description":"Number of inactive agents (depending on 'inactive_time' parameter) / null if 'inactive_time' is not defined or 0","nullable":true},"NbObsolete":{"type":"integer","format":"int32","description":"Number of obsolete agents"},"NbWaiting":{"type":"integer","format":"int32","description":"Number of waiting agents"}}},"status":{"$ref":"#/components/schemas/StatusCode"},"status_msg":{"$ref":"#/components/schemas/StatusMsg"}}}}}}}}}}}
```

## Get the list of waiting agents

> Get the list of the agents who tried to declare themselves (without auto-creation)

```json
{"openapi":"3.0.1","info":{"title":"Lina Admin API","version":"7.3.0"},"tags":[{"name":"Stats","description":"Stats requests"}],"servers":[{"url":"/"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY"}},"schemas":{"SystemCateg":{"type":"integer","format":"int32","description":"System category code:\n* OS (0x0F00)\n- 0x0100 - SYSCATEG_WINDOWS\n- 0x0200 - SYSCATEG_LINUX\n- 0x0300 - SYSCATEG_MACOSX\n- 0x0500 - SYSCATEG_HVDS\n* Flags\n- 0x0010 - SYSCATEG_SERVER\n- 0x0020 - SYSCATEG_NAS\n- 0x0040 - SYSCATEG_REMOTE_NAS\n"},"StatusCode":{"type":"integer","format":"int32","enum":[0,1,3,4,5,6,7,8,9,10,11,13,103,105,106,107,108,109,111,199,999],"description":"Status code:\n* 0 - HSX_ADMIN_OK (OK)\n* 1 - HSX_ADMIN_ERR_UNDEFID (Undefined ID)\n* 3 - HSX_ADMIN_ERR_REFERENCED (Object if referenced)\n* 4 - HSX_ADMIN_ERR_NAMEALREADYEXISTS (Name already exists)\n* 5 - HSX_ADMIN_ERR_UNDEFREFID (Undefined referenced ID)\n* 6 - HSX_ADMIN_ERR_PARAM (Bad parameter)\n* 7 - HSX_ADMIN_ERR_IMMUTABLE (Immutable)\n* 8 - HSX_ADMIN_ERR_BADPATH (Bad path format)\n* 9 - HSX_ADMIN_ERR_BADEXT (Bad extension format)\n* 10 - HSX_ADMIN_ERR_BADNAME (Bad name format)\n* 11 - HSX_ADMIN_ERR_BUFFERTOOSHORT (Buffer too short)\n* 13 - HSX_ADMIN_ERR_PERM (Authentification error)\n* 103 - HSX_ADMIN_ERR_XML (Bad XML format)\n* 105 - HSX_ADMIN_ERR_MEM (Memory allocation issue)\n* 106 - HSX_ADMIN_ERR_DEL (Agent is waiting for deletion)\n* 107 - HSX_ADMIN_ERR_BAD_DATA_HEADER (POST data not prefixed with 'data=' or '<?xml')\n* 108 - HSX_ADMIN_ERR_BAD_COMMAND (Bad command)\n* 109 - HSX_ADMIN_ERR_BAD_DATA (Cannot get POST data)\n* 111 - HSX_ADMIN_ERR_NONEX (Object does not exist)\n* 199 - HSX_ADMIN_ERR_INT (Internal error)\n* 999 - HSX_ADMIN_ERR (Generic error)\n","default":0},"StatusMsg":{"type":"string","description":"Status message","enum":["HSX_ADMIN_OK","HSX_ADMIN_ERR_UNDEFID","HSX_ADMIN_ERR_REFERENCED","HSX_ADMIN_ERR_NAMEALREADYEXISTS","HSX_ADMIN_ERR_UNDEFREFID","HSX_ADMIN_ERR_PARAM","HSX_ADMIN_ERR_IMMUTABLE","HSX_ADMIN_ERR_BADPATH","HSX_ADMIN_ERR_BADEXT","HSX_ADMIN_ERR_BADNAME","HSX_ADMIN_ERR_BUFFERTOOSHORT","HSX_ADMIN_ERR_PERM","HSX_ADMIN_ERR_XML","HSX_ADMIN_ERR_MEM","HSX_ADMIN_ERR_DEL","HSX_ADMIN_ERR_BAD_DATA_HEADER","HSX_ADMIN_ERR_BAD_COMMAND","HSX_ADMIN_ERR_BAD_DATA","HSX_ADMIN_ERR_NONEX","HSX_ADMIN_ERR_INT","HSX_ADMIN_ERR"],"default":"HSX_ADMIN_OK"}}},"paths":{"/stats_clientswaiting.json":{"get":{"tags":["Stats"],"summary":"Get the list of waiting agents","description":"Get the list of the agents who tried to declare themselves (without auto-creation)","operationId":"stats_clientwaiting","parameters":[{"name":"domain_id","in":"query","description":"Get waiting agents of tenant ID 'domain_id' (reserved for super-admin)","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"WaitingAgents":{"type":"array","items":{"type":"object","properties":{"ServerFName":{"type":"string","description":"Node name in multiserver mode","nullable":true},"ComputerName":{"type":"string","description":"Hostname of the waiting agent"},"LastConnection":{"type":"integer","format":"int64","description":"Last connection timestamp (s)"},"SourceID":{"type":"string","description":"Source ID","default":"@"},"SystemCategory":{"$ref":"#/components/schemas/SystemCateg"},"System":{"type":"string","description":"OS description"}}}},"status":{"$ref":"#/components/schemas/StatusCode"},"status_msg":{"$ref":"#/components/schemas/StatusMsg"}}}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://documentation.atempo.com/lina-7.4/lina-7.4-en/release-information/rest-api-reference/administration/stats.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
