# Get Cabinet

## cURL

Use the following cURL command to get a cabinet. You can copy and paste the following template and replace the **access\_token**, **projectId**, and **role.**

```javascript
curl --location --request POST 'https://datasaur.ai/graphql' \
--header 'Authorization: Bearer <access token>' \
--header 'Content-Type: application/json' \
--data-raw '
{
    "query":"query GetCabinet($projectId: ID!, $role: Role!) {\n  result: getCabinet(projectId: $projectId, role: $role) {\n    id\n    documents {\n        id\n    }\n    role\n    status\n    lastOpenedDocumentId\n    statistic {\n          id\n      numberOfTokens\n      numberOfLines\n    }\n  }\n}\n",
    "variables":{"projectId":"GCJUPUhoUTY","role":"REVIEWER"}
}
'
```

* **query** uses the value in the sample above.
* **variables**
  * **input**
    * **projectId:** the id of project
    * **role**: "REVIEWER" or "LABELER"

> `projectId` can be easily found in the URL. For the example below, the projectId is KbHQBhPK50e.

![](/files/leFq6AUwtQAgIKe1U3Id)

## Response

Here is the response you can expect after issuing the cURL command.

```javascript
{
    "data": {
        "result": {
            "id": "1129172",
            "documents": [
                {
                    "id": "67cfaf07-24f4-4ca0-ac31-4b9d20028f52"
                }
            ],
            "role": "REVIEWER",
            "status": "IN_PROGRESS",
            "lastOpenedDocumentId": "67cfaf07-24f4-4ca0-ac31-4b9d20028f52",
            "statistic": {
                "id": "1129172",
                "numberOfTokens": 5895,
                "numberOfLines": 121
            }
        }
    }
}
```


---

# Agent Instructions: 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.datasaur.ai/api/get-data/get-cabinet.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.
