Chỉnh sửa tag trường học

Mục lục

API yêu cầu truyền các tham số SID, safeKey, timeStamp, labelID và tên tag

URL

https://api.eeo.cn/partner/api/course.api.php?action=updateSchoolLabel

HTTP Request Methods

  • POST

Coding Format

  • UTF-8

Request Data

Key Bắt buộc Yêu cầu thêm Mô tả Hướng dẫn
SID Bắt buộc ID của trường Xem dữ liệu này tại Trang quản lý classin.com trong mục API
safeKey Bắt buộc Fixed 32-bit all lowercase characters Khóa bảo mật xác thực trường học safeKey=MD5(SECRET+timeStamp)
timeStamp Bắt buộc Theo Unix Epoch timestamp & có hiệu lực trong vòng 20 phút Thời gian UNIX Epoch là số giây đã trôi qua kể từ 00:00:00 (giờ chuẩn quốc tế) vào ngày 1 tháng 1 năm 1970
labelId Bắt buộc Label ID
labelName Bắt buộc 1-20 tự,hệ thống sẽ tự động cắt khi nhiều hơn 20 ký tự tên tag

Response Parameters

Key Định dạng Phản hồi Ý nghĩa
error_info object   Return message object
└ errno number 1 mã lỗi
└ error string “Normal execution” chi tiết lỗi

Sample

  • HTTP Request
POST /partner/api/course.api.php?action=updateSchoolLabel HTTP/1.1
Host: www.eeo.cn
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache

SID=2339736&safeKey=e98b01228fca036bf2ab060f7a8a6ec3&timeStamp=1493725870&labelId=363&labelName=语文
  • Shell cURL analog request instruction
curl -H "Content-Type: application/x-www-form-urlencoded" -X "POST" \
      -d "SID=1234567" \
      -d "safeKey=0f7781b3033527a8cc2b1abbf45a5fd2" \
      -d "timeStamp=1484719085" \
      -d "labelId=363" \
      -d "labelName=语文" \
      "https://api.eeo.cn/partner/api/course.api.php?action=updateSchoolLabel"

Response Sample(The normal return json packet example)

{
    "error_info": {
        "errno": 1,
        "error": "程序正常执行"
    }
}

Error Code Description

Error Code Description
1 Thành công
100 Parameters sai định dạng hoặc không hoàn chỉnh
102 Không có quyền thao tác (Xác thực bảo mật thất bại)
104 Thao tác thất bại
353 Tag đã tồn tại (trả về kèm với dữ liệu labelID)
355 Tag này không thuộc dữ liệu của trường
356 Tag ID này không tồn tại