Delete Unit
Note:
- This interface will also delete all learning activities associated with the unit, so please proceed with caution.
- If you wish to keep the activities associated with the unit, please first use the Move Activities to Another Unit Interface to relocate them.
URL
https://root_url/lms/unit/delete
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 |
ID of the class to which the unit belongs |
| unitId |
Yes |
string |
Unit ID |
Response Data
| Parameter Name |
Type |
Example Value |
Description |
| code |
integer |
1 |
Error code |
| msg |
string |
"Execution successful" |
Error message |
| data |
array |
[] |
Reponse array |
| └ |
object |
|
Reponse object |
| └ unitId |
integer |
26020898 |
Unit ID |
Example
POST /lms/unit/delete HTTP/1.1
root_url
389454122008cbec73371037e5ce9e91
409864
1722938125
application/json
80
{
"courseId": 414193,
"unitId": 26020898
}
- Shell cURL analog request instruction
curl -X POST \
-H 'Host: root_url' \
-H 'X-EEO-SIGN: 389454122008cbec73371037e5ce9e91' \
-H 'X-EEO-UID: 409864' \
-H 'X-EEO-TS: 1722938125' \
-H 'Content-Type: application/json' \
-d '{"courseId": 414193, "unitId": 26020898}' \
'https://root_url/lms/unit/delete'
Response sample(The normal return json packet example)
{
"code": 1,
"msg": "Execution successful",
"data": {
"unitId": 26020898
}
}
Error Code Descriptions
| Error Code |
Description |
| 147 |
No information for this class |
| 29057 |
This institution has outstanding fees |
| 29060 |
The status of this institution is abnormal |
| 40001 |
Cannot delete the classroom activities that are ongoing or have ended |
| 40020 |
The unit does not exist |
| 101001001 |
Parameter error |
| 101002005 |
Signature exception |
| 101002006 |
Timestamp expired |
| 101002008 |
Timestamp does not exist |
| 121601020 |
Business parameter error |
| 121601021 |
Class does not belong to your institution |
| 121601022 |
This is not a standard class |
| 121601023 |
This class has been dissolved and cannot be operated |