Collection Sharing

Prev Next

Collection

PUT /collections/{externalId}/sharing

Header

Name Data Type Description
Content-type: application/json for all requests
Authorization: EAPI {token} for all requests

Body Parameters

Parameters indicated with a * are mandatory

Name
Data Type
Description
*Filter Object) External Id. Should be unique. Alpha-Numeric. Autogenerated by default.
*Filter.Users Array Of String Filter users by User Names. Only exists users will be added.
AccessToCollection Boolean Users should have access to the collection.
Untouched by default
True - Grant access
False - Revoke access
AccessToQuestions Boolean Users 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

Code Description
200 Successful operation
403 Not allowed to use external API
400 Possible 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
500 Internal server error