> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/server/web-interface/utilities/api-documentation.md).

# API documentation

Detailed instructions for the Devolutions Server REST API are available in the ***Apps and companion*** ***tools*** section within the Devolutions Server web interface in ***Help & Tools*** – ***API documentation***.

![](https://cdnweb.devolutions.net/docs/DVLS4241_2025_3.png)

Here is what the REST API window looks like:

![](https://cdnweb.devolutions.net/docs/DVLS6008_2025_2.png)

To connect and use the REST API, refer to the sample bash script below. For each API call to the server, ensure the following:

* Replace `https://url` with the specific Devolutions Server URL.
* Replace `GUID-OF-VAULT` and `GUID-OF-ENTRY` with the corresponding GUIDs.

{% hint style="info" %}
In this version of the API, passwords can only be retrieved from entries of the ***Credentials*** type.
{% endhint %}

```bash

# Log in and get the token
authResponse=$(curl -s -X POST "https://url/api/v1/login" \
    -H "Content-Type: application/json" \
    -d '{
        "appKey": "appkey",
        "appSecret": "appsecret"
    }')
token=$(echo $authResponse | jq -r '.tokenId')

# Check if the token was successfully obtained
if [ -z "$token" ] || [ "$token" = "null" ]; then
  echo "Failed to login or obtain token."
  exit 1
fi

# Request data using the token
response=$(curl -s -X GET "https://url/api/v1/vault/GUID-OF-VAULT/entry/GUID-OF-ENTRY" \
    -H "Content-Type: application/json" \
    -H "tokenId: $token")

echo $response | jq

# Log out
curl -s -X POST "https://url/api/v1/logout" \
    -H "Content-Type: application/json" \
    -H "tokenId: $token" \
    -H "Content-Length: 0"
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.devolutions.net/server/web-interface/utilities/api-documentation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
