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

# Web Restore

Web Restore

## Get the public SSL key of the server

> Get the public SSL key of the server

```json
{"openapi":"3.0.1","info":{"title":"Lina Web Restore API","version":"7.3.0"},"tags":[{"name":"WebRestore","description":"Web Restore"}],"servers":[{"url":"/ALNWEB"}],"paths":{"/getpublickey.json":{"get":{"tags":["WebRestore"],"summary":"Get the public SSL key of the server","description":"Get the public SSL key of the server","operationId":"getpublickey","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"PublicKey":{"type":"string","description":"Public SSL key of the server"},"status":{"$ref":"#/components/schemas/Status"},"status_msg":{"$ref":"#/components/schemas/StatusMsg"}}}}}}}}}},"components":{"schemas":{"Status":{"type":"integer","format":"int32","enum":[0,2,3,4,5,6,102,104,199,200,999],"description":"Status code:\n* 0 - HN_WEB_OK (OK)\n* 2 - HN_WEB_ERR_PARAM (Bad parameter)\n* 3 - HN_WEB_ERR_BADCOMMAND (Bad command)\n* 4 - HN_WEB_ERR_NOTACTIV (Web restore not active)\n* 5 - HN_WEB_ERR_NOSESS (No session)\n* 6 - HN_WEB_ERR_LOCKED (Restore context locked)\n* 102 - HN_WEB_ERR_XML (Bad XML format)\n* 104 - HN_WEB_ERR_BUFFER (Buffer too small)\n* 199 - HN_WEB_ERR_INT (Internal error)\n* 200 - HN_WEB_ERR_AUTH (Authentification issue)\n* 999 - HN_WEB_ERR (Generic error)\n","default":0},"StatusMsg":{"type":"string","description":"Status message","enum":["HN_WEB_OK","HN_WEB_ERR_PARAM","HN_WEB_ERR_BADCOMMAND","HN_WEB_ERR_NOTACTIV","HN_WEB_ERR_NOSESS","HN_WEB_ERR_LOCKED","HN_WEB_ERR_XML","HN_WEB_ERR_BUFFER","HN_WEB_ERR_INT","HN_WEB_ERR_AUTH","HN_WEB_ERR"],"default":"HN_WEB_OK"}}}}
```

## List available agents for web restore

> List available agents for web restore

```json
{"openapi":"3.0.1","info":{"title":"Lina Web Restore API","version":"7.3.0"},"tags":[{"name":"WebRestore","description":"Web Restore"}],"servers":[{"url":"/ALNWEB"}],"paths":{"/listagents.json":{"post":{"tags":["WebRestore"],"summary":"List available agents for web restore","description":"List available agents for web restore","operationId":"listagents","requestBody":{"description":"Parameters","content":{"application/xml":{"schema":{"type":"object","required":["Ident","GlobalAccess"],"properties":{"Ident":{"type":"string","format":"email","description":"Agent(s) identification"},"GlobalAccess":{"type":"string","description":"Global web restore password","format":"password"}},"xml":{"name":"Params"}}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"Agents":{"type":"array","items":{"type":"object","properties":{"AdminName":{"type":"string","description":"Admin name of the agent"},"ComputerName":{"type":"string","description":"Computer name"},"OS":{"type":"string","description":"OS description"},"Email":{"type":"string","description":"E-mail"},"Allowed":{"type":"boolean","description":"Web restore allowed for this agent?","default":true},"NodeAccess":{"type":"string","description":"Access to the node in multi-server mode"},"NodeName":{"type":"string","description":"Friendly name of the node in multi-server mode"}}}},"status":{"$ref":"#/components/schemas/Status"},"status_msg":{"$ref":"#/components/schemas/StatusMsg"}}}}}}}}}},"components":{"schemas":{"Status":{"type":"integer","format":"int32","enum":[0,2,3,4,5,6,102,104,199,200,999],"description":"Status code:\n* 0 - HN_WEB_OK (OK)\n* 2 - HN_WEB_ERR_PARAM (Bad parameter)\n* 3 - HN_WEB_ERR_BADCOMMAND (Bad command)\n* 4 - HN_WEB_ERR_NOTACTIV (Web restore not active)\n* 5 - HN_WEB_ERR_NOSESS (No session)\n* 6 - HN_WEB_ERR_LOCKED (Restore context locked)\n* 102 - HN_WEB_ERR_XML (Bad XML format)\n* 104 - HN_WEB_ERR_BUFFER (Buffer too small)\n* 199 - HN_WEB_ERR_INT (Internal error)\n* 200 - HN_WEB_ERR_AUTH (Authentification issue)\n* 999 - HN_WEB_ERR (Generic error)\n","default":0},"StatusMsg":{"type":"string","description":"Status message","enum":["HN_WEB_OK","HN_WEB_ERR_PARAM","HN_WEB_ERR_BADCOMMAND","HN_WEB_ERR_NOTACTIV","HN_WEB_ERR_NOSESS","HN_WEB_ERR_LOCKED","HN_WEB_ERR_XML","HN_WEB_ERR_BUFFER","HN_WEB_ERR_INT","HN_WEB_ERR_AUTH","HN_WEB_ERR"],"default":"HN_WEB_OK"}}}}
```

## Request web restore access for an agent

> Request web restore access for an agent

