This document will help us to implement the activity dash board for groups
Background
As per ticket https://project-sunbird.atlassian.net/browse/SB-24420 we need to show the activity dashboard to the admin of the group
Get aggregation
curl 'https://staging.sunbirded.org/learner/data/v1/group/activity/agg' \ -H 'Connection: keep-alive' \ -H 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="90", "Google Chrome";v="90"' \ -H 'X-App-Id: staging.sunbird.portal' \ -H 'DNT: 1' \ -H 'sec-ch-ua-mobile: ?0' \ -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36' \ -H 'Content-Type: application/json' \ -H 'Access-Control-Allow-Origin: *' \ -H 'Accept: application/json' \ -H 'X-Device-Id: eea96dca94869bbf9766a43fcb0069c2' \ -H 'Origin: https://staging.sunbirded.org' \ -H 'Sec-Fetch-Site: same-origin' \ -H 'Sec-Fetch-Mode: cors' \ -H 'Sec-Fetch-Dest: empty' \ -H 'Referer: https://staging.sunbirded.org/my-groups/group-details/b85d488d-637a-484d-9c2c-405d565dca55/activity-details/do_2129767578773995521545?primaryCategory=Course&title=Course&mimeType=application%2Fvnd.ekstep.content-collection&groupId=b85d488d-637a-484d-9c2c-405d565dca55' \ -H 'Accept-Language: en-GB,en;q=0.9,en-US;q=0.8,kn;q=0.7' \ -H 'Cookie: _csrf=ha7i-tW36z3e9ZTDEUcub85V; connect.sid=s%3AJ_VGAh-2dK4pw4RnqrZeACi5FwqFR0ji.WPDINTnQmAQ7DNSUMtgD7yFmjqjiDmWwVIWfkmnw3V4' \ --data-raw '{"request":{"groupId":"b85d488d-637a-484d-9c2c-405d565dca55","activityId":"do_2129767578773995521545","activityType":"Course"}}' \ --compressed
Response
{ "id": "api.group.activity.agg", "ver": "v1", "ts": "2021-05-17 04:08:40:926+0000", "params": { "resmsgid": null, "msgid": "a6a78ec6-7005-4089-b125-c32088ca4382", "err": null, "status": "success", "errmsg": null }, "responseCode": "OK", "result": { "activity": { "id": "do_2129767578773995521545", "type": "Course", "agg": [ { "metric": "enrolmentCount", "lastUpdatedOn": 1620813324281, "value": 2 } ] }, "groupId": "b85d488d-637a-484d-9c2c-405d565dca55", "members": [ { "agg": [ { "metric": "completedCount", "value": 2, "lastUpdatedOn": 1620813324281 }, { "metric": "score:do_2129493337594429441162", "value": 1, "lastUpdatedOn": 1620642987500 } ], "name": "Balakrishna M", "role": "member", "status": "active", "createdBy": "9d079666-ac84-41e7-bed1-343744548f90", "userId": "56bdaa45-0b81-4d46-81b3-a820b150ff63" }, { "agg": [ { "metric": "completedCount", "value": 2, "lastUpdatedOn": 1620813324224 }, { "metric": "score:do_2129493337594429441162", "value": 2, "lastUpdatedOn": 1620641871592 } ], "name": "Balakrishna M", "role": "admin", "status": "active", "createdBy": "9d079666-ac84-41e7-bed1-343744548f90", "userId": "9d079666-ac84-41e7-bed1-343744548f90" } ] } }