Move Activities to Another Unit
This interface is used to move all activities from Unit A to Unit B.
Note:
- If you want to keep the learning activities associated with the unit that is to be deleted, you can use this interface to relocate these learning activities.
- This interface can also be used in scenarios where units need to be merged.
URL
https://root_url/lms/unit/move
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 |
integer |
Source Unit ID |
ID of the unit to which the activities currently belong |
toUnitId |
Yes |
integer |
Target Unit ID |
Response Data
Parameter Name |
Type |
Example Value |
Description |
code |
integer |
1 |
Error code |
msg |
string |
"Execution successful" |
Error message |
data |
integer |
null |
Reponse data |
Example
POST /lms/unit/move HTTP/1.1
root_url
3184c79587741b9f767db68eb50998a3
409864
1722937990
application/json
102
{
"courseId": 414193,
"unitId": 26020700,
"toUnitId": 26020897
}
- Shell cURL analog request instruction
curl -X POST \
-H 'Host: root_url' \
-H 'X-EEO-SIGN: 3184c79587741b9f767db68eb50998a3' \
-H 'X-EEO-UID: 409864' \
-H 'X-EEO-TS: 1722937990' \
-H 'Content-Type: application/json' \
-d '{"courseId": 414193, "unitId": 26020700, "toUnitId": 26020897}' \
'https://root_url/lms/unit/move'
Response sample(The normal return json packet example)
{
"code": 1,
"msg": "Execution successful",
"data": null
}
Error Code Descriptions
Error Code |
Description |
147 |
No information for this class |
29046 |
The current unit is the same as the target unit |
29048 |
Unit does not exist |
29050 |
Failed to move to another unit |
29138 |
The number of learning activities in the target unit exceeds the allowed limit. |
29203 |
Failed to delete unit |
50004 |
Target 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 |
It is not a standard class |
121601023 |
This class has been dissolved and cannot be operated |
121601030 |
Missing required parameters |