Update File
Update the specified files. Only the file's description and status can be updated.
| Verb | PATCH |
|---|---|
| Endpoint | {base-url}/files/ |
| Max Page Size | N/A |
Request Body
{
"body": [
{
"id": 1,
"description": "update desc2",
"status": 1
}
]
}
Note
All changes in this request are atomic. If any item fails, the entire batch is rolled back and no changes are made.
Returns
On Success
The updated file.
Response Body
[
{
"id": 1,
"organizationId": 1,
"description": "update desc2",
"createdAtUtc": "2022-10-21T09:18:34",
"downloadLink": null,
"machineId": 402,
"fileKey": "6d02305c-81a5-4763-a51d-b91b41371487_audit-photo.jpg",
"status": 1,
"fileMetadata": []
}
]
On Error
| HTTP Code | Error Code | Definition |
|---|---|---|
| 403 | DATA_ACCESS_VIOLATION | One or more of the specified file id values belong to an organization you do not have access to. |
| 404 | MISSING_RECORD | One or more of the specified file id values does not exist. |
| 422 | VALIDATION_ERROR | A required field is missing or invalid (e.g. description is missing or exceeds 1000 characters, fileKey exceeds 1000 characters, status is missing). |