📝(docs) fix resource server code snippet

One needs to be authenticated while requesting the external API.
This commit is contained in:
Julien Maupetit
2026-08-05 10:36:42 +02:00
parent b956be12e5
commit 1fd0ea7fa9
+2 -1
View File
@@ -49,7 +49,7 @@ EXTERNAL_API = {
**Endpoints:**
- `documents`: Controls `/external_api/v1.0/documents/`. Available actions: `list`, `retrieve`, `create`, `update`, `destroy`, `trashbin`, `children`, `restore`, `move`,`versions_list`, `versions_detail`, `favorite_detail`,`link_configuration`, `attachment_upload`, `media_auth`, `ai_transform`, `ai_translate`, `ai_proxy`. Always allowed actions: `favorite_list`, `duplicate`.
- `documents`: Controls `/external_api/v1.0/documents/`. Available actions: `list`, `retrieve`, `create`, `update`, `destroy`, `trashbin`, `children`, `restore`, `move`, `versions_list`, `versions_detail`, `favorite_detail`, `link_configuration`, `attachment_upload`, `media_auth`, `ai_transform`, `ai_translate`, `ai_proxy`. Always allowed actions: `favorite_list`, `duplicate`.
- `document_access`: `/external_api/v1.0/documents/{id}/accesses/`. Available actions: `list`, `retrieve`, `create`, `update`, `partial_update`, `destroy`
- `document_invitation`: Controls `/external_api/v1.0/documents/{id}/invitations/`. Available actions: `list`, `retrieve`, `create`, `partial_update`, `destroy`
- `users`: Controls `/external_api/v1.0/documents/`. Available actions: `get_me`.
@@ -87,6 +87,7 @@ Here is an example of a view that creates a document from a markdown file at the
"file": file,
},
format="multipart",
headers={"Authorization": f"Bearer {access_token}"},
)
response.raise_for_status()