Collection Sharing
  • 04 Oct 2021
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Collection Sharing

  • Dark
    Light
  • PDF

Article summary

Collection

PUT /collections/{externalId}/sharing

NameData TypeDescription
Content-type:application/jsonfor all requests
Authorization:EAPI {token}for all requests

Body Parameters

Parameters indicated with a * are mandatory

Name
Data Type
Description
*FilterObject)External Id. Should be unique. Alpha-Numeric. Autogenerated by default.
*Filter.UsersArray Of StringFilter users by User Names. Only exists users will be added.
AccessToCollectionBooleanUsers should have access to the collection.
Untouched by default
True - Grant access
False - Revoke access
AccessToQuestionsBooleanUsers should be able to use questions from this collection in assessments.
Untouched by default
True - Grant access
False - Revoke access

Sample Request URL

https://api.cirrusplatform.com/api/v1/integrations/collections/ColExt1/sharing 

Sample Request

{
     "Filter": {
     "Users": ["collection_author1","collection_author2"]},
     "CollectionRole": "Author",
     "AccessToCollection": true,
     "AccessToQuestions": true
}


Sample Response

{
    "Content":{
    "SuccessfullyGrantedAccessToCollection":["collection_author1"],
    "SuccessfullyGrantedAccessToQuestions":["collection_author1","collection_author2"],
    "SuccessfullyRevokedAccessToCollection":[],
    "SuccessfullyRevokedAccessToQuestions":[],
    "Errors": [{
              "UserName": "collection_author2",
              "Reason": "Collection sharing failed: Collection has already been shared with this user.”                               
              }]
    }
    "Success": true,
    "Errors": null
}



Response codes

CodeDescription
200Successful operation
403Not allowed to use external API
400Possible error codes:
ExternalId parameter can not be null or empty
Collection with ExternalId [{externalId}] is not found
Collection with externalId [{externalId}] has been deleted
Collection contains items that used in assessments
CollectionRole [xxxxx] is not found
500Internal server error


Was this article helpful?