> 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/advanced-statistics/adv-stats.md). Agents can also search and read this documentation through its [MCP server](https://documentation.atempo.com/~gitbook/mcp).

# Adv Stats

Advanced Stats

## List agents

> List agents

```json
{"openapi":"3.0.1","info":{"title":"Lina Advanced Stats API","version":"7.3.0"},"tags":[{"name":"AdvStats","description":"Advanced Stats"}],"servers":[{"url":"/ALNSTATS"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY"}},"schemas":{"Status":{"type":"integer","format":"int32","enum":[0,3,13,104,999],"description":"Status code:\n* 0 - HN_STATS_OK (OK)\n* 3 - HN_STATS_ERR_BADCOMMAND (Bad command)\n* 13 - HN_STATS_ERR_PERM (Not authorized)\n* 104 - HN_STATS_ERR_BUFFER (Buffer too short)\n* 999 - HN_STATS_ERR (Generic error)\n","default":0},"StatusMsg":{"type":"string","description":"Status message","enum":["HN_STATS_OK","HN_STATS_ERR_BADCOMMAND","HN_STATS_ERR_PERM","HN_STATS_ERR_BUFFER","HN_STATS_ERR"],"default":"HN_STATS_OK"}}},"paths":{"/lstagents.json":{"get":{"tags":["AdvStats"],"summary":"List agents","description":"List agents","operationId":"lstagents","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"Agents":{"type":"array","items":{"type":"object","properties":{"Name":{"type":"string","description":"Agent name"}}}},"status":{"$ref":"#/components/schemas/Status"},"status_msg":{"$ref":"#/components/schemas/StatusMsg"}}}}}}}}}}}
```

## Get information about advanced stats update authorization

> Get information about advanced stats update authorization

```json
{"openapi":"3.0.1","info":{"title":"Lina Advanced Stats API","version":"7.3.0"},"tags":[{"name":"AdvStats","description":"Advanced Stats"}],"servers":[{"url":"/ALNSTATS"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY"}},"schemas":{"StatusAdv":{"type":"integer","format":"int32","enum":[0,1,3,4,11,12],"description":"Stats status code:\n* 0 - ADVSTAT_STATUS_ERR (Generic error)\n* 1 - ADVSTAT_STATUS_OK (OK)\n* 3 - ADVSTAT_STATUS_COMPUTING (Computing)\n* 4 - ADVSTAT_STATUS_PENDING (Pending)\n* 11 - ADVSTAT_STATUS_NOTALLOWED (Not authorized)\n* 12 - ADVSTAT_STATUS_UNKNOWNCLIENT (Client is unknown)\n","default":1},"StatusAdvMsg":{"type":"string","description":"Stats status message","enum":["ADVSTAT_STATUS_OK","ADVSTAT_STATUS_COMPUTING","ADVSTAT_STATUS_PENDING","ADVSTAT_STATUS_NOTALLOWED","ADVSTAT_STATUS_UNKNOWNCLIENT","ADVSTAT_STATUS_ERR"],"default":"ADVSTAT_STATUS_OK"},"Status":{"type":"integer","format":"int32","enum":[0,3,13,104,999],"description":"Status code:\n* 0 - HN_STATS_OK (OK)\n* 3 - HN_STATS_ERR_BADCOMMAND (Bad command)\n* 13 - HN_STATS_ERR_PERM (Not authorized)\n* 104 - HN_STATS_ERR_BUFFER (Buffer too short)\n* 999 - HN_STATS_ERR (Generic error)\n","default":0},"StatusMsg":{"type":"string","description":"Status message","enum":["HN_STATS_OK","HN_STATS_ERR_BADCOMMAND","HN_STATS_ERR_PERM","HN_STATS_ERR_BUFFER","HN_STATS_ERR"],"default":"HN_STATS_OK"}}},"paths":{"/updadvstatsallowed.json":{"get":{"tags":["AdvStats"],"summary":"Get information about advanced stats update authorization","description":"Get information about advanced stats update authorization","operationId":"updadvstatsallowed","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"StatsStatus":{"$ref":"#/components/schemas/StatusAdv"},"StatsStatus_msg":{"$ref":"#/components/schemas/StatusAdvMsg"},"status":{"$ref":"#/components/schemas/Status"},"status_msg":{"$ref":"#/components/schemas/StatusMsg"}}}}}}}}}}}
```

## Get advanced stats status

> Get advanced stats status

```json
{"openapi":"3.0.1","info":{"title":"Lina Advanced Stats API","version":"7.3.0"},"tags":[{"name":"AdvStats","description":"Advanced Stats"}],"servers":[{"url":"/ALNSTATS"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY"}},"schemas":{"StatusAdv":{"type":"integer","format":"int32","enum":[0,1,3,4,11,12],"description":"Stats status code:\n* 0 - ADVSTAT_STATUS_ERR (Generic error)\n* 1 - ADVSTAT_STATUS_OK (OK)\n* 3 - ADVSTAT_STATUS_COMPUTING (Computing)\n* 4 - ADVSTAT_STATUS_PENDING (Pending)\n* 11 - ADVSTAT_STATUS_NOTALLOWED (Not authorized)\n* 12 - ADVSTAT_STATUS_UNKNOWNCLIENT (Client is unknown)\n","default":1},"StatusAdvMsg":{"type":"string","description":"Stats status message","enum":["ADVSTAT_STATUS_OK","ADVSTAT_STATUS_COMPUTING","ADVSTAT_STATUS_PENDING","ADVSTAT_STATUS_NOTALLOWED","ADVSTAT_STATUS_UNKNOWNCLIENT","ADVSTAT_STATUS_ERR"],"default":"ADVSTAT_STATUS_OK"},"Status":{"type":"integer","format":"int32","enum":[0,3,13,104,999],"description":"Status code:\n* 0 - HN_STATS_OK (OK)\n* 3 - HN_STATS_ERR_BADCOMMAND (Bad command)\n* 13 - HN_STATS_ERR_PERM (Not authorized)\n* 104 - HN_STATS_ERR_BUFFER (Buffer too short)\n* 999 - HN_STATS_ERR (Generic error)\n","default":0},"StatusMsg":{"type":"string","description":"Status message","enum":["HN_STATS_OK","HN_STATS_ERR_BADCOMMAND","HN_STATS_ERR_PERM","HN_STATS_ERR_BUFFER","HN_STATS_ERR"],"default":"HN_STATS_OK"}}},"paths":{"/statusadvstats.json":{"get":{"tags":["AdvStats"],"summary":"Get advanced stats status","description":"Get advanced stats status","operationId":"statusadvstats","parameters":[{"name":"cli_name","in":"query","description":"Get status for agent 'cli_name' (global status if not provided)","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"StatsStatus":{"$ref":"#/components/schemas/StatusAdv"},"StatsStatus_msg":{"$ref":"#/components/schemas/StatusAdvMsg"},"LastCompleted":{"type":"integer","format":"int64","description":"Timestamp (ms) of last advanced stats complete computation"},"status":{"$ref":"#/components/schemas/Status"},"status_msg":{"$ref":"#/components/schemas/StatusMsg"}}}}}}}}}}}
```

## Update advanced stats

> Update advanced stats

```json
{"openapi":"3.0.1","info":{"title":"Lina Advanced Stats API","version":"7.3.0"},"tags":[{"name":"AdvStats","description":"Advanced Stats"}],"servers":[{"url":"/ALNSTATS"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY"}},"schemas":{"StatusAdv":{"type":"integer","format":"int32","enum":[0,1,3,4,11,12],"description":"Stats status code:\n* 0 - ADVSTAT_STATUS_ERR (Generic error)\n* 1 - ADVSTAT_STATUS_OK (OK)\n* 3 - ADVSTAT_STATUS_COMPUTING (Computing)\n* 4 - ADVSTAT_STATUS_PENDING (Pending)\n* 11 - ADVSTAT_STATUS_NOTALLOWED (Not authorized)\n* 12 - ADVSTAT_STATUS_UNKNOWNCLIENT (Client is unknown)\n","default":1},"StatusAdvMsg":{"type":"string","description":"Stats status message","enum":["ADVSTAT_STATUS_OK","ADVSTAT_STATUS_COMPUTING","ADVSTAT_STATUS_PENDING","ADVSTAT_STATUS_NOTALLOWED","ADVSTAT_STATUS_UNKNOWNCLIENT","ADVSTAT_STATUS_ERR"],"default":"ADVSTAT_STATUS_OK"},"Status":{"type":"integer","format":"int32","enum":[0,3,13,104,999],"description":"Status code:\n* 0 - HN_STATS_OK (OK)\n* 3 - HN_STATS_ERR_BADCOMMAND (Bad command)\n* 13 - HN_STATS_ERR_PERM (Not authorized)\n* 104 - HN_STATS_ERR_BUFFER (Buffer too short)\n* 999 - HN_STATS_ERR (Generic error)\n","default":0},"StatusMsg":{"type":"string","description":"Status message","enum":["HN_STATS_OK","HN_STATS_ERR_BADCOMMAND","HN_STATS_ERR_PERM","HN_STATS_ERR_BUFFER","HN_STATS_ERR"],"default":"HN_STATS_OK"}}},"paths":{"/updadvstats.json":{"get":{"tags":["AdvStats"],"summary":"Update advanced stats","description":"Update advanced stats","operationId":"updadvstats","parameters":[{"name":"cli_name","in":"query","description":"Update advanced stats for agent 'cli_name' (all + global if not provided)","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"StatsStatus":{"$ref":"#/components/schemas/StatusAdv"},"StatsStatus_msg":{"$ref":"#/components/schemas/StatusAdvMsg"},"status":{"$ref":"#/components/schemas/Status"},"status_msg":{"$ref":"#/components/schemas/StatusMsg"}}}}}}}}}}}
```

## Get advanced stats results

> Get advanced stats results

```json
{"openapi":"3.0.1","info":{"title":"Lina Advanced Stats API","version":"7.3.0"},"tags":[{"name":"AdvStats","description":"Advanced Stats"}],"servers":[{"url":"/ALNSTATS"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-KEY"}},"schemas":{"StatusAdv":{"type":"integer","format":"int32","enum":[0,1,3,4,11,12],"description":"Stats status code:\n* 0 - ADVSTAT_STATUS_ERR (Generic error)\n* 1 - ADVSTAT_STATUS_OK (OK)\n* 3 - ADVSTAT_STATUS_COMPUTING (Computing)\n* 4 - ADVSTAT_STATUS_PENDING (Pending)\n* 11 - ADVSTAT_STATUS_NOTALLOWED (Not authorized)\n* 12 - ADVSTAT_STATUS_UNKNOWNCLIENT (Client is unknown)\n","default":1},"StatusAdvMsg":{"type":"string","description":"Stats status message","enum":["ADVSTAT_STATUS_OK","ADVSTAT_STATUS_COMPUTING","ADVSTAT_STATUS_PENDING","ADVSTAT_STATUS_NOTALLOWED","ADVSTAT_STATUS_UNKNOWNCLIENT","ADVSTAT_STATUS_ERR"],"default":"ADVSTAT_STATUS_OK"},"TypeCode":{"type":"integer","format":"int32","enum":[1,2,3,10,21,22,23,24,25],"description":"Type code:\n* 1 - HN_FILETYPE_REG (regular file)\n* 2 - HN_FILETYPE_DIR  (directory)\n* 3 - HN_FILETYPE_SYMLINK (symbolic link / reparse point)\n* 10 - HN_FILETYPE_EFS (Windows Encrypted FileSystem)\n* 21 - HN_FILETYPE_FIFO (UNIX named pipe)\n* 22 - HN_FILETYPE_SOCK (UNIX socket)\n* 23 - HN_FILETYPE_BSPE (UNIX block device)\n* 24 - HN_FILETYPE_CSPE (UNIX character device)\n* 25 - HN_FILETYPE_DOOR (UNIX door)\n"},"Status":{"type":"integer","format":"int32","enum":[0,3,13,104,999],"description":"Status code:\n* 0 - HN_STATS_OK (OK)\n* 3 - HN_STATS_ERR_BADCOMMAND (Bad command)\n* 13 - HN_STATS_ERR_PERM (Not authorized)\n* 104 - HN_STATS_ERR_BUFFER (Buffer too short)\n* 999 - HN_STATS_ERR (Generic error)\n","default":0},"StatusMsg":{"type":"string","description":"Status message","enum":["HN_STATS_OK","HN_STATS_ERR_BADCOMMAND","HN_STATS_ERR_PERM","HN_STATS_ERR_BUFFER","HN_STATS_ERR"],"default":"HN_STATS_OK"}}},"paths":{"/getadvstats.json":{"get":{"tags":["AdvStats"],"summary":"Get advanced stats results","description":"Get advanced stats results","operationId":"getadvstats","parameters":[{"name":"nb_res","in":"query","description":"Number of results (20 if not provided ; max if 0)","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"cli_name","in":"query","description":"Get advanced stats for agent 'cli_name' (global if not provided)","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"StatsStatus":{"$ref":"#/components/schemas/StatusAdv"},"StatsStatus_msg":{"$ref":"#/components/schemas/StatusAdvMsg"},"LastCompleted":{"type":"integer","format":"int64","description":"Timestamp (ms) of last advanced stats complete computation"},"LargestFiles":{"type":"object","properties":{"Total":{"type":"integer","format":"int64","description":"Total size (B) of non expired objects' last versions"},"Files":{"type":"array","description":"Largests non expired objects","items":{"type":"object","properties":{"Path":{"type":"string","description":"Path of the object (server format)"},"Size":{"type":"integer","format":"int64","description":"Size of the object (B)"}}}}}},"LargestFilesAllVers":{"type":"object","properties":{"Total":{"type":"integer","format":"int64","description":"Total size (B) of all objects versions"},"Files":{"type":"array","description":"Largests objects (all versions)","items":{"type":"object","properties":{"Path":{"type":"string","description":"Path of the object (server format)"},"Size":{"type":"integer","format":"int64","description":"Size of the object (B)"}}}}}},"MostInstancesFilesAllVers":{"type":"object","properties":{"Total":{"type":"integer","format":"int64","description":"Total number of objects versions"},"Files":{"type":"array","description":"Objects with the most number of versions","items":{"type":"object","properties":{"Path":{"type":"string","description":"Path of the object (server format)"},"NbInstances":{"type":"integer","format":"int64","description":"Number of versions of this object"}}}}}},"LargestExts":{"type":"object","properties":{"Total":{"type":"integer","format":"int64","description":"Total size (B) of non expired objects' last versions"},"Extensions":{"type":"array","description":"Largests non expired objects by extension / type","items":{"type":"object","properties":{"String":{"type":"string","description":"Extension + ' Files' / Type ('Folders', 'Symbolic Link'…)"},"Size":{"type":"integer","format":"int64","description":"Total size for non expired files with this extension / objects of this type"}}}}}},"LargestExtsAllVers":{"type":"object","properties":{"Total":{"type":"integer","format":"int64","description":"Total size (B) of all objects versions"},"Extensions":{"type":"array","description":"Largests objects (all versions) by extension / type","items":{"type":"object","properties":{"String":{"type":"string","description":"Extension + ' Files' / Type ('Folders', 'Symbolic Link'…)"},"Size":{"type":"integer","format":"int64","description":"Total size for all versions of files with this extension / objects of this type"}}}}}},"MostInstancesExts":{"type":"object","properties":{"Total":{"type":"integer","format":"int64","description":"Total number of non expired objects versions"},"Extensions":{"type":"array","description":"Most non expired objects by extension / type","items":{"type":"object","properties":{"String":{"type":"string","description":"Extension + ' Files' / Type ('Folders', 'Symbolic Link'…)"},"NbInstances":{"type":"integer","format":"int64","description":"Number of non expired files with this extension / object of this type"}}}}}},"MostInstancesExtsAllVers":{"type":"object","properties":{"Total":{"type":"integer","format":"int64","description":"Total number of objects versions"},"Extensions":{"type":"array","description":"Most objects (all versions) by extension / type","items":{"type":"object","properties":{"String":{"type":"string","description":"Extension + ' Files' / Type ('Folders', 'Symbolic Link'…)"},"NbInstances":{"type":"integer","format":"int64","description":"Number of versions for files with this extension / object of this type"}}}}}},"TypesInstances":{"type":"object","properties":{"Total":{"type":"integer","format":"int64","description":"Total number of non expired objects versions"},"Types":{"type":"array","description":"Most non expired objects by type","items":{"type":"object","properties":{"Code":{"$ref":"#/components/schemas/TypeCode"},"NbInstances":{"type":"integer","format":"int64","description":"Number of non expired object of this type"}}}}}},"TypesInstancesAllVers":{"type":"object","properties":{"Total":{"type":"integer","format":"int64","description":"Total number of objects versions"},"Types":{"type":"array","description":"Most objects (all versions) by type","items":{"type":"object","properties":{"Code":{"$ref":"#/components/schemas/TypeCode"},"NbInstances":{"type":"integer","format":"int64","description":"Number of versions for objects of this type"}}}}}},"status":{"$ref":"#/components/schemas/Status"},"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/advanced-statistics/adv-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.
