Datasaur
Search…
Get Cabinet
Get one cabinet information

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.
1
curl --location --request POST 'https://datasaur.ai/graphql' \
2
--header 'Authorization: Bearer access_token' \
3
--header 'Content-Type: application/json' \
4
--data-raw '{
5
"query": "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 labelSets {\n id\n name\n index\n signature\n tagItems {\n id\n parentId\n tagName\n desc\n color\n }\n lastUsedBy {\n projectId\n name\n }\n }\n }\n}",
6
"variables": {
7
"projectId": "obcSTVH8B7k",
8
"role": "REVIEWER"
9
}
10
}'
Copied!
  • query use 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.

Response

Here is the response you can expect after issuing the cURL command.
1
{
2
"data": {
3
"getCabinet": {
4
"id": "1038858",
5
"documents": [
6
{
7
"id": "3fe48623-dddb-4111-9189-3bb94e72c37c"
8
}
9
],
10
"role": "REVIEWER",
11
"status": "IN_PROGRESS",
12
"lastOpenedDocumentId": "3fe48623-dddb-4111-9189-3bb94e72c37c",
13
"statistic": {
14
"id": "1038858",
15
"numberOfTokens": 179,
16
"numberOfLines": 20
17
},
18
"labelSets": []
19
}
20
},
21
"extensions": {}
22
}
Copied!
Copy link
Contents
cURL
Response