...
Code Block | ||||
---|---|---|---|---|
| ||||
{"request":{"filters":{ "courseId" : ["do_112634552998936576175","do_112634535631675392173","do_112633845274157056122"],"status":["0","1"],"enrollmentType":"open"}, "sort_by":{"createdDate":"desc"} } } |
Pros | Cons |
---|---|
|
|
Proposed Solution 3:
Sunbird will expose a new api to get open batch count for list of courseIds. New api details will be as follows:
Wiki Markup |
---|
URI: v1/course/batch/count
Methods: POST
Request body:
{
"request": {
"filters":{
"courseId":["courseId-1","courseId-2"],
"status":["0","1"],
"enrollmentType":"open"
}
}
}
----
Response:
{
"id": "api.course.batch.count",
"ver": "v1",
"ts": "2018-11-20 17:53:00:716+0000",
"params": {
"resmsgid": null,
"msgid": "8e27cbf5-e299-43b0-bca7-8347f7e5abcf",
"err": null,
"status": "success",
"errmsg": null
},
"responseCode": "OK",
"result": {
"response": {
"count": 8,
"content": [
{
"courseId": "do_2126299478299033601672",
"openBatchCount":2,
"inviteOnlyBatchCount":0
},
{
"courseId": "do_2126299478299033601672",
"openBatchCount":2,
"inviteOnlyBatchCount":0
}
]
}
}
} |