The Collections feature provides an easy way to create, distribute and manage bundles of training. Each Collection is distributed through an entitlement record, called a Collection “Listing”. A Collection can contain Assets, Courses and Learning Paths.
The Collection listing specifies who can access the Collection, how long those users can access the Collection, and the maximum number of users who can consume that Collection.
The API’s documented here are for the Collections feature in Litmos.
Create a Collection
Creates a new Collection. A collection will contain content and the content will be distributed via Collection Listings.
Request URI
POST /collections?source={source}
Request Body
<Collection> <Name></Name> <Description></Description> <DefaultListing>true/false</DefaultListing> <ImageURL></ImageURL> </Collection>
Response Body
<Collection xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <Id></Id> <Name></Name> <Description></Description> <DefaultListing>true/false</DefaultListing> <ImageURL i:nil="true"/> </Collection>
Delete a Collection
Deletes a Collection. A collection contains content and the content will be distributed via a Collection Listing. The Collection cannot be deleted if it has a Collection Listing assigned. You will get a 403 error if a listing is assigned.
Request URI
DELETE /collections/{collectionid}?source={source}
Response Header
200 ok
Add Courses to a Collection
Add course records to a collection. A collection will contain content and the content will be distributed via Collection Listings.
Request URI
POST /collections/{collectionid}/courses?source={source}
Request Body
<Courses> <Course> <Id>string [max length 50]</Id> <SeqId>string [max length 2]</SeqId> (optional) </Course> <Course> <Id>string [max length 50]</Id> <SeqId>string [max length 2]</SeqId> (optional) </Course> <Course> <Id>string [max length 50]</Id> <SeqId>string [max length 2]</SeqId> (optional) </Course> <Course> <Id>string [max length 50]</Id> <SeqId>string [max length 2]</SeqId> (optional) </Course> <Course> <Id>string [max length 50]</Id> <SeqId>string [max length 2]</SeqId> (optional) </Course> </Courses>
Response Header
201 Created
Remove a Course from a Collection
Remove a course record from a collection. A collection will contain content and the content will be distributed via Collection Listings.
Request URI
DELETE /collections/{collectionid}/courses?source={source}
Request Body
<Courses> <Course> <Id>string [max length 50]</Id> </Course> </Courses>
Response Header
200 OK
Add Learning Paths to a Collection
Add learning path records to a collection. A collection will contain content and the content will be distributed via Collection Listings.
Request URI
POST /collections/{collectionid}/learningpaths?source={source}
Request Body
<LearningPaths> <LearningPath> <Id>string [max length 50]</Id> <SeqId>string [max length 2]</SeqId> (optional) </LearningPath> <LearningPath> <Id>string [max length 50]</Id> <SeqId>string [max length 2]</SeqId> (optional) </LearningPath> <LearningPath> <Id>string [max length 50]</Id> <SeqId>string [max length 2]</SeqId> (optional) </LearningPath> <LearningPath> <Id>string [max length 50]</Id> <SeqId>string [max length 2]</SeqId> (optional) </LearningPath> <LearningPath> <Id>string [max length 50]</Id> <SeqId>string [max length 2]</SeqId> (optional) </LearningPath> </LearningPaths>
Response Header
201 Created
Remove a Learning Path from a Collection
Remove a learning path record from a collection. A collection will contain content and the content will be distributed via Collection Listings.
Request URI
DELETE /collections/{collectionid}/learningpath?source={source}
Request Body
<Learningpaths> <Learningpath> <Id>string [max length 50]</Id> </Learningpath> </Learningpaths>
Response Header
200 OK
Create a Collection Listing
Create a listing entitlement within a collection record.. A listing is an entitlement layer which controls which users and teams can access the Collection under that entitlement, how many total people can access it in the context of that entitlement, and how long it can be accessed for in the context of that entitlement.
Important Note: DurationType value can be “Unlimited”, “Dynamic”, or “Fixed”.
- FixedDate field will require the value “0” for DurationType “Unlimited”
- FixedDate field will require the value “n” for DurationType “Dynamic”
- FixedDate field will require the value “YYYY-MM-DDTHH:MM:SS” for DurationType “Fixed”.
Request URI
POST /collectionlistings?source={source}
Request Body
<Listing> <Id></Id> <Name></Name> <Active></Active> <DurationType></DurationType> <MaxUsers></MaxUsers> <DurationDays></DurationDays> <FixedDate></FixedDate> <CollectionId>encryptedID</CollectionId> </Listing>
Response Body
<Listing xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <Id></Id> <Name></Name> <Active></Active> <DurationType></DurationType> <MaxUsers></MaxUsers> <DurationDays></DurationDays> <FixedDate></FixedDate> <CollectionId></CollectionId> </Listing>
Delete a Collection Listing
Deletes a Collection Listing. A listing is an entitlement layer which controls which users and teams can access the Collection under that entitlement, how many total people can access it in the context of that entitlement, and how long it can be accessed for in the context of that entitlement. The Collection Listing cannot be deleted if it has any Users or Teams assigned. You will get a 403 error if a User or Team is assigned.
Request URI
DELETE /collectionlistings/{collectionid}/{listingid}?source={source}
Response Header
200 ok
Get a list of Collections
Returns a list of Collections that have been created in the org.
Request URI
GET /collections?source={source}
Response Body
<Collections> <Collection> <Id></Id> <Name></Name> </Collection> <Collection> <Id></Id> <Name></Name> </Collection> </Collections>
Get a list of Collection Listings
Get a list of collection listing entitlements that belong to a collection record.
Request URI
GET /collectionlistings/{collectionid}?source={source}
Response Body
<Listings> <Listing> <Id></Id> <Name></Name> <Active></Active> <DurationType></DurationType> <MaxUsers></MaxUsers> <DurationDays></DurationDays> <FixedDate></FixedDate> </Listing> <Listing> <Id></Id> <Name></Name> <Active></Active> <DurationType></DurationType> <MaxUsers></MaxUsers> <DurationDays></DurationDays> <FixedDate></FixedDate> </Listing> </Listings>
Get a list of users added to a Collection Listing
Get the list of users that have been added to a collection listing entitlement.
Request URI
GET /collectionlistings/{listingid}/users?source={source}
Response Body
<ListingUsers> <ListingUser> <Id></Id> <FirstName></FirstName> <LastName></LastName> <Username></Username> <AccessTill></AccessTill> <Active></Active> </ListingUser> <ListingUser> <Id></Id> <FirstName></FirstName> <LastName></LastName> <Username></Username> <AccessTill></AccessTill> <Active></Active> </ListingUser> </ListingUsers>
Add users to a Collection Listing
Add a list of user records to a collection listing entitlement.
Request URI
POST /collectionlistings/{listingid}/users?source={source}
Request Body
<Users> <User> <Id></Id> <UserName></UserName> <FirstName></FirstName> <LastName></LastName> <Active></Active> <Email></Email> <AccessLevel></AccessLevel> <Brand></Brand> </User> <User> <Id></Id> <UserName></UserName> <FirstName></FirstName> <LastName></LastName> <Active></Active> <Email></Email> <AccessLevel></AccessLevel> <Brand></Brand> </User> </Users>
Response Body
200 Success
Remove a user from a Collection Listing
Remove a single user record from a collection listing entitlement.
Request URI
DELETE /collectionlistings/{listingid}/users/{userid}?source={source}
Response Header
200 OK
Get a list of teams added to a Collection Listing
Get a list of team records that have been added to a collection listing entitlement.
Request URI
GET /collectionlistings/{listingid}/teams?source={source}
Response Body
<Teams> <Team> <Id></Id> <Name></Name> <TeamCodeForBulkImport></TeamCodeForBulkImport> <ParentTeamId i:nil="true"/> </Team> <Team> <Id></Id> <Name></Name> <TeamCodeForBulkImport></TeamCodeForBulkImport> <ParentTeamId i:nil="true"/> </Team> </Teams>
Add a Team to a Collection Listing
Add a Team to a specific Collection Listing.
Request URI
POST /collectionlistings/{listingid}/team/{teamid}?source={source}
Response Header
200 OK
Remove a Team from a Collection Listing
Remove a team from a specific Collection Listing.
Request URI
DELETE /collectionlistings/{listingid}/team/{teamid}?source={source}
Response Header
200 OK