Description
Partially updates the properties of a file. Only one property may be updated at a time.
Options
Path | PATCH Operations Supported |
---|---|
/container | replace |
PATCH
/files/{fileId}
Required OAuth Scopes:
file:write
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
fileId | path | string | true | The unique identifier of the file |
body | body | JSONPatchDocument | true | A collection of patch operations to apply to the file. Currently only one operation may be applied at a time. |
Body parameter example
[
{
"op": "replace",
"path": "/container",
"value": ""
}
]
Code Samples
curl -X PATCH https://api.app.wdesk.com/platform/v1/files/{fileId} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
http PATCH https://api.app.wdesk.com/platform/v1/files/{fileId} \
Content-Type:application/json \
Accept:application/json \
Authorization:"Bearer {access-token}"
wget --method=PATCH "https://api.app.wdesk.com/platform/v1/files/{fileId}" \
--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/files/{fileId}', headers = headers)
print(r.json())
Returns
200 - OK
Returns a File
object containing details about the updated File
.
Example Responses
{
"container": "",
"created": {
"dateTime": "2019-10-28T15:03:27Z"
},
"name": "1989 Year-End Summary",
"id": "124efa2a142f472ba1ceab34ed18915f",
"kind": "Document",
"modified": {
"dateTime": "2020-04-01T11:31:06Z"
},
"type": "Document",
"template": false
}