```json
{"openapi":"3.0.1","info":{"title":"Lina Web Restore API","version":"7.3.0"},"tags":[{"name":"WebRestore","description":"Web Restore"}],"servers":[{"url":"/ALNWEB"}],"paths":{"/requestaccess.json":{"post":{"tags":["WebRestore"],"summary":"Request web restore access for an agent","description":"Request web restore access for an agent","operationId":"requestaccess","requestBody":{"description":"Parameters","content":{"application/xml":{"schema":{"type":"object","required":["Ident","AdminName"],"properties":{"Ident":{"type":"string","format":"email","description":"Agent(s) identification"},"AdminName":{"type":"string","description":"Admin name of the agent"}},"xml":{"name":"Params"}}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/Status"},"status_msg":{"$ref":"#/components/schemas/StatusMsg"}}}}}}}}}},"components":{"schemas":{"Status":{"type":"integer","format":"int32","enum":[0,2,3,4,5,6,102,104,199,200,999],"description":"Status code:\n* 0 - HN_WEB_OK (OK)\n* 2 - HN_WEB_ERR_PARAM (Bad parameter)\n* 3 - HN_WEB_ERR_BADCOMMAND (Bad command)\n* 4 - HN_WEB_ERR_NOTACTIV (Web restore not active)\n* 5 - HN_WEB_ERR_NOSESS (No session)\n* 6 - HN_WEB_ERR_LOCKED (Restore context locked)\n* 102 - HN_WEB_ERR_XML (Bad XML format)\n* 104 - HN_WEB_ERR_BUFFER (Buffer too small)\n* 199 - HN_WEB_ERR_INT (Internal error)\n* 200 - HN_WEB_ERR_AUTH (Authentification issue)\n* 999 - HN_WEB_ERR (Generic error)\n","default":0},"StatusMsg":{"type":"string","description":"Status message","enum":["HN_WEB_OK","HN_WEB_ERR_PARAM","HN_WEB_ERR_BADCOMMAND","HN_WEB_ERR_NOTACTIV","HN_WEB_ERR_NOSESS","HN_WEB_ERR_LOCKED","HN_WEB_ERR_XML","HN_WEB_ERR_BUFFER","HN_WEB_ERR_INT","HN_WEB_ERR_AUTH","HN_WEB_ERR"],"default":"HN_WEB_OK"}}}}
```

## Select an agent for web restore

> Select an agent for web restore

```json
{"openapi":"3.0.1","info":{"title":"Lina Web Restore API","version":"7.3.0"},"tags":[{"name":"WebRestore","description":"Web Restore"}],"servers":[{"url":"/ALNWEB"}],"paths":{"/selectagent.json":{"post":{"tags":["WebRestore"],"summary":"Select an agent for web restore","description":"Select an agent for web restore","operationId":"selectagent","requestBody":{"description":"Parameters","content":{"application/xml":{"schema":{"type":"object","required":["AdminName"],"properties":{"AdminName":{"type":"string","description":"Admin name of the agent"},"GlobalAccess":{"type":"string","description":"Global web restore password (for admin web restore)","format":"password"},"Access":{"type":"string","description":"Code provided by requestaccess (through e-mail, for agent web restore)","format":"password"}},"xml":{"name":"Params"}}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"WebID":{"$ref":"#/components/schemas/WebID"},"LeaseTime":{"type":"integer","format":"int64","description":"Lease time of the web restore context (ms)","default":60000},"PathEncodingWin":{"type":"boolean","description":"Paths use windows format?","default":false},"status":{"$ref":"#/components/schemas/Status"},"status_msg":{"$ref":"#/components/schemas/StatusMsg"}}}}}}}}}},"components":{"schemas":{"WebID":{"type":"string","description":"Web restore context UUID ('WR' + hexa)"},"Status":{"type":"integer","format":"int32","enum":[0,2,3,4,5,6,102,104,199,200,999],"description":"Status code:\n* 0 - HN_WEB_OK (OK)\n* 2 - HN_WEB_ERR_PARAM (Bad parameter)\n* 3 - HN_WEB_ERR_BADCOMMAND (Bad command)\n* 4 - HN_WEB_ERR_NOTACTIV (Web restore not active)\n* 5 - HN_WEB_ERR_NOSESS (No session)\n* 6 - HN_WEB_ERR_LOCKED (Restore context locked)\n* 102 - HN_WEB_ERR_XML (Bad XML format)\n* 104 - HN_WEB_ERR_BUFFER (Buffer too small)\n* 199 - HN_WEB_ERR_INT (Internal error)\n* 200 - HN_WEB_ERR_AUTH (Authentification issue)\n* 999 - HN_WEB_ERR (Generic error)\n","default":0},"StatusMsg":{"type":"string","description":"Status message","enum":["HN_WEB_OK","HN_WEB_ERR_PARAM","HN_WEB_ERR_BADCOMMAND","HN_WEB_ERR_NOTACTIV","HN_WEB_ERR_NOSESS","HN_WEB_ERR_LOCKED","HN_WEB_ERR_XML","HN_WEB_ERR_BUFFER","HN_WEB_ERR_INT","HN_WEB_ERR_AUTH","HN_WEB_ERR"],"default":"HN_WEB_OK"}}}}
```

## Get the protection status on an agent

> Get the protection status on an agent

