![]() |
API Documentation
|
The owner of an item (either a Secure Object or collection) can share this item with other people, who could be other Covata users or people who do not yet have a user account on the Covata Platform.
A person who has been shared an item (by its owner) is referred to as a collaborator. If someone does not yet have a Covata user account, the act of sharing an item with this person (via their email address) automatically creates that person a user account on the Covata Platform (with the Ad hoc role).
An item's owner can apply one of up to four sets of permissions (each of which is referred to as a permission set) to a collaborator on the item, such that each collaborator is associated with their own permission set on any given item. A permission set grants the collaborator one or more individual permissions, each of which permit the collaborator to perform various actions on that item and its contents. For more information about permission sets and the individual permissions they grant, see <access-service>/api/v1/permissions/sets.
All collaborators and their permission sets on a collection are implicitly cascaded down through that collection and the items contained within it. This means that if a collection has been shared with a collaborator and a given permission set, then that collaborator can access and perform specific actions (based on the permissions granted by this permission set) on this collection, as well as on every item contained within this collection. If, however, the collection's owner had done one of the following to one of these collaborators on a descendant item within this collection:
then this modification is made explicitly on this descendant item, which has the following implications:
This page describes how to use Covata's API to:
Notes:
- Before sharing a Secure Object or a collection, your application must have a valid access token obtained by authenticating and authorizing a Covata user to the Covata Platform, where this user has the appropriate role and/or permissions to create their own items to share.
For more information about authenticating and authorizing Covata users to the Covata Platform, see Initiating authentication and authorization on the Authentication and authorization page of this guide and the Configuring client applications page of the Safe Share Administrator's Guide.- The Supported roles (and conditions) sections of each API endpoint page (linked to from the procedures below) contain details about the roles and permissions that a Covata user requires for a successful request to the endpoint (along with a valid access token representing this user).
A Secure Object can be shared with collaborators when the Secure Object is either first created/initialized or completed (if its data is encrypted locally), or at any time thereafter.
To a Secure Object with collaborators, do one of the following (1):
POST request to the <access-service>/api/v1/organisations/{orgGroupId}/objects API endpoint with a JSON object in the body of the request containing:PUT request to the <access-service>/api/v1/objects/{objectId} API endpoint with a JSON object in the body of the request containing the collaborators (and if required, the sha512) parameter pair/s (above).(1) For all of these actions, a valid access token representing the Covata user who either will own the Secure Object being created or currently owns the Secure Object in question, must be included in the header of the requests.
A collection can be shared with collaborators when the collection is either first created or at any time thereafter.
To share a collection with collaborators, do one of the following (2):
POST request to the <access-service>/api/v1/collections API endpoint with a JSON object in the body of the request containing:PUT request to the <access-service>/api/v1/collections/{collectionId} API endpoint with a JSON object in the body of the request containing the collaborators (and if required, the name and parentId) parameter pair/s (above).(2) For all of these actions, a valid access token representing the Covata user who either will own the collection being created or currently owns the collection in question, must be included in the header of the requests.
To determine the existing collaborators (and their respective permission sets) on a Secure Object or collection:
{itemId} is the ID of the item in question. The JSON response reveals all collaborators on the item, as well as each collaborator's respective permission set (and the individual permissions that constitute the permission set). Collaborators can be modified on a Secure Object or collection by:
To modify existing collaborators, follow the relevant PUT request process above for initially sharing a Secure Object or collection with collaborators. However, when making this PUT request, if you intend to:
PUT request (along with their respective permission sets).PUT request (along with their respective permission sets). However, for each collaborator whose permission set needs modifying, specify the id parameter of the permissionSet parameter with the updated permission set ID.PUT request, along with any new collaborators.Tip: It is worthwhile your client application storing existing collaborators (with whom a Secure Object or collection was last shared, along with the collaborators respective permission sets) in an object. Doing so avoids the need to retrieve an item to determine its existing collaborators and their permission sets).