> For the complete documentation index, see [llms.txt](https://docs.datasaur.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datasaur.ai/api/get-data/get-document-information.md).

# Get document information

## cURL

Use the following cURL command to get label sets added to a project. You can copy and paste the template below, then replace the `access_token` and the label set item values as needed.

```javascript
curl --location --request POST 'https://datasaur.ai/graphql' \
  --header 'Authorization: Bearer a29a6b20588b7a350395a0b8942642cfbf33926c' \
  --header 'Content-Type: application/json' \
  --data-raw '{ "operationName": "GetProjectDocumentQuery", "query": "query GetProjectDocumentQuery($documentId: ID!) { document: getTextDocument(fileId: $documentId) { id signature fileName } }", "variables": { "documentId": "c541e403-776a-40b7-af4b-955c7be86c0d" }}'
```

Below is a more readable version of the above curl command's request body.

```javascript
{
    "operationName": "GetProjectDocumentQuery",
    "query": "query GetProjectDocumentQuery($documentId: ID!) { document: getTextDocument(fileId: $documentId) { id signature fileName } }",
    "variables": {
        "documentId": "c541e403-776a-40b7-af4b-955c7be86c0d"
    }
}
```

* **operationName**: you can use any alphanumeric string in as the operationName. Refer [this page](https://graphql.org/learn/queries/#operation-name) for best practices on choosing an `operationName` .
* **variables:**
  * **documentId:** string, the document ID of the reviewer for the project.
* **query**: Use the same value as the example above.

{% hint style="info" %}
A **tag** has the same meaning as **label**. In the near future, we will update the GraphQL Schema to refer to all instances as labels.
{% endhint %}

## Response

The following is an example of the response returned after running the cURL command. Use the `id` to create the project.

```javascript
{
    "data": {
        "document": {
            "id": "c541e403-776a-40b7-af4b-955c7be86c0d",
            "signature": "fab4a116af4da9d2381e61e8bf2337170d8d044704c4d679f439a79a04d7bddb",
            "fileName": "Hamlet.txt"
        }
    },
    "extensions": {}
}
```

* **id**: the unique ID of the document.
* **signature**: hash of the document. The value will change when the content (sentence or tokens) of the document changes.
* **fileName**: the name of the file.
