Working with Adaptive Release
Published: Not Available
Last Update: Not Available
Using Bb Learn 3900.34.0-rel.24+41a9160
Ultra courses
First we need to see how this is displayed in the GUI, the release criteria or Release conditions is set when clicking under the button that usually says "Visible to students"

When clicked, this displays several conditions:

For all members, you can use additional conditions such as Date/Time and Performance, this also allows you to pick when will the content appear:

It is also possible to release the content to specific members of the course or groups.
Note: We are aware that there is a known issue where, if you just enrolled a user (and haven't reloaded the page) the roster is not updated on adaptive release -> Specific memebers or groups -> Individual members and search for the user that has just been enrolled, the user does not show up, groups are correctly updated. To solve this, you can just reload the page and roster will be updated.
Now let's move on to the REST API part
Rules (C.R.U.D)
First thing is first!
A rule must be born.
Yes, we need to create a rule that will contain our criteria (We assume the course and content has already been created), all rules depend on content, you need to create first content, then the rule, then criteria(optional) and define who will receive these rules.
For specific messages that may be returned by the api, please review: https://developer.anthology.com/portal/displayApi
Also, please make sure to always review the entitlements required for each endpoint, you can check this document How to map entitlements with privileges to get more information about entitlements.
For the rules you need course_id and Content_id

You can create 1 rule per content_id!
Creating a Rule
To create a rule on a specific content id:
GET {{baseUrl}}/learn/api/public/v1/courses/:courseId/contents/:contentId/adaptiveRelease/rules
And in the body:
{
"title": "New rules"
}
Returning a Rule
To obtain the rule that exist on a specific content id:
GET {{baseUrl}}/learn/api/public/v1/courses/:courseId/contents/:contentId/adaptiveRelease/rules
Updating a Rule
To update a rule you can use (you need to know the rule id first):
PATCH {{baseUrl}}/learn/api/public/v1/courses/:courseId/contents/:contentId/adaptiveRelease/rules/:ruleId
and in the body:
{
"title": "New rules"
}
If everything goes well, you should see a 201:
{
"id": "_349_1",
"title": "New rules"
}
if you see a 409 conflict:
{
"status": 409,
"message": "A rule already exists for content [_121047_1]"
}
Means the rule already exists, as I mentioned, one contentID can only have one rule.