https://api.bitsighttech.com/ratings/v1/folders/folder_guid
Manage user permissions for shared folders.
Parameters
* Required.
Field | Values | ||
---|---|---|---|
folder_guid * [Path] Identify the folder to edit. |
[String] Folder unique identifier [folder_guid ]. See GET: Folder Details. |
||
shared_options [Body] Set the shared folder settings. |
[Object] "shared_options":{"key":value,}
|
||
is_shared [Body] Share the folder. |
[Boolean] true = Share the folder. |
||
group_can_edit_contents [Body] Allow all users in the group permission to add or remove companies in the folder. |
[Boolean] true = Allow all users in the group to add or remove companies in the folder. |
||
shared_with_all_users [Body] Share the folder with all users in the group. |
[Boolean] true = Share the folder with all users in the group. |
||
shared_with_users [Body] Identify users of the shared folder. |
[Array] Comma-separated user objects. | ||
[Body] Identify the user by email. |
[String] The user’s email address. | ||
can_edit_folder_contents [Body] Allow this user to add or remove companies in the folder. |
[Boolean] true = Allow the user to add or remove companies in the folder. |
||
can_edit_folder_properties [Body] Allow this user to edit the folder. |
[Boolean] true = Allow the user to edit the folder. |
Example Request
Include the associated shared_options
parameter into a JSON object for the payload and be sure to include the appropriate Content-Type header.
The following request enables folder sharing for all users in your group, allows them to view companies, and prevents them from adding or removing companies.
cURL:
curl 'https://api.bitsighttech.com/ratings/v1/folders/fcc8b8c4-4fa3-4735-ac14-405ac7855d70' -X PATCH -H 'Content-Type: application/json' --data-binary '{ "shared_options":{ "is_shared":true, "group_can_edit_contents":false, "shared_with_all_users":true, "shared_with_users":[ { "email":"user@example.com", "can_edit_folder_contents":false, "can_edit_folder_properties":false } ] } }' --compressed -u api_token:
JSON:
{ "shared_options":{ "is_shared":true, "group_can_edit_contents":false, "shared_with_all_users":true, "shared_with_users":[ { "email":"user@example.com", "can_edit_folder_contents":false, "can_edit_folder_properties":false } ] } }
Example Response
The server returns the folder’s details as verification.
{ "shared_options":{ "is_shared":true, "shared_with_all_users":false, "group_can_edit_contents":false, "group_can_edit_properties":false, "shared_with_users":[ { "email":"user@example.com", "can_edit_folder_contents":false, "can_edit_folder_properties":false } ] } }
Response Attributes
Field | Description | |||
---|---|---|---|---|
shared_optionsObject |
Shared folder settings. | |||
is_sharedBoolean |
true = This folder is shared. |
|||
shared_with_all_usersBoolean |
true = This folder is shared with all users in the group. |
|||
group_can_edit_contentsBoolean |
true = This folder is shared with all users and if all users can add or remove companies in this folder. |
|||
group_can_edit_propertiesBoolean |
true = This folder is shared with all users in the group as owners of the folder. |
|||
shared_with_usersArray |
This folder is shared with the listed users. | |||
Object | A user and their details. | |||
|
The user's email address. | |||
can_edit_folder_contentsBoolean |
true = This user can add or remove companies in the folder. |
|||
can_edit_folder_propertiesBoolean |
true = This user can edit folder properties as an owner. |
- July 22, 2021:
shared_with
parameter renamed toshared_with_users
.
Feedback
0 comments
Please sign in to leave a comment.