Developer Platform (April 2024)

ePortfolio Comments and Tags

«  ePortfolio Invites   ·  [   home  ·   reference  ·   community   |   search  ·   index   ·  routing table   ·  scopes table   ]   ·  ePortfolio Presentation  »

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>
}

Comment Actions

DELETE /d2l/api/eP/(version)/object/comment/(commentId)

Delete a comment from an EP object (identified by provided context chain of object IDs).

Parameters:
Query Parameters:
  • context (Context chain) – Context chain of object IDs to follow to find the EP object.

Status Codes:
API Versions:
  • 2.5+ – Route first appears in LMS v10.4.0.

  • 2.4-Obsolete as of LMS v10.7.0.

DELETE /d2l/api/eP/(version)/object/(objectId)/comment/(commentId)

Delete a comment from an EP object (identified by object ID).

Parameters:
  • version (D2LVERSION) – API version.

  • objectId (D2LID) – EP object ID.

  • commentId (D2LID) – Comment ID.

Status Codes:
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)/object/comments/

Retrieve all the comments for an EP object (identified by provided context chain of object IDs).

Parameters:
Query Parameters:
  • context (Context chain) – Context chain of object IDs to follow to find the EP object.

Status Codes:
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 paged result set containing, in a single page, the resulting Comments attached to the identified EP object.

GET /d2l/api/eP/(version)/object/(objectId)/comments/

Retrieve all the comments for an EP object (identified by object ID).

Parameters:
Status Codes:
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 paged result set containing, in a single page, the resulting Comments attached to the identified EP object.

GET /d2l/api/eP/(version)/objects/(objectsFilter)/comments/(commentsFilter)

Retrieve a filtered list of comments for EP objects.

Parameters:
  • 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.

Status Codes:
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 paged result set containing, in a single page, the filtered list of Comments attached to EP objects.

POST /d2l/api/eP/(version)/object/comments/new

Create a new comment on an EP object (identified by provided context chain of object IDs).

Parameters:
Query Parameters:
  • context (Context chain) – Context chain of object IDs to follow to find the EP object.

JSON Parameters:
  • Comment (JSON string) – Comment to attach to the object.

Status Codes:
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 the CommentId for the newly created comment as a single value.

POST /d2l/api/eP/(version)/object/(objectId)/comments/new

Create a new comment on an EP object (identified by object ID).

Parameters:
JSON Parameters:
  • Comment (JSON string) – Comment to attach to the object.

Status Codes:
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 the CommentId for the newly created comment as a single value.

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:
  • version (D2LID) – API version.

  • objectId (D2LID) – EP object ID.

Status Codes:
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:
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:
  • version (D2LID) – API version.

  • objectId (D2LID) – EP object ID.

JSON Parameters:
  • TagObjects (JSON array of EP.TagObject) – Tags to add to the EP object’s tag list.

Status Codes:
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:
  • version (D2LID) – API version.

  • objectId (D2LID) – EP object ID.

JSON Parameters:
  • TagObjects (JSON array of EP.TagObject) – Tags to remove from the EP object’s tag list.

Status Codes:
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:
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:
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:
Status Codes:
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).

«  ePortfolio Invites   ·  [   home  ·   reference  ·   community   |   search  ·   index   ·  routing table   ·  scopes table   ]   ·  ePortfolio Presentation  »