Description
Partially updates the properties of a section.
Options
Path | PATCH Operations Supported |
---|---|
/name | replace |
/index | replace |
/parent | replace |
PATCH
/documents/{documentId}/sections/{sectionId}
Required OAuth Scopes:
file:write
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
documentId | path | string | true | The unique identifier of the document |
sectionId | path | string | true | The unique identifier of the section |
body | body | JSONPatchDocument | true | A collection of patch operations to apply to the section. |
Body parameter example
[
{
"op": "replace",
"path": "/name",
"value": "New Name"
}
]
Code Samples
curl -X PATCH https://api.app.wdesk.com/platform/v1/documents/{documentId}/sections/{sectionId} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
http PATCH https://api.app.wdesk.com/platform/v1/documents/{documentId}/sections/{sectionId} \
Content-Type:application/json \
Accept:application/json \
Authorization:"Bearer {access-token}"
wget --method=PATCH "https://api.app.wdesk.com/platform/v1/documents/{documentId}/sections/{sectionId}" \
--output-document - \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.patch('https://api.app.wdesk.com/platform/v1/documents/{documentId}/sections/{sectionId}', headers = headers)
print(r.json())
Returns
200 - OK
Returns a Section
object containing details about the updated Section
.
Example Responses
{
"id": "b9b3ddb587744a27aafda3c9865f1f0a_1",
"name": "February",
"parent": null,
"index": 1,
"children": [],
"nonPrinting": false
}