```json
{"openapi":"3.0.1","info":{"title":"Lina Web Restore API","version":"7.3.0"},"tags":[{"name":"WebRestore","description":"Web Restore"}],"servers":[{"url":"/ALNWEB"}],"paths":{"/getsyncinfo.json":{"post":{"tags":["WebRestore"],"summary":"Get the protection status on an agent","description":"Get the protection status on an agent","operationId":"getsyncinfo","requestBody":{"description":"Parameters","content":{"application/xml":{"schema":{"type":"object","required":["WebID"],"properties":{"WebID":{"$ref":"#/components/schemas/WebID"}},"xml":{"name":"Params"}}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"LastSync":{"type":"integer","format":"int64","description":"Last synchronisation timestamp (0 if unknown) - last completed session without errors"},"LastSession":{"type":"integer","format":"int64","description":"Last completed session timestamp (0 if unknown)"},"status":{"$ref":"#/components/schemas/Status"},"status_msg":{"$ref":"#/components/schemas/StatusMsg"}}}}}}}}}},"components":{"schemas":{"WebID":{"type":"string","description":"Web restore context UUID ('WR' + hexa)"},"Status":{"type":"integer","format":"int32","enum":[0,2,3,4,5,6,102,104,199,200,999],"description":"Status code:\n* 0 - HN_WEB_OK (OK)\n* 2 - HN_WEB_ERR_PARAM (Bad parameter)\n* 3 - HN_WEB_ERR_BADCOMMAND (Bad command)\n* 4 - HN_WEB_ERR_NOTACTIV (Web restore not active)\n* 5 - HN_WEB_ERR_NOSESS (No session)\n* 6 - HN_WEB_ERR_LOCKED (Restore context locked)\n* 102 - HN_WEB_ERR_XML (Bad XML format)\n* 104 - HN_WEB_ERR_BUFFER (Buffer too small)\n* 199 - HN_WEB_ERR_INT (Internal error)\n* 200 - HN_WEB_ERR_AUTH (Authentification issue)\n* 999 - HN_WEB_ERR (Generic error)\n","default":0},"StatusMsg":{"type":"string","description":"Status message","enum":["HN_WEB_OK","HN_WEB_ERR_PARAM","HN_WEB_ERR_BADCOMMAND","HN_WEB_ERR_NOTACTIV","HN_WEB_ERR_NOSESS","HN_WEB_ERR_LOCKED","HN_WEB_ERR_XML","HN_WEB_ERR_BUFFER","HN_WEB_ERR_INT","HN_WEB_ERR_AUTH","HN_WEB_ERR"],"default":"HN_WEB_OK"}}}}
```

## Get the valid protection range of a path on an agent

> Get the valid protection range of a path on an agent

```json
{"openapi":"3.0.1","info":{"title":"Lina Web Restore API","version":"7.3.0"},"tags":[{"name":"WebRestore","description":"Web Restore"}],"servers":[{"url":"/ALNWEB"}],"paths":{"/getvalidrange.json":{"post":{"tags":["WebRestore"],"summary":"Get the valid protection range of a path on an agent","description":"Get the valid protection range of a path on an agent","operationId":"getvalidrange","requestBody":{"description":"Parameters","content":{"application/xml":{"schema":{"type":"object","required":["WebID","Path"],"properties":{"WebID":{"$ref":"#/components/schemas/WebID"},"Path":{"$ref":"#/components/schemas/Path"}},"xml":{"name":"Params"}}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"MinPIT":{"type":"integer","format":"int64","description":"Timestamp of first known version (ms)"},"MaxPIT":{"type":"integer","format":"int64","description":"Timestamp of last known version (ms)"},"status":{"$ref":"#/components/schemas/Status"},"status_msg":{"$ref":"#/components/schemas/StatusMsg"}}}}}}}}}},"components":{"schemas":{"WebID":{"type":"string","description":"Web restore context UUID ('WR' + hexa)"},"Path":{"type":"string","description":"Path"},"Status":{"type":"integer","format":"int32","enum":[0,2,3,4,5,6,102,104,199,200,999],"description":"Status code:\n* 0 - HN_WEB_OK (OK)\n* 2 - HN_WEB_ERR_PARAM (Bad parameter)\n* 3 - HN_WEB_ERR_BADCOMMAND (Bad command)\n* 4 - HN_WEB_ERR_NOTACTIV (Web restore not active)\n* 5 - HN_WEB_ERR_NOSESS (No session)\n* 6 - HN_WEB_ERR_LOCKED (Restore context locked)\n* 102 - HN_WEB_ERR_XML (Bad XML format)\n* 104 - HN_WEB_ERR_BUFFER (Buffer too small)\n* 199 - HN_WEB_ERR_INT (Internal error)\n* 200 - HN_WEB_ERR_AUTH (Authentification issue)\n* 999 - HN_WEB_ERR (Generic error)\n","default":0},"StatusMsg":{"type":"string","description":"Status message","enum":["HN_WEB_OK","HN_WEB_ERR_PARAM","HN_WEB_ERR_BADCOMMAND","HN_WEB_ERR_NOTACTIV","HN_WEB_ERR_NOSESS","HN_WEB_ERR_LOCKED","HN_WEB_ERR_XML","HN_WEB_ERR_BUFFER","HN_WEB_ERR_INT","HN_WEB_ERR_AUTH","HN_WEB_ERR"],"default":"HN_WEB_OK"}}}}
```

## Browse objects under a path on an agent at a certain point in time

> Browse objects under a path on an agent at a certain point in time

