putUserContentAccess
const url = 'https://example.com/api/v1/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/content-access';const options = { method: 'PUT', headers: {'X-CSRF-Token': 'example', 'Content-Type': 'application/json'}, body: '{"libraryMode":"all","tagMode":"all","folderIds":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"],"tagIds":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/v1/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/content-access \ --header 'Content-Type: application/json' \ --header 'X-CSRF-Token: example' \ --data '{ "libraryMode": "all", "tagMode": "all", "folderIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "tagIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] }'Replace an account’s content access. Requires the users.manage capability and the admin scope. Cookie-authenticated unsafe requests require X-CSRF-Token. An Owner cannot be restricted, nobody can change their own access, and nobody can grant folders or tags outside their own access.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Granted folders; each covers its descendants.
Tags the account may apply and remove.
Responses
Section titled “ Responses ”Content access replaced
object
object
object
object
Folder ancestry joined with ’ / ’.
object
Folder ancestry joined with ’ / ’.
False when the account has no stored policy, which means it reaches no content until one is saved.
The account is an Owner and always reaches everything.
Example
{ "data": { "policy": { "libraryMode": "all", "tagMode": "all" } }}Invalid request body
Dashboard authentication required
Insufficient role, own account, or grant outside the caller’s access
User not found
Policy invalid or account not restrictable