Description
Returns a list of sections.
GET
/documents/{documentId}/sections
Required OAuth Scopes:
file:read
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
documentId | path | string | true | The unique identifier of the document |
Code Samples
curl -X GET https://api.app.wdesk.com/platform/v1/documents/{documentId}/sections \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
http GET https://api.app.wdesk.com/platform/v1/documents/{documentId}/sections \
Accept:application/json \
Authorization:"Bearer {access-token}"
wget --method=GET "https://api.app.wdesk.com/platform/v1/documents/{documentId}/sections" \
--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}/sections', headers = headers)
print(r.json())
Returns
200 - OK
Returns a JSON object with data
and @nextLink
properties. data
contains a list of Section
objects, and @nextLink
provides the URL to the next set of results. If there are no additional results, @nextLink
doesn't appear. If the request returns no results at all, data
contains an empty array.
Example Responses
{
"data": [
{
"id": "a8b3adb687644b27fafcb3a9875f0f0d_13",
"name": "Section",
"parent": null,
"index": 0,
"children": [
{
"id": "a8b3adb687644b27fafcb3a9875f0f0d_34",
"name": "Subsection"
}
],
"nonPrinting": false
},
{
"id": "a8b3adb687644b27fafcb3a9875f0f0d_34",
"name": "Subsection",
"parent": {
"id": "a8b3adb687644b27fafcb3a9875f0f0d_13",
"name": "Section"
},
"index": 0,
"children": [],
"nonPrinting": false
}
],
"@nextLink": "{opaqueUrl}"
}