Publish Activity
This is a general LMS interface for publishing any type of activity.
Note:
- All types of activities (classrooms, assignments, tests, answer sheets, recurring assignments, discussions, etc.) can be published using this interface.
- This interface only supports changing the status from draft to published; reversing the operation is not allowed.
URL
https://root_url/lms/activity/release
HTTP Request Methods
Request Data
Key |
Required |
Type |
Description |
X-EEO-SIGN |
Yes |
string |
Signature; see the rules here |
X-EEO-UID |
Yes |
string |
Institution's SID |
X-EEO-TS |
Yes |
string |
Timestamp |
Body Parameters
key |
Required |
Type |
Description |
Rules Description |
courseId |
Yes |
integer |
Class (Course) ID |
|
activityIds |
Yes |
array[integer] |
Collection of Activity IDs |
Response Data
Response Parameters
Parameter Name |
Type |
Example Value |
Description |
code |
integer |
1 |
Error code |
msg |
string |
"Execution successful" |
Error message |
data |
array |
[] |
Response array |
└ |
object |
|
Response object |
└ activityId |
integer |
25096096 |
Activity ID |
└ name |
string |
"API Published Activity" |
Activity name |
Example
POST /lms/activity/release HTTP/1.1
root_url
fe19eb3a5b721c7b66194e4a29ee8ead
409864
1722938255
application/json
84
{
"courseId": 414193,
"activityId": 25096096
}
- Shell cURL analog request instruction
curl -X POST \
-H 'Host: root_url' \
-H 'X-EEO-SIGN: fe19eb3a5b721c7b66194e4a29ee8ead' \
-H 'X-EEO-UID: 409864' \
-H 'X-EEO-TS: 1722938255' \
-H 'Content-Type: application/json' \
-d '{"courseId": 414193, "activityId": 25096096}' \
'https://root_url/lms/activity/release'
Response sample(The normal return json packet example)
{
"code": 1,
"msg": "Execution successful",
"data": {
"activityId": 25096096,
"name": "API Published Activity"
}
}
Error Code Descriptions
Error Code |
Description |
147 |
No information for this class |
29149 |
Activity has been deleted |
29184 |
Activity has been published |
30002 |
Activity does not exist |
21601030 |
Missing required parameters |
101001001 |
Parameter error |
101002005 |
Signature exception |
101002006 |
Timestamp expired |
101002008 |
Timestamp does not exist |
110100065 |
Unlock conditions for the activity have drafts |
121601020 |
Business parameter error |
121601021 |
Class does not belong to your institution |
121601022 |
It is not a standard class |
121601023 |
This class has been dissolved and cannot be operated |