```json
{"openapi":"3.0.1","info":{"title":"Lina Web Restore API","version":"7.3.0"},"tags":[{"name":"WebRestore","description":"Web Restore"}],"servers":[{"url":"/ALNWEB"}],"paths":{"/browseatpit.json":{"post":{"tags":["WebRestore"],"summary":"Browse objects under a path on an agent at a certain point in time","description":"Browse objects under a path on an agent at a certain point in time","operationId":"browseatpit","requestBody":{"description":"Parameters","content":{"application/xml":{"schema":{"type":"object","required":["WebID","Path","PIT"],"properties":{"WebID":{"$ref":"#/components/schemas/WebID"},"Path":{"$ref":"#/components/schemas/Path"},"PIT":{"$ref":"#/components/schemas/PIT"},"CompPIT":{"$ref":"#/components/schemas/PIT"},"GetFolders":{"type":"integer","format":"int32","description":"Get folders in the results? (0/1)","default":0},"GetFiles":{"type":"integer","format":"int32","description":"Get files in the results? (0/1)","default":0},"Recurse":{"type":"integer","format":"int32","description":"Recurse? (0/1)","default":0}},"xml":{"name":"Params"}}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"Results":{"type":"array","items":{"type":"object","properties":{"Name":{"type":"string","description":"Name of the object under 'Path'"},"MirrorAt":{"type":"integer","format":"int64","description":"Date of the creation of the object under 'Path'"},"ExpiredAt":{"type":"integer","format":"int64","description":"Date of the destruction of the object under 'Path' (or 0 if still valid)","default":0},"Parent":{"type":"boolean","description":"The object under 'Path' is a folder?"},"Type":{"$ref":"#/components/schemas/FileType"},"Size":{"type":"integer","format":"int64","description":"Size of the object under 'Path' (B)"},"CompStatus":{"description":"Comparison status if any:\n* '=' - Unchanged\n* '*' - Modified\n* '+' - Appeared\n* '-' - Disappeard\n","type":"string","enum":["=","*","+","-"]},"NoWebRest":{"type":"boolean","description":"The object under 'Path' should not be restored through web?","default":false}}}},"MoreResults":{"$ref":"#/components/schemas/MoreResults"},"status":{"$ref":"#/components/schemas/Status"},"status_msg":{"$ref":"#/components/schemas/StatusMsg"}}}}}}}}}},"components":{"schemas":{"WebID":{"type":"string","description":"Web restore context UUID ('WR' + hexa)"},"Path":{"type":"string","description":"Path"},"PIT":{"type":"integer","format":"int64","description":"Milliseconds since January 1st, 1970, GMT time zone / 0 for current time","default":0},"FileType":{"type":"integer","format":"int32","enum":[1,2,3,10,21,22,23,24,25],"description":"File type:\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","default":1},"MoreResults":{"type":"boolean","default":false,"description":"If true, the results provided are incomplete (due to the API limitations)"},"Status":{"type":"integer","format":"int32","enum":[0,2,3,4,5,6,102,104,199,200,999],"description":"Status code:\n* 0 - HN_WEB_OK (OK)\n* 2 - HN_WEB_ERR_PARAM (Bad parameter)\n* 3 - HN_WEB_ERR_BADCOMMAND (Bad command)\n* 4 - HN_WEB_ERR_NOTACTIV (Web restore not active)\n* 5 - HN_WEB_ERR_NOSESS (No session)\n* 6 - HN_WEB_ERR_LOCKED (Restore context locked)\n* 102 - HN_WEB_ERR_XML (Bad XML format)\n* 104 - HN_WEB_ERR_BUFFER (Buffer too small)\n* 199 - HN_WEB_ERR_INT (Internal error)\n* 200 - HN_WEB_ERR_AUTH (Authentification issue)\n* 999 - HN_WEB_ERR (Generic error)\n","default":0},"StatusMsg":{"type":"string","description":"Status message","enum":["HN_WEB_OK","HN_WEB_ERR_PARAM","HN_WEB_ERR_BADCOMMAND","HN_WEB_ERR_NOTACTIV","HN_WEB_ERR_NOSESS","HN_WEB_ERR_LOCKED","HN_WEB_ERR_XML","HN_WEB_ERR_BUFFER","HN_WEB_ERR_INT","HN_WEB_ERR_AUTH","HN_WEB_ERR"],"default":"HN_WEB_OK"}}}}
```

## List versions of an object on an agent

> List versions of an object on an agent

```json
{"openapi":"3.0.1","info":{"title":"Lina Web Restore API","version":"7.3.0"},"tags":[{"name":"WebRestore","description":"Web Restore"}],"servers":[{"url":"/ALNWEB"}],"paths":{"/listversions.json":{"post":{"tags":["WebRestore"],"summary":"List versions of an object on an agent","description":"List versions of an object on an agent","operationId":"listversions","requestBody":{"description":"Parameters","content":{"application/xml":{"schema":{"type":"object","required":["WebID","Path"],"properties":{"WebID":{"$ref":"#/components/schemas/WebID"},"Path":{"$ref":"#/components/schemas/Path"}},"xml":{"name":"Params"}}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"Results":{"type":"array","items":{"type":"object","properties":{"MirrorAt":{"type":"integer","format":"int64","description":"Date of the creation of version of the object"},"ExpiredAt":{"type":"integer","format":"int64","description":"Date of the destruction of the version of the object (or 0 if still valid)","default":0},"Parent":{"type":"boolean","description":"The version of the object is a folder?"},"Type":{"$ref":"#/components/schemas/FileType"},"Size":{"type":"integer","format":"int64","description":"Size of the version of the object (B)"},"NoWebRest":{"type":"boolean","description":"The version of the object should not be restored through web?","default":false}}}},"MoreResults":{"$ref":"#/components/schemas/MoreResults"},"status":{"$ref":"#/components/schemas/Status"},"status_msg":{"$ref":"#/components/schemas/StatusMsg"}}}}}}}}}},"components":{"schemas":{"WebID":{"type":"string","description":"Web restore context UUID ('WR' + hexa)"},"Path":{"type":"string","description":"Path"},"FileType":{"type":"integer","format":"int32","enum":[1,2,3,10,21,22,23,24,25],"description":"File type:\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","default":1},"MoreResults":{"type":"boolean","default":false,"description":"If true, the results provided are incomplete (due to the API limitations)"},"Status":{"type":"integer","format":"int32","enum":[0,2,3,4,5,6,102,104,199,200,999],"description":"Status code:\n* 0 - HN_WEB_OK (OK)\n* 2 - HN_WEB_ERR_PARAM (Bad parameter)\n* 3 - HN_WEB_ERR_BADCOMMAND (Bad command)\n* 4 - HN_WEB_ERR_NOTACTIV (Web restore not active)\n* 5 - HN_WEB_ERR_NOSESS (No session)\n* 6 - HN_WEB_ERR_LOCKED (Restore context locked)\n* 102 - HN_WEB_ERR_XML (Bad XML format)\n* 104 - HN_WEB_ERR_BUFFER (Buffer too small)\n* 199 - HN_WEB_ERR_INT (Internal error)\n* 200 - HN_WEB_ERR_AUTH (Authentification issue)\n* 999 - HN_WEB_ERR (Generic error)\n","default":0},"StatusMsg":{"type":"string","description":"Status message","enum":["HN_WEB_OK","HN_WEB_ERR_PARAM","HN_WEB_ERR_BADCOMMAND","HN_WEB_ERR_NOTACTIV","HN_WEB_ERR_NOSESS","HN_WEB_ERR_LOCKED","HN_WEB_ERR_XML","HN_WEB_ERR_BUFFER","HN_WEB_ERR_INT","HN_WEB_ERR_AUTH","HN_WEB_ERR"],"default":"HN_WEB_OK"}}}}
```

