Documents API: Update file
Endpoint#
Section titled “Endpoint#”| Property | Value |
|---|---|
| Type | mutation |
| Method | POST |
| Path | /api/external/v1/documents/update_file |
| Handler | OperatelyWeb.Api.Files.Update |
Authentication#
Section titled “Authentication#”- Requires a valid API token.
- Requires a write-enabled token.
- Read-only tokens return
403.
| Field | Type | Required | Nullable | Default |
|---|---|---|---|---|
file_id | id primitive (encoded as string) | Yes | No | - |
name | string | Yes | No | - |
description | json primitive (encoded as string) | No | No | - |
Outputs#
Section titled “Outputs#”| Field | Type | Required | Nullable |
|---|---|---|---|
file | resource_hub_file object | Yes | No |
cURL Example#
Section titled “cURL Example#”Copied
curl --request POST \
--url "https://app.operately.com/api/external/v1/documents/update_file" \
--header "Authorization: Bearer ${OPERATELY_API_TOKEN}" \
--header "Content-Type: application/json" \
--data '{"description":"value", "file_id":"value", "name":"value"}'Response Example#
Section titled “Response Example#”{ "file": { "__typename": "value", "author": "<person>", "blob": "<blob>", "comments_count": 123, "description": "value", "goal": "<goal>", "id": "value", "inserted_at": "value", "name": "value", "parent_folder": "<resource_hub_folder>", "parent_folder_id": "value", "path_to_file": [ "<resource_hub_folder>" ], "permissions": "<resource_hub_permissions>", "potential_subscribers": [ "<subscriber>" ], "project": "<project>", "reactions": [ "<reaction>" ], "resource_hub": "<resource_hub>", "resource_hub_id": "value", "size": 123, "space": "<space>", "subscription_list": "<subscription_list>", "type": "value", "url": "value" }}