Rename file
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
Request data
key |
Required |
More Restrictions |
Instructions |
Description |
SID |
Yes |
Null |
School ID |
It is available through the eeo.cn application |
safeKey |
Yes |
Fixed 32-bit all lowercase characters |
School authentication security key |
safeKey=MD5(SECRET+timeStamp) |
timeStamp |
Yes |
Null |
imestamp used by safeKey |
Unix Epoch timeStamp is the number of seconds passed by 00:00 (world standard time) on January 1, 1970 |
fileId |
Yes |
Null |
file ID |
Null |
fileName |
Yes |
32 characters |
file name |
Null |
Response data
key |
Type |
Sample value |
meaning |
error_info |
object |
|
Return message object |
└ errno |
number |
1 |
The error code |
└ error |
string |
"Normal execution" |
Error list |
Sample
POST /partner/api/cloud.api.php?action=renameFile HTTP/1.1
www.eeo.cn
application/x-www-form-urlencoded
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 Code |
Description |
1 |
Successful execution. |
100 |
Incomplete or incorrect parameters. |
102 |
No permissions(Security verification failed). |
104 |
Operation failed (unknown error). |
198 |
The file does not exist. |
199 |
The file does not belong to this instruction(unauthorized operation). |
200 |
A file with the same name already exists. |