## Get known sets of extensions

> Get known sets of extensions

```json
{"openapi":"3.0.1","info":{"title":"Lina Web Restore API","version":"7.3.0"},"tags":[{"name":"WebRestore","description":"Web Restore"}],"servers":[{"url":"/ALNWEB"}],"paths":{"/getfiletypes.json":{"get":{"tags":["WebRestore"],"summary":"Get known sets of extensions","description":"Get known sets of extensions","operationId":"getfiletypes","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"FileTypes":{"type":"array","items":{"type":"object","properties":{"Name":{"type":"string","description":"Name of the set"},"Patterns":{"type":"array","items":{"type":"string","description":"Extension"}}}}},"status":{"$ref":"#/components/schemas/Status"},"status_msg":{"$ref":"#/components/schemas/StatusMsg"}}}}}}}}}},"components":{"schemas":{"Status":{"type":"integer","format":"int32","enum":[0,2,3,4,5,6,102,104,199,200,999],"description":"Status code:\n* 0 - HN_WEB_OK (OK)\n* 2 - HN_WEB_ERR_PARAM (Bad parameter)\n* 3 - HN_WEB_ERR_BADCOMMAND (Bad command)\n* 4 - HN_WEB_ERR_NOTACTIV (Web restore not active)\n* 5 - HN_WEB_ERR_NOSESS (No session)\n* 6 - HN_WEB_ERR_LOCKED (Restore context locked)\n* 102 - HN_WEB_ERR_XML (Bad XML format)\n* 104 - HN_WEB_ERR_BUFFER (Buffer too small)\n* 199 - HN_WEB_ERR_INT (Internal error)\n* 200 - HN_WEB_ERR_AUTH (Authentification issue)\n* 999 - HN_WEB_ERR (Generic error)\n","default":0},"StatusMsg":{"type":"string","description":"Status message","enum":["HN_WEB_OK","HN_WEB_ERR_PARAM","HN_WEB_ERR_BADCOMMAND","HN_WEB_ERR_NOTACTIV","HN_WEB_ERR_NOSESS","HN_WEB_ERR_LOCKED","HN_WEB_ERR_XML","HN_WEB_ERR_BUFFER","HN_WEB_ERR_INT","HN_WEB_ERR_AUTH","HN_WEB_ERR"],"default":"HN_WEB_OK"}}}}
```

## Search objects under a path on an agent

> Search objects under a path on an agent

```json
{"openapi":"3.0.1","info":{"title":"Lina Web Restore API","version":"7.3.0"},"tags":[{"name":"WebRestore","description":"Web Restore"}],"servers":[{"url":"/ALNWEB"}],"paths":{"/search.json":{"post":{"tags":["WebRestore"],"summary":"Search objects under a path on an agent","description":"Search objects under a path on an agent","operationId":"search","requestBody":{"description":"Parameters","content":{"application/xml":{"schema":{"type":"object","required":["WebID","Path"],"properties":{"WebID":{"$ref":"#/components/schemas/WebID"},"Path":{"$ref":"#/components/schemas/Path"},"IncludeSubfolders":{"type":"integer","format":"int32","description":"Search recursively? (0/1)","default":0},"NamePatterns":{"type":"array","items":{"type":"string","description":"Pattern to filter the results","xml":{"name":"Pattern"}},"xml":{"wrapped":true}},"ModifiedSince":{"$ref":"#/components/schemas/PIT"},"OrDeletedSince":{"type":"integer","format":"int32","description":"Include objects deleted since 'modified_since'? (0/1)","default":0},"OnlyDeleted":{"type":"integer","format":"int32","description":"Return only objects not existing at current time? (0/1)","default":0},"GetFolders":{"type":"integer","format":"int32","description":"Get folders in the results? (0/1)","default":0},"GetFiles":{"type":"integer","format":"int32","description":"Get files in the results? (0/1)","default":0},"DeltaModified":{"type":"integer","format":"int64","description":"A delta of time from now, instead of 'ModifiedSince'"},"TimeoutMs":{"type":"integer","format":"int64","description":"Timeout for the search (ms)"}},"xml":{"name":"Params"}}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"Results":{"type":"array","items":{"type":"object","properties":{"Path":{"type":"string","description":"Path of the object found under 'Path'"},"MirrorAt":{"type":"integer","format":"int64","description":"Date of the creation of the object found under 'Path'"},"ExpiredAt":{"type":"integer","format":"int64","description":"Date of the destruction of the object found under 'Path' (or 0 if still valid)","default":0},"Parent":{"type":"boolean","description":"The object found under 'Path' is a folder?"},"Type":{"$ref":"#/components/schemas/FileType"},"Size":{"type":"integer","format":"int64","description":"Size of the object found under 'Path' (B)"},"NoWebRest":{"type":"boolean","description":"The object found under 'Path' should not be restored through web?","default":false}}}},"MoreResults":{"$ref":"#/components/schemas/MoreResults"},"status":{"$ref":"#/components/schemas/Status"},"status_msg":{"$ref":"#/components/schemas/StatusMsg"}}}}}}}}}},"components":{"schemas":{"WebID":{"type":"string","description":"Web restore context UUID ('WR' + hexa)"},"Path":{"type":"string","description":"Path"},"PIT":{"type":"integer","format":"int64","description":"Milliseconds since January 1st, 1970, GMT time zone / 0 for current time","default":0},"FileType":{"type":"integer","format":"int32","enum":[1,2,3,10,21,22,23,24,25],"description":"File type:\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","default":1},"MoreResults":{"type":"boolean","default":false,"description":"If true, the results provided are incomplete (due to the API limitations)"},"Status":{"type":"integer","format":"int32","enum":[0,2,3,4,5,6,102,104,199,200,999],"description":"Status code:\n* 0 - HN_WEB_OK (OK)\n* 2 - HN_WEB_ERR_PARAM (Bad parameter)\n* 3 - HN_WEB_ERR_BADCOMMAND (Bad command)\n* 4 - HN_WEB_ERR_NOTACTIV (Web restore not active)\n* 5 - HN_WEB_ERR_NOSESS (No session)\n* 6 - HN_WEB_ERR_LOCKED (Restore context locked)\n* 102 - HN_WEB_ERR_XML (Bad XML format)\n* 104 - HN_WEB_ERR_BUFFER (Buffer too small)\n* 199 - HN_WEB_ERR_INT (Internal error)\n* 200 - HN_WEB_ERR_AUTH (Authentification issue)\n* 999 - HN_WEB_ERR (Generic error)\n","default":0},"StatusMsg":{"type":"string","description":"Status message","enum":["HN_WEB_OK","HN_WEB_ERR_PARAM","HN_WEB_ERR_BADCOMMAND","HN_WEB_ERR_NOTACTIV","HN_WEB_ERR_NOSESS","HN_WEB_ERR_LOCKED","HN_WEB_ERR_XML","HN_WEB_ERR_BUFFER","HN_WEB_ERR_INT","HN_WEB_ERR_AUTH","HN_WEB_ERR"],"default":"HN_WEB_OK"}}}}
```

