Skip to main content

Grant folders to users or groups in one batch.

POST/api/v1/folders/batch-grant-accesspermissions:admin

Each item grants one folder to one principal; include_subfolders also grants every folder beneath it. Folders the principal already holds are skipped, and an item with nothing new is answered 200 unchanged. The documents of the changed folders are re-synced. atomic is required. A user item needs Grant Folder User Access and View Users, a group item Grant Folder Group Access and View Groups. The answer lists the folders granted only to a caller with View Folder Security; without it the answer is a write receipt.

Scopepermissions:admin (sensitive)
AsynchronousNo
MCP toolbatch_grant_folder_access

Parameters​

NameInTypeRequiredDescription
Docwize-Versionheaderstring (date)Optional
Idempotency-KeyheaderstringOptionalmax 255

Request body​

Content typeType
application/jsonBatchBodyOfv1FolderGrantBatchItemInput

Responses​

StatusDescriptionBody
200Success.application/json object or object
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
409idempotency_in_progressapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422idempotency_key_reused, validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

BatchBodyOfv1FolderGrantBatchItemInput​

FieldTypeRequiredDescription
atomicbooleanRequired
itemsarray of FolderGrantBatchItemInputRequired

FolderGrantBatchItemInput​

FieldTypeRequiredDescription
folder_idstringRequired
group_idstring or nullOptional
include_subfoldersbooleanOptionalAlso grant (or revoke) every folder beneath this one, however deep.
user_idstring or nullOptionalGive exactly one of user_id and group_id.

FolderGrantBatchResult​

FieldTypeRequiredDescription
folder_idstringRequired
folder_idsarray of stringRequiredThe folders whose grant this item changed, the item's folder and its subfolders: for a grant the ones the principal did not hold, for a revoke the ones it held.
principalGrantPrincipalRequired

GrantPrincipal​

FieldTypeRequiredDescription
group_idstring or nullRequired
typestringRequireduser or group; everyone in the access listing for what is open to all.
user_idstring or nullRequired