Attributes¶
- OWNERSHIPFILTER_T¶
Comments can be retrieved in a batch that’s
filtered by ownership
(of the objects themselves, and the comments upon them). We use the term OWNERSHIPFILTER_T to stand in for an appropriate integer value:Filter type
Value
All
1
Mine
2
Others
3
- TAG_T¶
Tags assigned to EP objects can be private (for the object owner’s use only) or public. We use the term TAG_T to stand in for an appropriate integer value:
Tag type
Value
Public
0
Private
1
- EP.Comment¶
Users can attach comments to EP objects. The service provides them to clients like this:
{ "ObjectId": <number:D2LID>, "CommentId": <number:D2LID>, "UserId": <number:D2LID>, "CreatedDate": <string:UTCDateTime>|null, "Body": <string> }
- EP.TagObject¶
{ "Text": <string>, "Type": <number:TAG_T> }
Tag Actions¶
- GET /d2l/api/eP/(version)/object/(objectId)/tags/¶
Retrieve all the tags associated with an EP object (identified by EP object ID).
- Parameters:
- Status Codes:
200 OK – Action succeeded.
403 Forbidden – No permission to see EP object.
404 Not Found – EP object 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 returns a JSON array of
TagObject
data blocks containing all the tags assigned to the object.
- GET /d2l/api/eP/(version)/objects/tags/¶
Retrieve all the tags associated with a set of EP objects.
- Parameters:
version (D2LID) – API version.
- Query Parameters:
objects (CSV) – List of EP object IDs.
- Status Codes:
200 OK – Action succeeded.
400 Bad Request – Badly formatted list of EP object IDs provided.
403 Forbidden – No permission to see EP objects.
404 Not Found – No EP objects 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 returns a JSON structure mapping the EP object IDs you provided (as JSON property names) onto the
TagObject
data blocks associated with each EP object ID, like this:{ "<string:EP_object_ID>": [ { <composite:EP.TagObject> }, { <composite:EP.TagObject> }, ... ], "<string:EP_object_ID>": [ { <composite:EP.TagObject> }, { <composite:EP.TagObject> }, ... ], ... }
- POST /d2l/api/eP/(version)/object/(objectId)/tags/add¶
Add one or more tags to an EP object.
- Parameters:
- JSON Parameters:
TagObjects (JSON array of
EP.TagObject
) – Tags to add to the EP object’s tag list.
- Status Codes:
200 OK – Action succeeded.
403 Forbidden – No permission to add tags to EP object.
404 Not Found – EP object 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.
Note
This action will not remove any tags from the object: it looks through your list and adds any new tags from your list to the object, leaving its existing list intact.
- POST /d2l/api/eP/(version)/object/(objectId)/tags/remove¶
Remove one or more tags from an EP object.
- Parameters:
- JSON Parameters:
TagObjects (JSON array of
EP.TagObject
) – Tags to remove from the EP object’s tag list.
- Status Codes:
200 OK – Action succeeded.
403 Forbidden – No permission to remove tags from EP object.
404 Not Found – EP object 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.
- POST /d2l/api/eP/(version)/objects/tags/add¶
Add one or more tags to a set of EP objects.
- Parameters:
version (D2LID) – API version.
- Query Parameters:
objects (CSV) – List of EP object IDs.
- JSON Parameters:
TagObjects (JSON array of
EP.TagObject
) – Tags to add to the EP objects’ tag lists.
- Status Codes:
200 OK – Action succeeded.
400 Bad Request – Badly formatted list of EP object IDs provided.
403 Forbidden – No permission to add tags to EP objects.
404 Not Found – No EP objects 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.
Note
This action will not remove any tags from any of the objects, nor does it let you apply different sets of tags to different objects from the list. Effectively, this action behaves the same way as making a series of calls to the add action
on a single object ID
.Note also that this action reports success as long as it succeeds to act upon one of the EP objects from your provided list.
- POST /d2l/api/eP/(version)/objects/tags/remove¶
Remove one or more tags from a set of EP objects.
- Parameters:
version (D2LID) – API version.
- Query Parameters:
objects (CSV) – List of EP object IDs.
- JSON Parameters:
TagObjects (JSON array of
EP.TagObject
) – Tags to remove from the EP objects’ tag lists.
- Status Codes:
200 OK – Action succeeded.
400 Bad Request – Badly formatted list of EP object IDs provided.
403 Forbidden – No permission to remove tags from EP objects.
404 Not Found – No EP objects 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.
Note
This action behaves the same way as making a series of calls to the remove action
on a single object ID
.Note also that this action reports success as long as it succeeds to act upon one of the EP objects from your provided list.
- POST /d2l/api/eP/(version)/tags/autocomplete¶
Find a list of tags that match a tag template you provide.
- Parameters:
version (D2LID) – API version.
- JSON Parameters:
TagObject (
EP.TagObject
) – Tag to match against.
- Status Codes:
200 OK – Action succeeded.
403 Forbidden – No permission to match against private tags (if provided tag template included private type)
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 JSON array of known
TagObject
data blocks that all have your tag template’s Text property as a matching prefix for their Text properties.Note
This action uses the Text property in your template as a prefix string to match against known tag values.
If you set the Type property to 1 (Private), this action looks for matches in the list of known private-type tags (if you have permission to do so).
Comment Actions¶
Delete a comment from an EP object (identified by provided context chain of object IDs).
version (D2LVERSION) – API version.
commentId (D2LID) – Comment ID.
context (Context chain) – Context chain of object IDs to follow to find the EP object.
200 OK – Action succeeded.
403 Forbidden – No permission to delete comments from EP object, or no permission to see comments on EP object.
404 Not Found – EP object not found, or comment not found.
429 Too Many Requests – API call-rate limit exceeded.
2.5+ – Route first appears in LMS v10.4.0.
2.4- – Obsolete as of LMS v10.7.0.
Delete a comment from an EP object (identified by object ID).
version (D2LVERSION) – API version.
objectId (D2LID) – EP object ID.
commentId (D2LID) – Comment ID.
200 OK – Action succeeded.
403 Forbidden – No permission to delete comments from EP object, or no permission to see comments on EP object.
404 Not Found – EP object not found, or comment not found.
429 Too Many Requests – API call-rate limit exceeded.
2.5+ – Route first appears in LMS v10.4.0.
2.4- – Obsolete as of LMS v10.7.0.
Retrieve all the comments for an EP object (identified by provided context chain of object IDs).
version (D2LVERSION) – API version.
context (Context chain) – Context chain of object IDs to follow to find the EP object.
200 OK – Action succeeded.
403 Forbidden – No permission to see comments on EP object.
404 Not Found – EP object not found.
429 Too Many Requests – API call-rate limit exceeded.
2.5+ – Route first appears in LMS v10.4.0.
2.4- – Obsolete as of LMS v10.7.0.
Return. This action retrieves a
paged result set
containing, in a single page, the resultingComments
attached to the identified EP object.Retrieve all the comments for an EP object (identified by object ID).
version (D2LVERSION) – API version.
objectId (D2LID) – EP object ID.
200 OK – Action succeeded.
403 Forbidden – No permission to see comments on EP object.
404 Not Found – EP object not found.
429 Too Many Requests – API call-rate limit exceeded.
2.5+ – Route first appears in LMS v10.4.0.
2.4- – Obsolete as of LMS v10.7.0.
Return. This action retrieves a
paged result set
containing, in a single page, the resultingComments
attached to the identified EP object.Retrieve a filtered list of comments for EP objects.
version (D2LVERSION) – API version.
objectsFilter (OWNERSHIPFILTER_T) – An ownership filter to limit the list of EP objects considered.
commentsFilter (OWNERSHIPFILTER_T) – An ownership filter to limit the list of comments considered.
200 OK – Action succeeded.
403 Forbidden – No permission to see comments on EP objects.
429 Too Many Requests – API call-rate limit exceeded.
2.5+ – Route first appears in LMS v10.4.0.
2.4- – Obsolete as of LMS v10.7.0.
Return. This action retrieves a
paged result set
containing, in a single page, the filtered list ofComments
attached to EP objects.Create a new comment on an EP object (identified by provided context chain of object IDs).
version (D2LVERSION) – API version.
context (Context chain) – Context chain of object IDs to follow to find the EP object.
Comment (JSON string) – Comment to attach to the object.
200 OK – Action succeeded.
400 Bad Request – Invalid comment data provided.
403 Forbidden – No permission to attach comments to EP object.
404 Not Found – EP object not found.
429 Too Many Requests – API call-rate limit exceeded.
2.5+ – Route first appears in LMS v10.4.0.
2.4- – Obsolete as of LMS v10.7.0.
Return. This action returns the CommentId for the newly created comment as a single value.
Create a new comment on an EP object (identified by object ID).
version (D2LVERSION) – API version.
objectId (D2LID) – EP object ID.
Comment (JSON string) – Comment to attach to the object.
200 OK – Action succeeded.
400 Bad Request – Invalid comment data provided.
403 Forbidden – No permission to attach comments to EP object.
404 Not Found – EP object not found.
429 Too Many Requests – API call-rate limit exceeded.
2.5+ – Route first appears in LMS v10.4.0.
2.4- – Obsolete as of LMS v10.7.0.
Return. This action returns the CommentId for the newly created comment as a single value.