## Initiate the restore of an architecture

> Initiate the restore of an architecture

```json
{"openapi":"3.0.1","info":{"title":"Lina Web Restore API","version":"7.3.0"},"tags":[{"name":"WebRestore","description":"Web Restore"}],"servers":[{"url":"/ALNWEB"}],"paths":{"/archrestore.json":{"post":{"tags":["WebRestore"],"summary":"Initiate the restore of an architecture","description":"Initiate the restore of an architecture","operationId":"archrestore","requestBody":{"description":"Parameters","content":{"application/xml":{"schema":{"type":"object","required":["WebID","PIT"],"properties":{"WebID":{"$ref":"#/components/schemas/WebID"},"PIT":{"$ref":"#/components/schemas/PIT"},"UseZip64":{"type":"integer","format":"int32","description":"Use zip64 format instead of zip32? (0/1)","default":0},"IncludePaths":{"type":"array","items":{"type":"string","description":"Path to include in the restore","xml":{"name":"Path"}},"xml":{"wrapped":true}},"ExcludePaths":{"type":"array","items":{"type":"string","description":"Path to exclude from the restore","xml":{"name":"Path"}},"xml":{"wrapped":true}},"NamePatterns":{"type":"array","items":{"type":"string","description":"Pattern to exclude some elements from the restore","xml":{"name":"Pattern"}},"xml":{"wrapped":true}},"URLTimeout":{"type":"integer","format":"int32","description":"Lease time of the restore URL (s)","default":120},"ArchName":{"type":"string","description":"Name of the ZIP archive / 'alnzip_%jobID%' if not provided","default":"RestoreArchive"}},"xml":{"name":"Params"}}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"JobID":{"type":"integer","format":"int64","description":"Job ID"},"RelURL":{"type":"string","description":"relative URL to get the restore ZIP result"},"status":{"$ref":"#/components/schemas/Status"},"status_msg":{"$ref":"#/components/schemas/StatusMsg"}}}}}}}}}},"components":{"schemas":{"WebID":{"type":"string","description":"Web restore context UUID ('WR' + hexa)"},"PIT":{"type":"integer","format":"int64","description":"Milliseconds since January 1st, 1970, GMT time zone / 0 for current time","default":0},"Status":{"type":"integer","format":"int32","enum":[0,2,3,4,5,6,102,104,199,200,999],"description":"Status code:\n* 0 - HN_WEB_OK (OK)\n* 2 - HN_WEB_ERR_PARAM (Bad parameter)\n* 3 - HN_WEB_ERR_BADCOMMAND (Bad command)\n* 4 - HN_WEB_ERR_NOTACTIV (Web restore not active)\n* 5 - HN_WEB_ERR_NOSESS (No session)\n* 6 - HN_WEB_ERR_LOCKED (Restore context locked)\n* 102 - HN_WEB_ERR_XML (Bad XML format)\n* 104 - HN_WEB_ERR_BUFFER (Buffer too small)\n* 199 - HN_WEB_ERR_INT (Internal error)\n* 200 - HN_WEB_ERR_AUTH (Authentification issue)\n* 999 - HN_WEB_ERR (Generic error)\n","default":0},"StatusMsg":{"type":"string","description":"Status message","enum":["HN_WEB_OK","HN_WEB_ERR_PARAM","HN_WEB_ERR_BADCOMMAND","HN_WEB_ERR_NOTACTIV","HN_WEB_ERR_NOSESS","HN_WEB_ERR_LOCKED","HN_WEB_ERR_XML","HN_WEB_ERR_BUFFER","HN_WEB_ERR_INT","HN_WEB_ERR_AUTH","HN_WEB_ERR"],"default":"HN_WEB_OK"}}}}
```

## Initiate the restore of a file

> Initiate the restore of a file

