Attributes¶
- EP.Collection¶
A Collection EP object’s structure differs in two ways from the general form of the
EpObject
data block:Its ObjectTypeProperty will be set to the appropriate EPOBJ_T value (
"<number:EPOBJ_T:Collection>
).Three additional properties appear in the Fetch form of the EP object’s data block:
{ "ItemsCount": <number>, "ItemIds": [ // Array of D2LID numbers <number:D2LID>, <number:D2LID>, <number:D2LID>, ... ], "Items": [ // Array of EP.EpObject blocks { <composite:EP.EpObject> }, { <composite:EP.EpObject> }, { <composite:EP.EpObject> }, ... ] }
These extra properties serve to enumerate the various EP objects contained within the collection.
Actions¶
- DELETE /d2l/api/eP/(version)/collection/(objectId)¶
Delete a particular EP collection.
- Parameters:
version (D2LVERSION) – API version.
objectId (D2LID) – EP object ID for collection.
- Status Codes:
200 OK – Action succeeded.
403 Forbidden – No permission to delete the collection.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions:
2.5+ – Route first appears in LMS v10.4.0.
2.4- – Obsolete as of LMS v10.7.0.
- GET /d2l/api/eP/(version)/collection/(objectId)¶
Retrieve a particular EP collection, without its contents.
- Parameters:
version (D2LVERSION) – API version.
objectId (D2LID) – EP object ID for collection.
- Query Parameters:
c (boolean) – Optional. If “true”, include comments attached to the collection.
- Status Codes:
200 OK – Action succeeded.
403 Forbidden – No permission to see collection.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions:
2.5+ – Route first appears in LMS v10.4.0.
2.4- – Obsolete as of LMS v10.7.0.
Return. This action retrieves a
Collection
JSON data block but without populating the Items property. The service will populate the ItemsCount and ItemIds properties, so you will know what the collection’s contents are.
- GET /d2l/api/eP/(version)/collection/(objectId)/contents/¶
Retrieve a particular EP collection, with its contents.
- Parameters:
version (D2LVERSION) – API version.
objectId (D2LID) – EP object ID for collection.
- Query Parameters:
c (boolean) – Optional. If “true”, include comments attached to the collection.
- Status Codes:
200 OK – Action succeeded.
403 Forbidden – No permission to see collection.
404 Not Found – Collection not found.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions:
2.5+ – Route first appears in LMS v10.4.0.
2.4- – Obsolete as of LMS v10.7.0.
Return. This action retrieves a
Collection
JSON data block with a fully populated Items property array.Warning
This action can return a sizeable amount of data. If you only want to know about the collection’s properties, you should instead call
GET /d2l/api/eP/(version)/collection/(objectId)
.
- POST /d2l/api/eP/(version)/collections/new¶
Create a new EP collection.
- Parameters:
version (D2LVERSION) – API version.
- JSON Parameters:
Collection (
EP.Collection
) – Properties for the new collection.
- Status Codes:
200 OK – Action succeeded.
400 Bad Request – Invalid collection data provided.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions:
2.5+ – Route first appears in LMS v10.4.0.
2.4- – Obsolete as of LMS v10.7.0.
Return. This action returns a
Collection
JSON data block for the new collection created.
- POST /d2l/api/eP/(version)/collection/(objectId)¶
Update an EP collection.
- Parameters:
version (D2LVERSION) – API version.
objectId (D2LID) – EP object ID for collection.
- JSON Parameters:
Collection (
EP.Collection
) – Updated properties for collection.
- Status Codes:
200 OK – Action succeeded.
400 Bad Request – Mismatch between EP object ID in route and ObjectId property in the provided JSON data, invalid collection data provided.
403 Forbidden – No permission to update collection.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions:
2.5+ – Route first appears in LMS v10.4.0.
2.4- – Obsolete as of LMS v10.7.0.
Return. This action returns a
Collection
JSON data block for the updated collection.
- POST /d2l/api/eP/(version)/collection/(collectionId)/add/(objectId)¶
Add an existing EP object to an EP collection.
- Parameters:
version (D2LVERSION) – API version.
collectionId (D2LID) – EP object ID for collection.
objectId (D2LID) – EP object ID for item in collection.
- Status Codes:
200 OK – Action succeeded.
403 Forbidden – No permission to add items to the collection.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions:
2.5+ – Route first appears in LMS v10.4.0.
2.4- – Obsolete as of LMS v10.7.0.
- POST /d2l/api/eP/(version)/collection/(collectionId)/remove/(objectId)¶
Remove a particular item from an EP collection.
- Parameters:
version (D2LVERSION) – API version.
collectionId (D2LID) – EP object ID for collection.
objectId (D2LID) – EP object ID for item in collection.
- Status Codes:
200 OK – Action succeeded.
403 Forbidden – No permission to remove items from the collection.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions:
2.5+ – Route first appears in LMS v10.4.0.
2.4- – Obsolete as of LMS v10.7.0.