Add collection
  • 30 Jun 2021
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Add collection

  • Dark
    Light
  • PDF

Article summary

Collection

POST /collections

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
ExternalIdstring (64)External Id. Should be unique. Alpha-Numeric. Autogenerated by default.
Title*string (100)Title collection
Ownerstring (64)Owner’s User Name. This value comes from ExternalApi settings by default.
TaxonomiesArrayList of Taxonomies connected to collection. If empty or null: all taxonomies would be available within the collection
Taxonomy.ExternalIdStringTaxonomy ExternalId
Taxonomy.TitleStringTaxonomy Title
LoRepositoryExternalIdsArrayContains information on LO repositories connected to collection. If empty: all LO repositories are available within the collection
ObjectiveRepositories.ExternalIdStringLearning objective repository ExternalId
ObjectiveRepositories.TitleStringLearning objective repository Title

Sample Request URL

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

Sample Request

{
   "ExternalId": "ColExt1",
   "Title": "Collection1",
   "Owner": "User 1 User1",
   "Taxonomies": [
      {"ExternalId": "TaxExt1", "Title": "Taxonomy_1"}
   ],
   "ObjectiveRepositories": [
      {"ExternalId": "ObjRepExt1", "Title": "Repository_1"}
   ]
}


Sample Response

{
    "Content": {
        "ExternalId": "ColExt1",
        "Errors": []
    },
    "Success": true,
    "Errors": null
}

Response codes

CodeDescription
200Successful operation
403Not allowed to use external API
400Possible error codes:
802: ExternalId must be alpha-numeric(a-z 0-9)
804: Collection title can not be null or empty
805: Collection title must be less than 100 symbols
806: Collection Owner has not been found
807: Collection owner was not set
808: Collection Owner does not have permissions to view collections
810: Collection ExternalId is used
900: Taxonomy has not been found
901: Taxonomy can not be empty
902: Taxonomy ExternalId can not be null or empty
1000: Learning objective repository has not been found
1001: Learning objective must be a repository
1002: Learning objective repository must be published
1003: Collection Owner does not have access to this repository
1004: Learning objective repository ExternalId can not be null or empty
500Internal server error

Was this article helpful?