```json
{"openapi":"3.0.1","info":{"title":"Lina Web Restore API","version":"7.3.0"},"tags":[{"name":"WebRestore","description":"Web Restore"}],"servers":[{"url":"/ALNWEB"}],"paths":{"/filerestore.json":{"post":{"tags":["WebRestore"],"summary":"Initiate the restore of a file","description":"Initiate the restore of a file","operationId":"filerestore","requestBody":{"description":"Parameters","content":{"application/xml":{"schema":{"type":"object","required":["WebID","PIT","Path"],"properties":{"WebID":{"$ref":"#/components/schemas/WebID"},"PIT":{"$ref":"#/components/schemas/PIT"},"Path":{"type":"string","description":"Path of the file to restore"},"URLTimeout":{"type":"integer","format":"int32","description":"Lease time of the restore URL (s)","default":120}},"xml":{"name":"Params"}}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"JobID":{"type":"integer","format":"int64","description":"Job ID"},"RelURL":{"type":"string","description":"relative URL to get the restore ZIP result"},"status":{"$ref":"#/components/schemas/Status"},"status_msg":{"$ref":"#/components/schemas/StatusMsg"}}}}}}}}}},"components":{"schemas":{"WebID":{"type":"string","description":"Web restore context UUID ('WR' + hexa)"},"PIT":{"type":"integer","format":"int64","description":"Milliseconds since January 1st, 1970, GMT time zone / 0 for current time","default":0},"Status":{"type":"integer","format":"int32","enum":[0,2,3,4,5,6,102,104,199,200,999],"description":"Status code:\n* 0 - HN_WEB_OK (OK)\n* 2 - HN_WEB_ERR_PARAM (Bad parameter)\n* 3 - HN_WEB_ERR_BADCOMMAND (Bad command)\n* 4 - HN_WEB_ERR_NOTACTIV (Web restore not active)\n* 5 - HN_WEB_ERR_NOSESS (No session)\n* 6 - HN_WEB_ERR_LOCKED (Restore context locked)\n* 102 - HN_WEB_ERR_XML (Bad XML format)\n* 104 - HN_WEB_ERR_BUFFER (Buffer too small)\n* 199 - HN_WEB_ERR_INT (Internal error)\n* 200 - HN_WEB_ERR_AUTH (Authentification issue)\n* 999 - HN_WEB_ERR (Generic error)\n","default":0},"StatusMsg":{"type":"string","description":"Status message","enum":["HN_WEB_OK","HN_WEB_ERR_PARAM","HN_WEB_ERR_BADCOMMAND","HN_WEB_ERR_NOTACTIV","HN_WEB_ERR_NOSESS","HN_WEB_ERR_LOCKED","HN_WEB_ERR_XML","HN_WEB_ERR_BUFFER","HN_WEB_ERR_INT","HN_WEB_ERR_AUTH","HN_WEB_ERR"],"default":"HN_WEB_OK"}}}}
```

## Cancel a web restore job

> Cancel a web restore job

```json
{"openapi":"3.0.1","info":{"title":"Lina Web Restore API","version":"7.3.0"},"tags":[{"name":"WebRestore","description":"Web Restore"}],"servers":[{"url":"/ALNWEB"}],"paths":{"/cancelrestore.json":{"post":{"tags":["WebRestore"],"summary":"Cancel a web restore job","description":"Cancel a web restore job","operationId":"cancelrestore","requestBody":{"description":"Parameters","content":{"application/xml":{"schema":{"type":"object","required":["WebID","JobID"],"properties":{"WebID":{"$ref":"#/components/schemas/WebID"},"JobID":{"type":"integer","format":"int64","description":"ID of the web restore job"}},"xml":{"name":"Params"}}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/Status"},"status_msg":{"$ref":"#/components/schemas/StatusMsg"}}}}}}}}}},"components":{"schemas":{"WebID":{"type":"string","description":"Web restore context UUID ('WR' + hexa)"},"Status":{"type":"integer","format":"int32","enum":[0,2,3,4,5,6,102,104,199,200,999],"description":"Status code:\n* 0 - HN_WEB_OK (OK)\n* 2 - HN_WEB_ERR_PARAM (Bad parameter)\n* 3 - HN_WEB_ERR_BADCOMMAND (Bad command)\n* 4 - HN_WEB_ERR_NOTACTIV (Web restore not active)\n* 5 - HN_WEB_ERR_NOSESS (No session)\n* 6 - HN_WEB_ERR_LOCKED (Restore context locked)\n* 102 - HN_WEB_ERR_XML (Bad XML format)\n* 104 - HN_WEB_ERR_BUFFER (Buffer too small)\n* 199 - HN_WEB_ERR_INT (Internal error)\n* 200 - HN_WEB_ERR_AUTH (Authentification issue)\n* 999 - HN_WEB_ERR (Generic error)\n","default":0},"StatusMsg":{"type":"string","description":"Status message","enum":["HN_WEB_OK","HN_WEB_ERR_PARAM","HN_WEB_ERR_BADCOMMAND","HN_WEB_ERR_NOTACTIV","HN_WEB_ERR_NOSESS","HN_WEB_ERR_LOCKED","HN_WEB_ERR_XML","HN_WEB_ERR_BUFFER","HN_WEB_ERR_INT","HN_WEB_ERR_AUTH","HN_WEB_ERR"],"default":"HN_WEB_OK"}}}}
```

## Get the status a web restore job

> Get the status a web restore job

