https://api.bitsighttech.com/ratings/v1/folders/folder_guid
Manage user permissions for shared folders.
Parameters
* Required.
folder_guid
-
* Required.
[Path] Identify the folder to edit.
Value: [String] Folder unique identifier [
folder_guid
]. See GET: Folder Details. shared_options
-
[Body] Set the shared folder settings.
Value: [Object]
"shared_options":{"key":value,}
is_shared
-
[Body] Share the folder.
Value: [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.
Value: [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.
Value: [Boolean]
true
= Share the folder with all users in the group. shared_with_users
-
[Body] Identify users of the shared folder.
Value: [Array] Comma-separated user objects.
email
-
[Body] Identify the user by email.
Value: [String] The user’s email address.
can_edit_folder_contents
-
[Body] Allow this user to add or remove companies in the folder.
Value: [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.
Value: [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_options Object |
Shared folder settings. | |||
is_shared Boolean |
true = This folder is shared. |
|||
shared_with_all_users Boolean |
true = This folder is shared with all users in the group. |
|||
group_can_edit_contents Boolean |
true = This folder is shared with all users and if all users can add or remove companies in this folder. |
|||
group_can_edit_properties Boolean |
true = This folder is shared with all users in the group as owners of the folder. |
|||
shared_with_users Array |
This folder is shared with the listed users. | |||
Object | A user and their details. | |||
String |
The user's email address. | |||
can_edit_folder_contents Boolean |
true = This user can add or remove companies in the folder. |
|||
can_edit_folder_properties Boolean |
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.