...
Authorisation: //Authorisation key
Content-Type: application/json'
X-Channel-Id: //Channel for which dialcode are getting generated'
Request Body
Wiki Markupcode |
---|
{ "id": "ekstep.learning.content.dialcode.reserve", "ver": "3.0", "ts": "YYYY-MM-DDThh:mm:ssZ+/-nn.nn", "params": { "did": "", // device UUID from which API is called "key": "", // API key (dynamic) "msgid": "" // unique request message id, UUID }, "request": { "contentdialcode": { "dialcodeCountcount": 10, // The total number of dialcodes to be reserved for the content. It should not more than 250. (count-already_reserved_dialcodes) should be the number of dialcodes that has to be generated and appended to the reservedDialcodes list. "publisher": "NCERTPUBLISHER", // Publisher of the dialcodes } } } |
Validation Logic:
- If the content does not have any reserved dialcode, dialcode Dialcode will be generated using autogenerated batch code, else existing dialcode's batchcode will be usedcontent Id as batchCode.
- Content should belong to same channel.
- Content should be of Type Textbook, Collection, LessonPlan, Course.
- Publisher should be validated.
- Total number of reserved dialcodes request should not be more than 250.
- The existing reservedDialcode value should be subtracted from the count value - for generating new dialcode and appending to the reservedDialcode list.
- If the content already have list of reserved dialcodes, the new dialcodes should be appended.
- If the requested dialcode count is less or equal to the already reserved dialcode list, it should throw client exception with list of already reserved dialcodes list.
Release Dialcode API:
...
PATCH - content/v3/dialcode/release/{content_id}
Request Header:
Authorisation: //Authorisation key
Content-Type: application/json'
Request Body
Wiki Markup |
---|
Code Block |
{ "did": "", // device UUID from which API is called "key": "", // API key (dynamic) "msgid": "" // unique request message id, UUID }, "request": { "content": { "dialcodeCount": 5 } } } |
Validation Logic:
- release dialCodes count should not be greater than the difference of reserved dialcodes and total used dialcodesContent should belong to same channel.
- Content should be of Type Textbook, Collection, LessonPlan, Course
- If all the reserved dialcodes are utilised. It will throw exception.
- If there is not dialcode reserved for the content, it will throw exception.
- API should release all the the unused dialcodes (not used in any of the children of the textbook)