Documents API: Get file
Endpoint#
Section titled “Endpoint#”| Property | Value |
|---|---|
| Type | query |
| Method | GET |
| Path | /api/external/v1/documents/get_file |
| Handler | OperatelyWeb.Api.Files.Get |
Authentication#
Section titled “Authentication#”- Requires a valid API token.
- Read-only and full-access tokens can execute this query.
| Field | Type | Required | Nullable | Default |
|---|---|---|---|---|
id | id primitive (encoded as string) | Yes | No | - |
include_author | boolean | No | No | - |
include_goal | boolean | No | No | - |
include_resource_hub | boolean | No | No | - |
include_space | boolean | No | No | - |
include_project | boolean | No | No | - |
include_parent_folder | boolean | No | No | - |
include_reactions | boolean | No | No | - |
include_permissions | boolean | No | No | - |
include_subscriptions_list | boolean | No | No | - |
include_potential_subscribers | boolean | No | No | - |
include_path_to_file | boolean | 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 GET \
--url "https://app.operately.com/api/external/v1/documents/get_file?id=value&include_author=true&include_goal=true&include_parent_folder=true&include_path_to_file=true&include_permissions=true&include_potential_subscribers=true&include_project=true&include_reactions=true&include_resource_hub=true&include_space=true&include_subscriptions_list=true" \
--header "Authorization: Bearer ${OPERATELY_API_TOKEN}"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" }}