Thay đổi tên tệp tin

Mục lục

Để đổi tên tệp cần truyền các tham số SID, safekey, timeStamp, ID tệp, tên tệp

Rename file,you need to provide SID, safekey, timeStamp, file ID, file name, and return to execution

URL #

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

HTTP Request Methods #

  • POST

Coding format #

  • UTF-8
 

Request data #

KeyBắt buộcYêu cầu thêmMô tảHướng dẫn
SIDBắt buộcNullSchool IDXem dữ liệu này tại Trang quản lý classin.com trong mục API
safeKeyBắt buộcFixed 32-bit all lowercase charactersSchool authentication security keysafeKey=MD5(SECRET+timeStamp)
timeStampBắt buộcNullTheo Unix Epoch timestamp & có hiệu lực trong vòng 20 phútThờ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
fileIdYesNullID tệp tin
fileNameYesTối đa 32 ký tựTên tệp tin



Response data #

KeyĐịnh dạngPhản hồiÝ nghĩa
error_infoobject Return message object
└ errnonumber1Mã lỗi
└ errorstring“Normal execution”Chi tiết lỗi

Sample #

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

SID=2339736&safeKey=0c6e5da6021a3c83f11645be11768576&timeStamp=1493372758&fileId=&fileName=
  • 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 "fileId=123456" \
      -d "fileName=课件2017" \
      "https://api.eeo.cn/partner/api/cloud.api.php?action=renameFile"

Response sample(The normal return json packet example) #

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

Error Code Description #

Error CodeDescription
1Thành công
100Parameters sai định dạng hoặc không hoàn chỉnh
102Không có quyền thao tác (Xác thực bảo mật thất bại)
104Không có quyền thao tác (Xác thực bảo mật thất bại)
198Tệp không tồn tại
199Tệp tin không thuộc trường (Không có quyền thao tác)
200Đã tồn tại tệp tin có tên tương tự