Lấy ID thư mục gốc

Mục lục

Để lấy ID thư mục gốc, cần truyền các tham số SID, timeStamp và safekey

Get the top-level folder ID, require SID, safekey, timeStamp

URL

https://api.eeo.cn/partner/api/cloud.api.php?action=getTopFolderId

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

Response data

Key Định dạng Phản hồi Ý nghĩa
data string 123456 Trả về ID thư mục gốc
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/cloud.api.php?action=getTopFolderId HTTP/1.1
Host: www.eeo.cn
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache

SID=2339736&safeKey=479aeb917dfb34ff1bf6660a1a5f016c&timeStamp=1493798334
  • 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" \
      "https://api.eeo.cn/partner/api/cloud.api.php?action=getTopFolderId"

Response sample(The normal return json packet example)

{
  "data": "123456",
  "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)
106 Không có dữ liệu