Attributes¶
- 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> }, ... ] }
- OutcomeSetId
An ID for the outcome set. This ID is unique for organization level outcome sets. For org unit level outcome sets, the primary “My Learning Outcomes” outcome set has an ID of 0, and any imported outcome sets share an ID with the organization level outcome sets they were imported from.
- 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.
- 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
The ID of 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
The URI of 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.
- Outcomes.OutcomeSetCreate¶
When creating an organization level outcome set, use a structure like this:
{ "Name": <string> }
- Name
The display name to assign to the created outcome set. Maximum of 256 characters.
- 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
The URI of 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.
Actions¶
Organization Level Outcome Sets¶
- DELETE /d2l/api/le/(version)/lo/outcomeSets/(outcomeSetId)¶
Delete a particular organization level outcome set.
- Parameters:
version (D2LID) – API version.
outcomeSetId – 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 (D2LID) – API version.
outcomeSetId – 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.
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 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 (D2LID) – API version.
outcomeSetId – 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 or empty name.
403 Forbidden – No permission to manage organization level outcome sets.
404 Not Found – No such outcome set.
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.
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:
- 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:
- Oauth2 Scopes:
outcomes:sets:manage
- Status Codes:
200 OK – Action successful.
400 Bad Request – Invalid or missing update structure.
403 Forbidden – No permission to manage outcome sets.
404 Not Found – No such outcome set or org unit.
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. 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.
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
ImportExportOutcomestructures.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:
200 OK – Action successful.
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
ImportExportOutcomeblocks 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.
Return. This action retrieves a JSON array of
ImportExportOutcomestructures.
- 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
ImportExportOutcomestructures.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:
200 OK – Action successful.
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
ImportExportOutcomeblocks 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.
Return. This action retrieves a JSON array of
ImportExportOutcomestructures.