Chỉnh sửa thông tin Học viên (Edit Student Information)

Mục lục

  1. editSchoolStudent được gọi để chỉnh sửa tên của học sinh. Lệnh gọi API yêu cầu các tham số SID, safeKey, timeStamp, UID và tên học sinh.
  2. Lệnh gọi chỉ thay đổi phần tên hiển thị trong danh sách Quản lý học sinh tại Trang quản lý trường classin.com. Phân biệt danh (nickname) hiển thị tại giao diện app ClassIn sẽ không bị ảnh hưởng hay thay đổi. API này không được dùng để chỉnh sửa tên Giáo viên.
  1. The editSchoolStudent interface is to edit students’ names. The API call requires SID, safeKey, timeStamp, UID and student name, and returns an instruction after execution.
  2. The interface only changes students’ names displayed on the management console on classin.com. It does not modify users nicknames displayed in the ClassIn app. For users also in teacher identity, the API call does not edit teacher names.

URL

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

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
studentUid Bắt buộc studentUid UID hệ thống trả về khi đăng ký tài khoản thành công
studentName Bắt buộc 1-24 ký tự, nếu vượt quá 24 ký tự thì hệ thống sẽ tự động cắt ngắn Tên học sinh sẽ được hiển thị trong trang quản lý học sinh tại classin.com

Response data

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” Thông tin lỗi

Sample

  • HTTP request
POST /partner/api/course.api.php?action=editSchoolStudent HTTP/1.1
Host: root_url
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache

SID=2339736&safeKey=51cf7854e932de0df9f37fa7dcbf463c&timeStamp=1492871773&studentUid=16615&studentName=dan
  • 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 "studentUid=14165" \
    -d "studentName=dan" \
    "https://api.eeo.cn/partner/api/course.api.php?action=editSchoolStudent"

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
228 Học sinh này không có trong danh sách học sinh của trường