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

  • POST

coding Format

  • UTF-8

Request Data

Header Parameters

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

  • HTTP Request
POST /lms/activity/release HTTP/1.1
Host: root_url
X-EEO-SIGN: fe19eb3a5b721c7b66194e4a29ee8ead
X-EEO-UID: 409864
X-EEO-TS: 1722938255
Content-Type: application/json
Content-Length: 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

results matching ""

    No results matching ""