Description
Retrieves a document given its ID.
GET
/documents/{documentId}
Required OAuth Scopes:
file:read
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
documentId | path | string | true | The unique identifier of the document |
$expand | query | string | false | Returns related resources inline with the main resource |
Code Samples
curl -X GET https://api.app.wdesk.com/platform/v1/documents/{documentId} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
http GET https://api.app.wdesk.com/platform/v1/documents/{documentId} \
Accept:application/json \
Authorization:"Bearer {access-token}"
wget --method=GET "https://api.app.wdesk.com/platform/v1/documents/{documentId}" \
--output-document - \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('https://api.app.wdesk.com/platform/v1/documents/{documentId}', headers = headers)
print(r.json())
Returns
200 - OK
Returns a Document
object containing details about the requested Document
.
Example Responses
{
"id": "625efb2c141f482bb1cdab14ec18715d",
"name": "2019 Year-End Summary",
"created": {
"dateTime": "2019-10-28T15:03:27Z"
},
"modified": {
"dateTime": "2019-11-21T13:47:33Z"
},
"template": false
}