Attributes¶
- ALIGNEDACTIVITYTYPE_T¶
We categorize the types of activities, and use the term ALIGNEDACTIVITYTYPE_T to stand in for an appropriate string name.
Activity Types
ContentObject
DiscussionTopic
Assignment
LtiLink
Quiz
Survey
Checklist
SelfAssessment
QuizQuestion
RubricCriterion
- Outcomes.Outcome¶
An outcome set contains outcomes in a tree structure. The following JSON block describes an outcome node:
{ "OutcomeId": <string:GUID>, "SourceType": <string>, "SourceId": <string>, "SourceOrgUnitId": <number:D2LID>|null, "ShortCode": <string>, "Description": <string>, "Children": [ // Array of Outcome blocks { <composite:Outcomes.Outcome> }, { <composite:Outcomes.Outcome> }, ... ] }
- OutcomeId
A unique identifier for a specific outcome instance.
- SourceType
The source where this outcome was defined. Currently supported values are asn for outcomes defined in the Achievement Standards Network and lores for outcomes authored within Brightspace.
- SourceId
A unique identifier for the outcome within its source. For ASN outcomes, this is the ASN URI. For authored outcomes (lores), this is the same as the OutcomeId.
- SourceOrgUnitId
The org unit where this outcome instance was defined, or null for outcomes defined in an organization level outcome set.
Note
An outcome defined in one org unit may appear in another org unit’s outcome set via a course copy. Outcomes imported from an organization level outcome set will always have a null SourceOrgUnitId.
- ShortCode
An optional short code to identify the outcome.
- Description
The main outcome display text.
- Children
An array of child outcomes.
- Outcomes.OutcomeSet¶
When the service sends you information about an outcome set, it will send back a JSON structure like this:
{ "OutcomeSetId": <number:D2LID>|0, "Name": <string>|null, "Outcomes": [ // Array of Outcome blocks { <composite:Outcomes.Outcome> }, { <composite:Outcomes.Outcome> }, ... ], "ScaleId": <number:D2LID>|null, // Added with LE API v1.98 "AchievementThresholdLevelId": <number:D2LID>|null // Added with LE API v1.98 }
- OutcomeSetId
An identifier for the outcome set. This identifier is unique for organization level outcome sets. Any imported org unit level outcome sets share an identifier with the organization level outcome set they were imported from. The primary “My Learning Outcomes” org unit level outcome set always uses the special identifier value of 0.
- Name
The display name of the outcome set. This value is null for the primary “My Learning Outcomes” outcome set in an org unit.
- Outcomes
An array of outcomes. The array contains only the root outcomes, each of which contains its own child outcomes, thus forming a tree structure.
- ScaleId
Identifier for the achievement
scaleassigned to this outcome set, or null if no scale is assigned.- AchievementThresholdLevelId
Identifier for the level, within the scale identified by ScaleId, that represents the achievement threshold for this outcome set, or null if no achievement threshold is set.
Note
Achievement thresholds are only available to clients who have purchased the Achievement Plus add-on.
- Outcomes.OutcomeSetUpdateNode¶
When updating the outcome tree in an outcome set, each node in the tree must be one of the following three types (with it’s own JSON structure):
Reference to an existing outcome
External outcome to import
Newly created outcome
Reference existing. When an outcome already exists in the outcome set and should be preserved, or if an outcome defined in another outcome set should be imported, the JSON block should look like this:
{ "OutcomeId": <string:GUID>, "Children": [ // Array of OutcomeSetUpdateNode blocks { <composite:Outcomes.OutcomeSetUpdateNode> }, { <composite:Outcomes.OutcomeSetUpdateNode> }, ... ] }
- OutcomeId
Identifier for an existing outcome to reference.
- Children
An array of child outcomes. The order of outcomes provided does not matter; the service will reorder the outcomes alphabetically.
Import external. When a new outcome should be added by importing from ASN, the JSON block should look like this:
{ "Import": { "Source": "asn", "Uri": <string> }, "Children": [ // Array of OutcomeSetUpdateNode blocks { <composite:Outcomes.OutcomeSetUpdateNode> }, { <composite:Outcomes.OutcomeSetUpdateNode> }, ... ] }
- Uri
URI for the ASN outcome to import.
- Children
An array of child outcomes. The order of outcomes provided does not matter; the service will reorder the outcomes alphabetically.
Create new. When an outcome should be added by creating a new authored outcome, the JSON block should look like this:
{ "Create": { "Description": <string>, "ShortCode": <string> // Optional }, "Children": [ // Array of OutcomeSetUpdateNode blocks { <composite:Outcomes.OutcomeSetUpdateNode> }, { <composite:Outcomes.OutcomeSetUpdateNode> }, ... ] }
- Description
The main outcome text. Maximum of 1024 characters.
- ShortCode
An optional short code to identify the outcome. Maximum of 128 characters. If this field is missing or null, an empty string will be used.
- Children
An array of child outcomes. The order of outcomes provided does not matter; the service will reorder the outcomes alphabetically. All children must be either a Create new block or a Reference existing block that refers to an authored outcome that is already present in this outcome set and is not used in any other outcome set.
- Outcomes.OutcomeSetUpdate¶
When updating an outcome set, use a structure like this:
{ "Name": <string>|null, // Optional "Outcomes": null|[ // Optional { <composite:Outcomes.OutcomeSetUpdateNode> }, { <composite:Outcomes.OutcomeSetUpdateNode> }, ... ] }
- Name
The display name of the outcome set. Maximum of 256 characters. If this field is missing or null, the outcome set will not be renamed.
- Outcomes
An array of outcomes. The array contains only the root outcomes, each of which contains its own child outcomes, thus forming a tree structure. The order of outcomes does not matter; the service will reorder the outcomes alphabetically.
If this field is missing or null, the outcomes in the outcome set will not be modified. To remove all outcomes from an outcome set, use an empty array.
As of LE API v1.98 and following, updates to an organization level outcome set may include an additional optional ScaleId property to change the outcome set’s achievement scale:
{ "Name": <string>|null, "Outcomes": null|[ // Optional { <composite:Outcomes.OutcomeSetUpdateNode> }, { <composite:Outcomes.OutcomeSetUpdateNode> }, ... ], "ScaleId": null|{ // Optional "Change": "Update"|"Remove", "ScaleId": <number:D2LID>|null } }
- Change
How to modify the assigned achievement scale:
Update. Assign the scale identified by ScaleId to the outcome set.
Remove. Remove the scale currently assigned to the outcome set. Any achievement threshold on the outcome set is also cleared.
- ScaleId
Identifier for the achievement
scaleto assign. Required when Change is Update; must be omitted or null otherwise.
As of LE API v1.98 and following, updates to an org unit level outcome set may include additional optional ScaleId and AchievementThresholdLevelId properties to change the outcome set’s achievement scale and achievement threshold:
{ "Name": <string>|null, "Outcomes": null|[ // Optional { <composite:Outcomes.OutcomeSetUpdateNode> }, { <composite:Outcomes.OutcomeSetUpdateNode> }, ... ], "ScaleId": null|{ // Optional "Change": "Override"|"Remove"|"Reset", "Override": <number:D2LID>|null }, "AchievementThresholdLevelId": null|{ // Optional "Change": "Override"|"Remove"|"Reset", "Override": <number:D2LID>|null } }
- Change (of ScaleId, AchievementThresholdLevelId)
How to modify the assigned scale or achievement threshold:
Override. Assign the value identified by Override. Overriding ScaleId also resets the outcome set’s achievement threshold to the default achievement threshold of the newly assigned scale.
Remove. Remove the currently assigned value. Removing ScaleId also clears any achievement threshold on the outcome set.
Reset (of ScaleId). Reset the achievement scale, and the achievement threshold, to the values inherited from the outcome set’s source organization level outcome set, or to null if there is no source outcome set or the source has no scale assigned.
Reset (of AchievementThresholdLevelId). Reset the achievement threshold to the default achievement threshold of the outcome set’s currently assigned scale, or to null if that scale has no default achievement threshold. Requires the outcome set to already have a scale assigned.
- Override (of ScaleId, AchievementThresholdLevelId)
Identifier to assign when Change is Override. Must be omitted or null for other Change values.
Note
An achievement threshold cannot be set on an outcome set that has no achievement scale assigned, and it may not be set to the first (lowest) level of the scale.
The achievement scale or achievement threshold of an outcome set cannot be changed if the requesting user does not have permission to manage outcomes in the outcome set’s org unit, or (for the achievement scale) if the outcome set already has recorded achievement (demonstrations).
Achievement thresholds (AchievementThresholdLevelId) are only available to clients who have purchased the Achievement Plus add-on.
- Outcomes.OutcomeSetCreate¶
When creating an organization level outcome set, use a structure like this:
{ "Name": <string>, "ScaleId": <number:D2LID>|null // Added with LE API v1.98. Optional. }
- Name
The display name to assign to the created outcome set. Maximum of 256 characters.
- ScaleId
Identifier for the achievement
scaleto assign to the newly created outcome set. If this field is missing or null, no scale will be assigned.
- Outcomes.ImportExportOutcome¶
The import/export format of an outcome tree node is one of the following two JSON structures depending on the outcome source:
ASN. An ASN outcome being imported or exported is represented with the following JSON block:
{ "Source": "asn", "Uri": <string>, "Children": [ // Array of ImportExportOutcome blocks { <composite:Outcomes.ImportExportOutcome> }, { <composite:Outcomes.ImportExportOutcome> }, ... ] }
- Uri
URI for the ASN standard (outcome).
Authored. An authored outcome being imported or exported is represented with the following JSON block:
{ "Source": "lores", "ShortCode": <string>, // Optional when importing "Description": <string>, "Children": [ // Array of ImportExportOutcome blocks { <composite:Outcomes.ImportExportOutcome> }, { <composite:Outcomes.ImportExportOutcome> }, ... ] }
- ShortCode
An optional short code identifying the outcome. Maximum of 128 characters. If this field is missing or null, an empty string will be used.
- Description
The main outcome text. Maximum of 1024 characters.
- Outcomes.ImportExportOutcomeSet¶
The import/export format of an outcome set is a JSON structure like this:
{ "Name": <string>|null, "ImportId": <string>, "Outcomes": [ // Array of ImportExportOutcome blocks { <composite:Outcomes.ImportExportOutcome> }, { <composite:Outcomes.ImportExportOutcome> }, ... ] }
- Name
The display name of the outcome set. Maximum of 256 characters.
- ImportId
An arbitrary string serving as a globally unique identifier for the outcome set. Maximum of 256 characters.
- Outcomes
An array of child outcomes. The order of outcomes provided on import does not matter; the service will reorder the outcomes alphabetically.
- Outcomes.OutcomeAlignment¶
The format of the org units with alignments to a given outcome is a JSON structure like this:
{ "OutcomeId": <string:GUID>, "AlignedOrgUnits": [ <number:D2LID>, ... ] }
- OutcomeId
Identifier for the outcome.
- AlignedOrgUnits
An array of all org unit IDs of the org units that contain alignments to the given outcome.
- Outcomes.BulkAlignment¶
The format of the alignments in an org unit to a given outcome is a JSON structure like this:
{ "OutcomeSetId": <number:D2LID>|0, "OutcomeId": <string:GUID>, "Activities": [ // Array of activity blocks { <composite:Outcomes.AlignedActivity> }, { <composite:Outcomes.AlignedActivity> }, ... ] }
- OutcomeSetId
Identifier for the outcome set. The primary “My Learning Outcomes” org unit level outcome set always uses the special identifier value of 0.
- Activities
An array of
activity objectsaligned to the outcome.
- Outcomes.AlignedActivity¶
Properties for an aligned activity used in bulk alignment operations; the properties and values vary depending on the type of underlying activity.
All activities share these basic properties:
{ "ActivityType": <string:ALIGNEDACTIVITYTYPE_T>, "ObjectId": <number>, "RubricId": <number>|null }
- ObjectId
Identifier for the aligned activity object.
- RubricId
Identifier for the aligned rubric, if applicable; otherwise null.
Quiz, QuizQuestion. Quiz and quiz question activity types add a new QuestionID property to the basic structure:
{ "ActivityType": <string:ALIGNEDACTIVITYTYPE_T>, "ObjectId": <number>, "RubricId": <number>|null, "QuestionID": <number>|null }
- QuestionId
If the activity is of type QuizQuestion, then this is an identifier for the quiz question; otherwise, if the activity is of type Quiz, this property will have a null value.
- Outcomes.Alignment¶
The format of the outcomes aligned to an activity is a JSON structure like this:
{ "OutcomeSetId": <number:D2LID>|0, "OutcomeId": <string:GUID>, "Direct": <boolean> }
- OutcomeSetId
Identifier for the outcome set. The primary “My Learning Outcomes” org unit level outcome set always uses the special identifier value of 0.
- OutcomeId
Identifier for the outcome.
- Direct
True if the alignment is direct.
- Outcomes.UpdateAlignment¶
The format of the action to update an alignment is a JSON structure like this:
{ "Action": "add|remove|replace", "OutcomeIds": [ <string:GUID>, ... ] }
- Action
How to modify the alignment:
add. Outcomes are aligned to the activity.
remove. Outcomes are unaligned from the activity.
replace. Outcomes are aligned to the activity and any existing alignments on the activity not included OutcomeIds become unaligned.
- OutcomeIds
List of identifiers for the relevant outcomes.
Outcome Scales¶
- Outcomes.Scale¶
An achievement scale is a named, ordered set of levels used to describe the degree to which an outcome has been achieved. When the service sends you information about a scale, it will send back a JSON structure like this:
{ "ScaleId": <number:D2LID>, "Name": <string>, "UsesPercentages": <boolean>, "AchievementThresholdLevelId": <number:D2LID>|null, "Levels": [ // Array of ScaleLevel blocks { <composite:Outcomes.ScaleLevel> }, { <composite:Outcomes.ScaleLevel> }, ... ] }
- ScaleId
An identifier for the scale.
- Name
The display name of the scale.
- UsesPercentages
True if the levels of this scale each have a PercentThreshold value.
- AchievementThresholdLevelId
Identifier for the level, within Levels, that this scale designates as its default achievement threshold, or null if the scale has no designated achievement threshold.
Note
Achievement thresholds are only available to clients who have purchased the Achievement Plus add-on.
- Levels
An array of the levels that make up the scale, ordered from lowest to highest.
- Outcomes.ScaleLevel¶
A single level within an achievement scale is represented with a JSON structure like this:
{ "LevelId": <number:D2LID>, "Color": <string>, "Name": <string>, "PercentThreshold": <number> // Optional }
- LevelId
An identifier for the level.
- Color
The colour associated with this level, formatted as an uppercase CSS hex colour code (for example, #FF0000).
- Name
The display name of the level.
- PercentThreshold
Present only if the scale’s UsesPercentages is set to true; otherwise, must not be present. If present, indicates the percentage value (0-100) that a learner must meet or exceed to attain this level.
- Outcomes.ScaleCreate¶
When creating a new achievement scale, use a structure like this:
{ "Name": <string>, "Levels": [ // Array of ScaleLevelCreate blocks { <composite:Outcomes.ScaleLevelCreate> }, { <composite:Outcomes.ScaleLevelCreate> }, ... ] }
- Name
The display name to assign to the scale. Maximum of 256 characters.
- Levels
An array of the levels to create for the scale, ordered from lowest to highest. A scale must have between 2 and 10 levels (inclusive).
- Outcomes.ScaleLevelCreate¶
The format of a level provided when creating a scale is a JSON structure like this:
{ "Color": <string>, "Name": <string>, "PercentThreshold": <number>|null, // Optional "IsAchievementThreshold": <boolean> // Optional, defaults to false }
- Color
A CSS colour value for the level (for example, #FF0000 or red).
- Name
The display name of the level. Maximum of 256 characters. No two levels in the same scale may share the same name (case-insensitive).
- PercentThreshold
The percentage value (0-100) that a learner must meet or exceed to attain this level. If provided for any level, it must be provided for every level in the scale, with strictly increasing values, and the first (lowest) level’s value must be 0.
- IsAchievementThreshold
True if this level should be designated as the scale’s achievement threshold. At most one level in a scale may be designated as the achievement threshold, and the first (lowest) level may not be.
- Outcomes.ScaleUpdate¶
When updating a scale’s name or achievement threshold, use a structure like this:
{ "Name": <string>, "AchievementThresholdLevelId": <number:D2LID>|null }
- Name
The display name to assign to the scale. Maximum of 256 characters.
- AchievementThresholdLevelId
Identifier for the level to designate as the scale’s achievement threshold, or null to remove the scale’s achievement threshold. If provided, the level must belong to this scale and must not be the first (lowest) level.
Note
Achievement thresholds are only available to clients who have purchased the Achievement Plus add-on.
- Outcomes.ScaleLevelUpdate¶
When updating a single level of a scale, use a structure like this:
{ "Color": <string>|null, // Optional "Name": <string>|null // Optional }
- Color
A CSS colour value for the level (for example, #FF0000 or red). If this field is missing or null, the level’s colour will not be changed.
- Name
The display name of the level. Maximum of 256 characters. If this field is missing or null, the level’s name will not be changed. No two levels in the same scale may share the same name (case-insensitive).
Actions¶
Organization Level Outcome Sets¶
- DELETE /d2l/api/le/(version)/lo/outcomeSets/(outcomeSetId)¶
Delete a particular organization level outcome set.
- Parameters:
version (D2LVERSION) – API version.
outcomeSetId (D2LID) – Outcome set ID for the specific outcome set.
- Oauth2 Scopes:
outcomes:sets:manage
- Status Codes:
204 No Content – Action successful.
403 Forbidden – No permission to manage organization level outcome sets.
404 Not Found – No such outcome set.
409 Conflict – Cannot be deleted because at least one of its outcomes is used in an org unit level outcome set.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions:
1.92+ – Route first appears in LMS v20.26.2.
- GET /d2l/api/le/(version)/lo/outcomeSets/¶
Retrieve all organization level outcome sets.
- Parameters:
version (D2LVERSION) – API version.
- Oauth2 Scopes:
outcomes:sets:read
- Status Codes:
200 OK – Action successful.
403 Forbidden – No permission to list organization level outcome sets.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions:
1.92+ – Route first appears in LMS v20.26.2.
Return. This action retrieves a JSON array of
OutcomeSetstructures that fully enumerates all of the organization level outcome sets.
- GET /d2l/api/le/(version)/lo/outcomeSets/(outcomeSetId)¶
Retrieve a specific organization level outcome set.
- Parameters:
version (D2LVERSION) – API version.
outcomeSetId (D2LID) – Outcome set ID for the specific outcome set.
- Oauth2 Scopes:
outcomes:sets:read
- Status Codes:
200 OK – Action successful.
403 Forbidden – No permission to list organization level outcome sets.
404 Not Found – No such outcome set.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions:
1.92+ – Route first appears in LMS v20.26.2.
Return. This action returns a
OutcomeSetJSON block.
- POST /d2l/api/le/(version)/lo/outcomeSets/¶
Create a new organization level outcome set.
- Parameters:
version (D2LVERSION) – API version.
- Oauth2 Scopes:
outcomes:sets:manage
- Status Codes:
201 Created – Action successful.
400 Bad Request – Invalid or missing name.
403 Forbidden – No permission to manage organization level outcome sets.
404 Not Found – No such scale, if a ScaleId is provided.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions:
1.92+ – Route first appears in LMS v20.26.2.
Input. The action’s body should be an
OutcomeSetCreateJSON data block.Return. This action returns a
OutcomeSetJSON block.
- PUT /d2l/api/le/(version)/lo/outcomeSets/(outcomeSetId)¶
Update a particular organization level outcome set.
- Parameters:
version (D2LVERSION) – API version.
outcomeSetId (D2LID) – Outcome set ID for the specific outcome set.
- Oauth2 Scopes:
outcomes:sets:manage
- Status Codes:
200 OK – Action successful.
400 Bad Request – Invalid outcome structure, empty name, or an invalid ScaleId update block.
403 Forbidden – No permission to manage organization level outcome sets.
404 Not Found – No such outcome set, or no such scale identified by ScaleId.
409 Conflict – The update would violate one of the integrity rules below.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions:
1.92+ – Route first appears in LMS v20.26.2.
Input. The action’s body should be an
OutcomeSetUpdateJSON data block.If an Outcomes property is present, the entire outcome tree is replaced with the new updated tree.
As of API version 1.98, if a ScaleId property is present, the outcome set’s achievement scale is updated as described in
OutcomeSetUpdate.To preserve the integrity of outcomes instances that appear in multiple outcome sets, the following integrity rules are imposed on all updates to organization level outcome sets:
An outcome instance that is used in another outcome set may not be removed or reparented.
An outcome instance that is defined in another outcome set may not be added.
Return. This action returns a
OutcomeSetJSON block.
Org Unit Level Outcome Sets¶
- GET /d2l/api/le/(version)/(orgUnitId)/lo/outcomeSets/¶
Retrieve all outcome sets in an org unit.
- Parameters:
version (D2LVERSION) – API version.
orgUnitId (D2LID) – Org unit ID.
- Oauth2 Scopes:
outcomes:sets:read
- Status Codes:
200 OK – Action successful.
403 Forbidden – No permission to view outcome sets.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions:
1.92+ – Route first appears in LMS v20.26.2.
Return. This action retrieves a JSON array of
OutcomeSetstructures that fully enumerates all of the outcome sets in the org unit.
- GET /d2l/api/le/(version)/(orgUnitId)/lo/outcomeSets/(outcomeSetId)¶
Retrieve a specific outcome set from an org unit.
- Parameters:
version (D2LVERSION) – API version.
orgUnitId (D2LID) – Org unit ID.
outcomeSetId (D2LID | 0) – Identifier for the specific outcome set (or 0 for the primary “My Learning Outcomes” outcome set).
- Oauth2 Scopes:
outcomes:sets:read
- Status Codes:
200 OK – Action successful.
403 Forbidden – No permission to view outcome sets.
404 Not Found – No such outcome set or org unit.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions:
1.92+ – Route first appears in LMS v20.26.2.
Return. This action returns a
OutcomeSetJSON block.
- PUT /d2l/api/le/(version)/(orgUnitId)/lo/outcomeSets/(outcomeSetId)¶
Update a specific outcome set from an org unit.
- Parameters:
version (D2LVERSION) – API version.
orgUnitId (D2LID) – Org unit ID.
outcomeSetId (D2LID | 0) – Identifier for the specific outcome set (or 0 for the primary “My Learning Outcomes” outcome set).
- Oauth2 Scopes:
outcomes:sets:manage
- Status Codes:
200 OK – Action successful.
400 Bad Request – Invalid or missing update structure, or an invalid ScaleId or AchievementThresholdLevelId update block.
403 Forbidden – No permission to manage outcome sets.
404 Not Found – No such outcome set or org unit, no such scale or level identified by ScaleId/AchievementThresholdLevelId, or setting an achievement threshold requires the Achievement Plus add-on, which is not available on this instance.
409 Conflict – The update would violate one of the integrity rules below, or the outcome set’s achievement scale or achievement threshold cannot be changed for this outcome set.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions:
1.92+ – Route first appears in LMS v20.26.2.
Input. The action’s body should be an
OutcomeSetUpdateJSON data block. This update must include a non-null value for the Outcomes property, and the Name property should be null or omitted.If an Outcomes property is present, the entire outcome tree is replaced with the new updated tree.
As of API version 1.98, if ScaleId and/or AchievementThresholdLevelId properties are present, the outcome set’s achievement scale and achievement threshold are updated as described in
OutcomeSetUpdate.To preserve the integrity of outcomes instances that appear in multiple outcome sets, the following integrity rules are imposed on all updates to org unit level outcome sets:
An outcome instance that is used in another outcome set may not be reparented.
An outcome instance that is defined in another outcome set may only be added to this outcome set if both outcome sets have the same ID. In other words, they must either both be defined in the same organization level outcome set or they must both be defined in a primary (ID 0) org unit level outcome set.
Return. This action returns a
OutcomeSetJSON block.
Import and Export¶
- POST /d2l/api/le/(version)/lo/bulkExport¶
Retrieve organization level outcome sets in export format.
- Parameters:
version (D2LVERSION) – API version.
- Query Parameters:
outcomeSetIds (CSV) – Optional. If true, filters to only the outcome sets with the given IDs.
- Oauth2 Scopes:
outcomes:sets:export
- Status Codes:
200 OK – Action successful.
403 Forbidden – No permission to list organization level outcome sets.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions:
1.92+ – Route first appears in LMS v20.26.2.
Return. This action retrieves a JSON array of
ImportExportOutcomeSetstructures.The response body returned from this API call may be used as the request body for an import API call.
- POST /d2l/api/le/(version)/lo/bulkImport¶
Imports organization level outcome sets.
- Parameters:
version (D2LVERSION) – API version.
- Oauth2 Scopes:
outcomes:sets:import
- Status Codes:
204 No Content – Action successful (no content).
400 Bad Request – A provided outcome set has a null ImportId or multiple provided outcome sets have the same ImportId, or an outcome tree has an invalid structure.
403 Forbidden – No permission to manage organization level outcome sets.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions:
1.92+ – Route first appears in LMS v20.26.2.
Input. The action’s body should be a JSON array of
ImportExportOutcomeSetblocks with non-null ImportId values.The import will perform a merge if the outcome set already exists. An import will never remove or alter existing outcomes in an outcome set.
If an organization level outcome set with a given ImportId does not already exist, it will be created and named using the Name property in the import JSON data. If an organization level outcome set with a given ImportId does already exist, the Name property in the import JSON data will be ignored (existing outcome sets will not be renamed).
Note
Authored outcomes are considered to be equivalent to each other, and thus will not be duplicated, if they have the same short code, description, and parent outcome.
- POST /d2l/api/le/(version)/(orgUnitId)/lo/bulkExport¶
Retrieve org unit level outcome sets in export format.
- Parameters:
version (D2LVERSION) – API version.
orgUnitId (D2LID) – Org unit ID.
- Query Parameters:
outcomeSetIds (CSV) – Optional. If true, filters to only the outcome sets with the given IDs.
- Oauth2 Scopes:
outcomes:sets:export
- Status Codes:
200 OK – Action successful.
403 Forbidden – No permission to view outcome sets.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions:
1.92+ – Route first appears in LMS v20.26.2.
Return. This action retrieves a JSON array of
ImportExportOutcomeSetstructures.The response body returned from this API call may be used as the request body for an import API call.
- POST /d2l/api/le/(version)/(orgUnitId)/lo/bulkImport¶
Imports outcome sets into the org unit.
- Parameters:
version (D2LVERSION) – API version.
orgUnitId (D2LID) – Org unit ID.
- Oauth2 Scopes:
outcomes:sets:import
- Status Codes:
204 No Content – Action successful (no content).
400 Bad Request – Multiple provided outcome sets have the same ImportId, or an outcome tree has an invalid structure.
403 Forbidden – No permission to manage outcome sets in the org unit or, if required, organization.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions:
1.92+ – Route first appears in LMS v20.26.2.
Input. The action’s body should be a JSON array of
ImportExportOutcomeSetblocks with non-null ImportId values.At most one provided outcome set may have a null Name and ImportId, which will result in the outcomes being imported to the org unit’s primary “My Learning Outcomes” outcome set (outcome set ID 0). For imported outcome sets where an ImportId is provided, the outcomes will first be imported into an organization level outcome set with the same behaviour as the organization level import API (unless they already exist). The outcomes will then be imported into the org unit.
Note
Authored outcomes are considered to be equivalent to each other, and thus will not be duplicated, if they have the same short code, description, and parent outcome.
Alignments¶
- GET /d2l/api/le/(version)/lo/alignments/outcomeSet/(outcomeSetId)¶
Retrieve the org units that contain alignments to a given outcome set.
- Parameters:
version (D2LVERSION) – API version.
outcomeSetId (D2LID) – Identifier for the specific outcome set.
- Query Parameters:
assessableOnly (boolean) – Optional, default to false. If true, the response only includes alignments with assessable activities.
activeOnly (boolean) – Optional, default to false. If true, the response only includes org units that are active.
- Oauth2 Scopes:
outcomes:alignments:read
- Status Codes:
200 OK – Action successful.
403 Forbidden – No permission to view programs.
404 Not Found – No such outcome set found.
- API Versions:
1.93+ – Route first appears in LMS v20.26.4.
Return. This action retrieves a JSON array of
OutcomeAlignmentstructures.
- GET /d2l/api/le/(version)/lo/alignments/outcome/(outcomeId)¶
Retrieve the org units that contain alignments to a given outcome.
- Parameters:
version (D2LVERSION) – API version.
outcomeId (GUID) – Outcome ID.
- Query Parameters:
assessableOnly (boolean) – Optional, default to false. If true, the response only includes alignments with assessable activities.
activeOnly (boolean) – Optional, default to false. If true, the response only includes org units that are active.
- Oauth2 Scopes:
outcomes:alignments:read
- Status Codes:
200 OK – Action successful.
403 Forbidden – No permission to view programs.
- API Versions:
1.93+ – Route first appears in LMS v20.26.4.
Return. This action retrieves a JSON array of
OutcomeAlignmentstructures.
- GET /d2l/api/le/(version)/(orgUnitId)/lo/alignments/¶
Retrieve all the alignments in an org unit.
- Parameters:
version (D2LVERSION) – API version.
orgUnitId (D2LID) – Org unit ID.
- Query Parameters:
assessableOnly (boolean) – Optional. If true, the response only includes alignments with assessable activities.
- Oauth2 Scopes:
outcomes:alignments:read
- Status Codes:
200 OK – Action successful.
403 Forbidden – No permission to view alignments.
404 Not Found – The referenced org unit ID does not exist or belongs to different org.
- API Versions:
1.93+ – Route first appears in LMS v20.26.4.
Return. This action retrieves a JSON array of
BulkAlignmentstructures.
- GET /d2l/api/le/(version)/(orgUnitId)/lo/alignments/outcomeSet/(outcomeSetId)¶
Retrieve all the alignments to outcomes in an outcome set in an org unit.
- Parameters:
version (D2LVERSION) – API version.
orgUnitId (D2LID) – Org unit ID.
outcomeSetId (D2LID | 0) – Identifier for the specific outcome set (or 0 for the primary “My Learning Outcomes” outcome set).
- Query Parameters:
assessableOnly (boolean) – Optional. If true, the response only includes alignments with assessable activities.
- Oauth2 Scopes:
outcomes:alignments:read
- Status Codes:
200 OK – Action successful.
403 Forbidden – No permission to view alignments.
404 Not Found – The referenced org unit ID does not exist or belongs to different org.
- API Versions:
1.93+ – Route first appears in LMS v20.26.4.
Return. This action retrieves a JSON array of
BulkAlignmentstructures.
- GET /d2l/api/le/(version)/(orgUnitId)/lo/alignments/outcome/(outcomeId)¶
Retrieve all the alignments to a given outcome in an org unit.
- Parameters:
version (D2LVERSION) – API version.
orgUnitId (D2LID) – Org unit ID.
outcomeId (GUID) – Outcome ID.
- Query Parameters:
assessableOnly (boolean) – Optional. If true, the response only includes alignments with assessable activities.
- Oauth2 Scopes:
outcomes:alignments:read
- Status Codes:
200 OK – Action successful.
403 Forbidden – No permission to view alignments.
404 Not Found – The referenced org unit ID does not exist or belongs to different org.
- API Versions:
1.93+ – Route first appears in LMS v20.26.4.
Return. This action retrieves a JSON array of
BulkAlignmentstructures.
- GET /d2l/api/le/(version)/(orgUnitId)/lo/alignments/activity/(activityType)/(objectId)¶
Retrieve all the alignments to a given activity.
- Parameters:
version (D2LVERSION) – API version.
orgUnitId (D2LID) – Org unit ID.
activityType (ALIGNEDACTIVITYTYPE_T) – The type of activity.
objectId (D2LID | string) – The id of the activity.
- Query Parameters:
directOnly (boolean) – Optional. If true, the response only returns direct alignments.
- Oauth2 Scopes:
outcomes:alignments:read
- Status Codes:
200 OK – Action successful.
400 Bad Request – Bad Request (no such activity type).
403 Forbidden – Outcomes not enabled, or no permission to view alignments.
- API Versions:
1.93+ – Route first appears in LMS v20.26.4.
Input. The objectId parameter is in most cases a D2LID, except for when the activity is a rubric criterion. In the rubric criterion case, the objectId is a string made up of the rubricId and criterionId, structured like this: {rubricId}_R_{criterionId}.
Return. This action retrieves a JSON array of
Alignmentstructures.
- POST /d2l/api/le/(version)/(orgUnitId)/lo/alignments/activity/(activityType)/(objectId)¶
Modify the alignments to a given activity.
- Parameters:
version (D2LVERSION) – API version.
orgUnitId (D2LID) – Org unit ID.
activityType (ALIGNEDACTIVITYTYPE_T) – The type of activity.
objectId (string) – The id of the activity.
- JSON Parameters:
UpdateAlignment (
Outcomes.UpdateAlignment) – Updated alignments for activity.
- Oauth2 Scopes:
outcomes:alignments:manage
- Status Codes:
200 OK – Action successful.
400 Bad Request – Bad Request (no such activity type, empty or invalid request body, invalid action).
403 Forbidden – Outcomes not enabled, no permission to manage alignments, or a rubric is locked.
- API Versions:
1.93+ – Route first appears in LMS v20.26.4.
Input. You can use this action to add or remove direct alignments for an activity. The path objectId parameter will in most cases be a D2LID value, except when you want to update the alignments for a rubric criterion.
When using this action to update the alignments for a rubric criterion, the path ojbectId parameter has a special form, which specifies the rubric identifier and the criterion identifier in this way:
{rubricId}_R_{criterionId}
Note
You cannot use this action to modify the alignments of a locked rubric activity.
Return. Returns the new state of alignments on the activity as a JSON array of
Alignmentstructures.
Outcome Scales¶
- DELETE /d2l/api/le/(version)/lo/outcomeScales/(scaleId)¶
Delete a particular achievement scale.
- Parameters:
version (D2LVERSION) – API version.
scaleId (D2LID) – Identifier for the specific scale.
- Oauth2 Scopes:
outcomes:scales:manage
- Status Codes:
204 No Content – Action successful.
403 Forbidden – No permission to manage achievement scales.
404 Not Found – No such scale.
409 Conflict – Cannot be deleted because the scale is assigned to at least one outcome set.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions:
1.97+ – Route first appears in LMS v20.26.8.
- GET /d2l/api/le/(version)/lo/outcomeScales/¶
Retrieve all achievement scales defined for the organization.
- Parameters:
version (D2LVERSION) – API version.
- Oauth2 Scopes:
outcomes:scales:read
- Status Codes:
200 OK – Action successful.
403 Forbidden – No permission to view or manage achievement scales.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions:
1.97+ – Route first appears in LMS v20.26.8.
Return. This action retrieves a JSON array of
Scalestructures that enumerates all of the (non-deleted) achievement scales defined for the organization.
- GET /d2l/api/le/(version)/lo/outcomeScales/(scaleId)¶
Retrieve a specific achievement scale.
- Parameters:
version (D2LVERSION) – API version.
scaleId (D2LID) – Identifier for the specific scale.
- Oauth2 Scopes:
outcomes:scales:read
- Status Codes:
200 OK – Action successful.
403 Forbidden – No permission to view or manage achievement scales.
404 Not Found – No such scale.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions:
1.97+ – Route first appears in LMS v20.26.8.
Return. This action returns a
ScaleJSON block.
- POST /d2l/api/le/(version)/lo/outcomeScales/¶
Create a new achievement scale.
- Parameters:
version (D2LVERSION) – API version.
- JSON Parameters:
ScaleCreate (
Outcomes.ScaleCreate) – Achievement scale data.
- Oauth2 Scopes:
outcomes:scales:manage
- Status Codes:
201 Created – Action successful.
400 Bad Request – Invalid or missing name, invalid scale levels (too many or too few levels, duplicate level names, or invalid percent threshold values).
403 Forbidden – No permission to create achievement scales.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions:
1.97+ – Route first appears in LMS v20.26.8.
Return. This action returns a
ScaleJSON block.
- PUT /d2l/api/le/(version)/lo/outcomeScales/(scaleId)¶
Update the name or achievement threshold of a particular achievement scale.
- Parameters:
version (D2LVERSION) – API version.
scaleId (D2LID) – Identifier for the specific scale.
- JSON Parameters:
ScaleUpdate (
Outcomes.ScaleUpdate) – Achievement scale data to update.
- Oauth2 Scopes:
outcomes:scales:manage
- Status Codes:
200 OK – Action successful.
400 Bad Request – Invalid or missing name, or invalid achievement threshold level.
403 Forbidden – No permission to manage achievement scales.
404 Not Found – No such scale, or no such achievement threshold level.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions:
1.97+ – Route first appears in LMS v20.26.8.
Input. Note that if you provide an AchievementThresholdLevelId in your update data, you may not identify the first (lowest) level.
Return. This action returns a
ScaleJSON block.
- PUT /d2l/api/le/(version)/lo/outcomeScales/(scaleId)/(levelId)¶
Update the name or colour of a particular level of an achievement scale.
- Parameters:
version (D2LVERSION) – API version.
scaleId (D2LID) – Identifier for the specific scale.
levelId (D2LID) – Identifier for the specific level.
- JSON Parameters:
ScaleLevelUpdate (
Outcomes.ScaleLevelUpdate) – Achievement scale level data to update.
- Oauth2 Scopes:
outcomes:scales:manage
- Status Codes:
200 OK – Action successful.
400 Bad Request – Invalid name, or invalid colour value.
403 Forbidden – No permission to manage achievement scales.
404 Not Found – No such scale, or no such level in that scale.
409 Conflict – Another level in the scale already has the given name.
429 Too Many Requests – API call-rate limit exceeded.
- API Versions:
1.97+ – Route first appears in LMS v20.26.8.
Return. This action returns a
ScaleLevelJSON block.