Using the SideDrawer API to add a Collaborator to an entity.
Steps
You'll need:
- an access token
- a SideDrawer Account
- to be logged in
1. Get Drawer Folders
First, find all of your Drawer's (sidedrawer
) Folders (record
).
GET
/api/v2/records/sidedrawer/sidedrawer-id/sidedrawerId/records
[ { "id": "{recordId}", "name": "Folder", "description": "", "recordSubtype": { "name": "folderName", "logo": "", "displayValue": [ { "locale": "en-CA", "value": "Folder Name", "description": "" } ], "orderId": 0 }, "recordSubtypeOther": "", "storageLocation": "", "recordType": { "name": "hangerName", "sidedrawerType": "individual", "sidedrawerTypeOtherName": "", "logo": "", "displayValue": [ { "locale": "en-CA", "value": "Hanger Name", "description": "" } ], "cobrandId": "", "orderId": 0 }, "status": "string", "updatedAt": "2024-08-12T19:12:46.806Z", "lastModifiedBy": "", "contributors": [ "" ] } ]
2. Create collaboration network
Then, create a Drawer (sidedrawer
) collaboration network or Folder (record
) collaboration network, depending on the resource level your Collaborator should have access to. This adds a Collaborator to the Folder. Here, you can set the Collaborator's permissions.
At the Drawer (sidedrawer
) level, the Collaborator can be:
- an editor (
sd_editor
) - a contributor (
sd_contributor
) - a viewer (
sd_viewer
) - an analyst (
sd_analyst
) - a previewer (
sd_preview
) - a Collaborator with a "no details" role (
sd_info
).
At the Folder (record
) level, they can be:
- an editor (
rec_editor
) - a contributor (
rec_contributor
) - a viewer (
rec_viewer
) - a Collaborator with a "no details" role (
rec_info
).
Create Drawer (
sidedrawer
) collaboration network
POST
/api/v1/networks/sidedrawer/sidedrawer-id/sidedrawerId/network
{ "sidedrawerRole": "", "contributor": { "firstName": "Jane", "lastName": "Smith", "email": "[email protected]", "phone": "" }, "contributorType": "account", "relation": { "personal": "spouse", "profession": "estate_lawyer", "professionOther": "", "personalOther": "" }, "expiryDate": "2024-08-12T19:16:49.189Z" }
[ { "sidedrawer": { "id": "{sidedrawerId}", "name": "myDrawer", "description": "", "firstName": "Jane", "lastName": "Smith", "default": true, "status": "ACTIVE", "userSidedrawerRole": [ "" ], "subscriptionFeatures": {} }, "sidedrawerRole": "sd_owner", "record": { "id": "{recordId}", "name": "myFolder", "description": "", "uniqueReference": "", "storageLocation": "", "recordSubtypeName": "Name", "recordSubtype": {}, "recordSubtypeOther": "", "recordTypeName": "Hanger Name", "recordType": {}, "active": true, "recordDetails": {}, "status": "ACTIVE", "updatedAt": "2024-08-12T19:16:49.190Z", "filesHistory": [ {} ], "userSidedrawerRole": [ "" ], "userRecordRole": [ "" ] }, "recordRole": "rec_editor", "contributor": "", "contributorType": "account", "relation": { "personal": "spouse", "profession": "estate_lawyer", "professionOther": "", "personalOther": "" }, "invitationCode": "", "active": true } ]
Create Folder (
record
) collaboration network
POST
/api/v1/networks/sidedrawer/sidedrawer-id/sidedrawerId/record/record-id/recordId/network
{ "recordRole": "rec_editor", "contributor": { "firstName": "Jane", "lastName": "Smith", "email": "[email protected]", "phone": "" }, "contributorType": "account", "relation": { "personal": "spouse", "profession": "estate_lawyer", "professionOther": "", "personalOther": "" }, "expiryDate": "2024-08-12T19:20:03.520Z" }
[ { "sidedrawer": { "id": "{sidedrawerId}", "name": "My Drawer", "description": "", "firstName": "Jane", "lastName": "Smith", "default": true, "status": "ACTIVE", "userSidedrawerRole": [ "" ], "subscriptionFeatures": {} }, "sidedrawerRole": "sd_owner", "record": { "id": "{recordId}", "name": "My Folder", "description": "", "uniqueReference": "", "storageLocation": "", "recordSubtypeName": "Name", "recordSubtype": {}, "recordSubtypeOther": "", "recordTypeName": "Hanger Name", "recordType": {}, "active": true, "recordDetails": {}, "status": "ACTIVE", "updatedAt": "2024-08-12T19:20:03.521Z", "filesHistory": [ {} ], "userSidedrawerRole": [ "" ], "userRecordRole": [ "" ] }, "recordRole": "rec_editor", "contributor": "", "contributorType": "account", "relation": { "personal": "spouse", "profession": "estate_lawyer", "professionOther": "", "personalOther": "" }, "invitationCode": "", "active": true } ]
3. Get info
Now you can see information about your Drawer (sidedrawer
) or Folder (record
) and its Collaborators.
GET
/api/v2/networks/sidedrawer/sidedrawer-id/sidedrawerId/networks