- 7 Minutes to read
- Print
- DarkLight
API: updateRequirement
- 7 Minutes to read
- Print
- DarkLight
Description
The updateRequirement method edits a requirement.
Who Has Access
The following users have access to the updateRequirement method:
Users with the Manage Learning Plans, Certifications, and Requirements or View Learning Plans, Certifications, and Requirements account permission.
API Call XML Package
SmarterU>
<AccountAPI><![CDATA[]]></AccountAPI>
<UserAPI><![CDATA[]]></UserAPI>
<Method>updateRequirement</Method>
<Parameters>
<Requirement>
<Identifier>
<Name></Name>
- OR -
<ID></ID>
</Identifier>
<Name></Name>
<Status></Status>
<Description></Description>
<ReqExpires></ReqExpires>
<DaysGood></DaysGood>
<ExpirationDate></ExpirationDate>
<RecallDays></RecallDays>
<MetByDefault></MetByDefault>
<DaysMet></DaysMet>
<DaysMetWarning></DaysMetWarning>
<Blocks>
<Block>
<BlockID></BlockID>
<BlockSortOrder></BlockSortOrder>
<BlockAction></BlockAction>
<Items>
<Item>
<ItemAction></ItemAction>
<LearningModuleID></LearningModuleID>
<CredentialName></CredentialName>
<Type></Type>
<SelfEnroll></SelfEnroll>
<AutoEnroll></AutoEnroll>
<AutoEnrollIlt></AutoEnrollIlt>
<AutoEnrollOnFailure></AutoEnrollOnFailure>
<SortOrder></SortOrder>
</Item>
</Items>
</Block>
</Blocks>
</Requirement>
</Parameters>
</SmarterU>
Requirement Tag Group
The Requirement tag group is a container for the requirement's details.
<Requirement>
<Identifier>
<Name></Name>
- OR -
<ID></ID>
</Identifier>
<Name></Name>
<Status></Status>
<Description></Description>
<ReqExpires></ReqExpires>
<DaysGood></DaysGood>
<ExpirationDate></ExpirationDate>
<RecallDays></RecallDays>
<MetByDefault></MetByDefault>
<DaysMet></DaysMet>
<DaysMetWarning></DaysMetWarning>
<Blocks>
<Block>
<BlockID></BlockID>
<BlockSortOrder></BlockSortOrder>
<BlockAction></BlockAction>
<Items>
<Item>
<ItemAction></ItemAction>
<LearningModuleID></LearningModuleID>
<CredentialName></CredentialName>
<Type></Type>
<SelfEnroll></SelfEnroll>
<AutoEnroll></AutoEnroll>
<AutoEnrollIlt></AutoEnrollIlt>
<AutoEnrollOnFailure></AutoEnrollOnFailure>
<SortOrder></SortOrder>
</Item>
</Items>
</Block>
</Blocks>
</Requirement>
The Requirement tag may contain the following.
The Identifier tag contains the information for the requirement you want to update. The remaining tags in the Requirement tag group specify the updates to the requirement.
Identifier
The identifier of the requirement you want to update. This tag contains the following.
Tag | Description |
---|---|
Name | The requirement's name. This tag is mutually exclusive with the ID tag. |
ID | The requirement's system-generated identifier. This tag is mutually exclusive with the Name tag. This is the RequirementID returned by the getRequirement method. |
Name
The requirement's name.
Status
The requirement's status. Acceptable values are Active or Inactive.
Description
The requirement's description.
ReqExpires (optional)
Indicates whether the requirement expires. Acceptable values are:
- 0 - The requirement doesn't expire.
- 1 - The requirement expires.
If this tag is not provided, the tag's value will default to 1.
DaysGood (optional)
This is only used when ReqExpires tag is set to 1.
The number of days that the requirement is valid from the date that a user meets the requirement. If this tag is not provided, the tag's value defaults to 365.
ExpirationDate (optional)
This tag is only used when the ReqExpires tag is set to 1 and you want the requirement to expire on a specific date.
The date the requirement will expire in D-MMM format.
RecallDays (optional)
This is only used when ReqExpires tag is set to 1.
The number of days prior to the requirement's expiration that will cause the status to change to Warning. If this tag is not provided, the tag's value defaults to 90.
MetByDefault (optional)
Indicates whether the requirement is met by default. Acceptable values are:
- 0 - The requirement isn't met by default
- 1 - The requirement is met by default.
DaysMet (optional)
This tag is only used when MetByDefault is set to 1.
DaysMetWarning (optional)
This setting is only used when MetByDefault is set to 1.
Blocks (optional)
A container for the requirement's blocks. Refer to Blocks Tag Group.
Blocks Tag Group
The Blocks tag group is a container for the requirement's blocks.
<Blocks>
<Block>
<BlockSortOrder></BlockSortOrder>
<BlockAction></BlockAction>
<Items>
<Item>
<ItemAction></ItemAction>
<LearningModuleID></LearningModuleID>
<ItemName></ItemName>
<Type></Type>
<SelfEnroll></SelfEnroll>
<AutoEnroll></AutoEnroll>
<AutoEnrollIlt></AutoEnrollIlt>
<AutoEnrollOnFailure></AutoEnrollOnFailure>
<SortOrder></SortOrder>
</Item>
</Items>
</Block>
</Blocks>
Each block is contained in a Block tag and contains the following.
BlockSortOrder (optional)
The order that the block will be displayed.
BlockAction
Indicates the action you're taking on the requirement's block. Acceptable values are:
Add - You're adding the block to the requirement.
Remove - You're removing the block from the requirement.
Items
A container for the requirement block's courses and actions. Each course or action is contained in an Item tag and may contain the following.
Tag | Description |
---|---|
ItemAction | Indicates the action you're taking on the block's course or action. Acceptable values are:
|
LearningModuleID (optional) | This setting is only used when Type is set to 1. This tag is only used when Type is set to 1. The course's system-generated identifier. This is the LearningModuleID returned by the listLearningModules method. |
ItemName (optional) | The course or action's name. |
Type (optional) | Indicates whether the item is a course or an action. Acceptable values are:
|
SelfEnroll (optional) | This setting is only used when Type is set to 1. This tag is only used when Type is set to 1. Indicates whether the course's Self-Enroll setting is enabled. Acceptable values are:
|
AutoEnroll (optional) | Indicates whether the course's Auto-Enroll setting is enabled (i.e., 0 = disabled; 1 = enabled). Refer to API: Requirement's Course Auto-Enroll Settings for details. |
AutoEnrollILT (optional) | Indicates the Auto-Enroll setting for an instructor-led course. Refer to API: Requirement's Course Auto-Enroll Settings for details. |
AutoEnrollOnFailure (optional) | Indicates whether learners are re-enrolled if they fail the course. Refer to API: Requirement's Course Auto-Enroll Settings for details. |
SortOrder (optional) | The course or action's position in the block. |
API Response XML Package
The API response XML package will always include a Result, Info, and Errors tag.
<SmarterU>
<Result></Result>
<Info>
<Requirement><![CDATA[]]></Requirement>
<RequirementID><![CDATA[]]></RequirementID>
</Info>
<Errors>
<Error>
<ErrorID></ErrorID>
<ErrorMessage></ErrorMessage>
</Error>
</Errors>
</SmarterU>
The response may also contain the following.
Requirement
The requirement's name.
RequirementID
The requirement's system-generated identifier.
Example API Response XML Package
Below is an example of an API response XML package.
<SmarterU>
<Result>Success</Result>
<Info>
<Requirement><![CDATA[Conflict Resolution]]></Requirement>
<RequirementID><![CDATA[26055]]></RequirementID>
</Info>
<Errors>
</Errors>
</SmarterU>
Error Codes
Error Code | Message |
---|---|
UR:01 | The identifier provided is invalid. |
UR:02 | The name provided is invalid. |
UR:03 | The ID provided is invalid. |
UR:04 | The status provided is invalid. |
UR:05 | The description provided is invalid. |
UR:06 | The requirement expires is invalid. |
UR:07 | The days good provided is invalid. |
UR:08 | The recall days provided is invalid. |
UR:09 | The met by default provided is invalid. |
UR:10 | The days met count provided is invalid. |
UR:11 | The days met warning provided is invalid. |
UR:12 | The credential name provided is invalid. |
UR:13 | The type provided is invalid. |
UR:14 | The self enroll provided is invalid. |
UR:15 | The auto enroll provided is invalid. |
UR:16 | The auto enroll ILT provided is invalid. |
UR:17 | The auto enroll on failure provided is invalid. |
UR:18 | The sort order provided is invalid. |
UR:19 | The blocks provided is invalid. |
UR:20 | The block provided is invalid. |
UR:21 | The block id provided is invalid. |
UR:22 | The block sort order provided is invalid. |
UR:23 | The item is invalid. |
UR:24 | The items provided is invalid. |
UR:25 | The item action provided is invalid. |
UR:26 | The learning module id provided is invalid. |
UR:27 | The required permissions are not met to call the createRequirement method. |
UR:28 | The requested requirement does not exist. |
UR:29 | The status provided is not valid. Only ACTIVE or INACTIVE are allowed values. |
UR:30 | Block ID is invalid. |
UR:31 | Incorrect/Missing Structure/Parameters. Credential name is required for actions. |
UR:32 | One or more of the action names provided are not valid. |
UR:33 | Incorrect/Missing Structure/Parameters. Learning module ID is required for courses. |
UR:34 | One or more of the courses provided are not valid. |
UR:35 | The requirement action provided is not valid. Only ADD or REMOVE are allowed values. |
UR:36 | Requirement name cannot be used. |
UR:37 | The required permissions are not met to call the createRequirement method. |
UR:38 | Days good should be greater than recall days. |
UR:39 | Days met should be greater than days met warning. |
UR:40 | Days good should be greater than days met. |
UR:41 | Learning Module provided was not found on this Block. |
UR:42 | Action provided was not found on this Block. |
UR:43 | Block provided was not found on this Requirement. |
UR:47 | Type provided is invalid. Type must be 1 or 2. |
UR:48 | Either DaysGood or ExpirationDate can be provided. |