```json
{"openapi":"3.0.1","info":{"title":"Lina Web Restore API","version":"7.3.0"},"tags":[{"name":"WebRestore","description":"Web Restore"}],"servers":[{"url":"/ALNWEB"}],"paths":{"/getareststat.json":{"post":{"tags":["WebRestore"],"summary":"Get the status a web restore job","description":"Get the status a web restore job","operationId":"getareststat","requestBody":{"description":"Parameters","content":{"application/xml":{"schema":{"type":"object","required":["WebID","JobID"],"properties":{"WebID":{"$ref":"#/components/schemas/WebID"},"JobID":{"type":"integer","format":"int64","description":"ID of the web restore job"}},"xml":{"name":"Params"}}}}},"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"JobStatus":{"type":"integer","format":"int32","enum":[0,1,1001,1002,1003,1006,1007],"description":"Status of the web restore job:\n* 0 - LB_RESTORE_GLOBALSTATUS_ONGOING (Ongoing)\n* 1 - LB_RESTORE_GLOBALSTATUS_NOTSTARTED (Not started)\n* 1001 - LB_RESTORE_GLOBALSTATUS_COMPLETEDNOERROR (Completed without error)\n* 1002 - LB_RESTORE_GLOBALSTATUS_COMPLETEDERRORS (Completed with errors)\n* 1003 - LB_RESTORE_GLOBALSTATUS_ABORTED (Aborted)\n* 1006 - LB_RESTORE_GLOBALSTATUS_NOFILERESTORED (Nothing restored)\n* 1007 - LB_RESTORE_GLOBALSTATUS_RESTLIMIT_REACHED (restore limits reached)\n","default":0},"TotalRestoreSize":{"type":"integer","format":"int64","description":"Complete size (unzipped) of the restore archive (B)"},"TotalRestoreFilesNumber":{"type":"integer","format":"int64","description":"Complete number of files in the restore archive"},"CurrentRestoreSize":{"type":"integer","format":"int64","description":"Currently restored size (unzipped) of the restore archive (B)"},"CurentRestoreFilesNumber":{"type":"integer","format":"int64","description":"Number of currently restored files in the restore archive"},"CurrentFileTotalSize":{"type":"integer","format":"int64","description":"Complete size (unzipped) of the file being restored (B)"},"CurrentFileCurrentSize":{"type":"integer","format":"int64","description":"Currently restored size (unzipped) of the file being restored (B)"},"CurrentFilePath":{"type":"string","description":"Path of the file being restored"},"status":{"$ref":"#/components/schemas/Status"},"status_msg":{"$ref":"#/components/schemas/StatusMsg"}}}}}}}}}},"components":{"schemas":{"WebID":{"type":"string","description":"Web restore context UUID ('WR' + hexa)"},"Status":{"type":"integer","format":"int32","enum":[0,2,3,4,5,6,102,104,199,200,999],"description":"Status code:\n* 0 - HN_WEB_OK (OK)\n* 2 - HN_WEB_ERR_PARAM (Bad parameter)\n* 3 - HN_WEB_ERR_BADCOMMAND (Bad command)\n* 4 - HN_WEB_ERR_NOTACTIV (Web restore not active)\n* 5 - HN_WEB_ERR_NOSESS (No session)\n* 6 - HN_WEB_ERR_LOCKED (Restore context locked)\n* 102 - HN_WEB_ERR_XML (Bad XML format)\n* 104 - HN_WEB_ERR_BUFFER (Buffer too small)\n* 199 - HN_WEB_ERR_INT (Internal error)\n* 200 - HN_WEB_ERR_AUTH (Authentification issue)\n* 999 - HN_WEB_ERR (Generic error)\n","default":0},"StatusMsg":{"type":"string","description":"Status message","enum":["HN_WEB_OK","HN_WEB_ERR_PARAM","HN_WEB_ERR_BADCOMMAND","HN_WEB_ERR_NOTACTIV","HN_WEB_ERR_NOSESS","HN_WEB_ERR_LOCKED","HN_WEB_ERR_XML","HN_WEB_ERR_BUFFER","HN_WEB_ERR_INT","HN_WEB_ERR_AUTH","HN_WEB_ERR"],"default":"HN_WEB_OK"}}}}
```

## Check if SMTP is activated on server

> Check if SMTP is activated on server

```json
{"openapi":"3.0.1","info":{"title":"Lina Web Restore API","version":"7.3.0"},"tags":[{"name":"WebRestore","description":"Web Restore"}],"servers":[{"url":"/ALNWEB"}],"paths":{"/checksmtp.json":{"get":{"tags":["WebRestore"],"summary":"Check if SMTP is activated on server","description":"Check if SMTP is activated on server","operationId":"checksmtp","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"SMTPActivated":{"type":"boolean","description":"SMTP is activated?"},"status":{"$ref":"#/components/schemas/Status"},"status_msg":{"$ref":"#/components/schemas/StatusMsg"}}}}}}}}}},"components":{"schemas":{"Status":{"type":"integer","format":"int32","enum":[0,2,3,4,5,6,102,104,199,200,999],"description":"Status code:\n* 0 - HN_WEB_OK (OK)\n* 2 - HN_WEB_ERR_PARAM (Bad parameter)\n* 3 - HN_WEB_ERR_BADCOMMAND (Bad command)\n* 4 - HN_WEB_ERR_NOTACTIV (Web restore not active)\n* 5 - HN_WEB_ERR_NOSESS (No session)\n* 6 - HN_WEB_ERR_LOCKED (Restore context locked)\n* 102 - HN_WEB_ERR_XML (Bad XML format)\n* 104 - HN_WEB_ERR_BUFFER (Buffer too small)\n* 199 - HN_WEB_ERR_INT (Internal error)\n* 200 - HN_WEB_ERR_AUTH (Authentification issue)\n* 999 - HN_WEB_ERR (Generic error)\n","default":0},"StatusMsg":{"type":"string","description":"Status message","enum":["HN_WEB_OK","HN_WEB_ERR_PARAM","HN_WEB_ERR_BADCOMMAND","HN_WEB_ERR_NOTACTIV","HN_WEB_ERR_NOSESS","HN_WEB_ERR_LOCKED","HN_WEB_ERR_XML","HN_WEB_ERR_BUFFER","HN_WEB_ERR_INT","HN_WEB_ERR_AUTH","HN_WEB_ERR"],"default":"HN_WEB_OK"}}}}
```


---

# 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/web-restore/web-restore.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.
