Halaman ini belum tersedia dalam bahasa lokal Anda. Kami berusaha keras untuk menambahkan lebih banyak versi bahasa. Terima kasih atas dukungan Anda.
Creating a Batch Task
Function
Create a batch task.
URI
POST /koodrive/ose/v1/jobs
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Authorization |
Yes |
String |
Access token. Token authentication is used to call KooDrive APIs. A token indicates the permission. When an API is called, the token is added to the request header to obtain the operation permission. For details about how to obtain an access token, see the corresponding developer guide. The format is Bearer+{access_token}. |
X-User-Id |
Yes |
String |
User ID, which is used for app authentication. |
X-Date |
Yes |
String |
Date, which is used for app authentication. |
Host |
Yes |
String |
Address, which is used for app authentication. |
X-Traceid |
No |
String |
Message log trace ID. The value contains 58 bits. |
language |
No |
String |
Language code, which complies with the internationalization specifications. For example, en-US indicates English (United States). English (United States) is used by default. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
taskType |
Yes |
Integer |
Task type.
|
actionType |
No |
Integer |
Operation type, which is a subdivision of taskType. This parameter is used only when taskType is set to 1, 2, or 3.
|
taskInfo |
Yes |
CreateTaskInfoReq object |
Request for creating a batch task. |
dstContainerId |
Yes |
String |
Target space ID. |
password |
No |
String |
Compressed package password. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
fileInfo |
Yes |
Array of fileInfo objects |
File/Directory ID (optional when taskType is set to 7). |
newFilePath |
No |
String |
New path of the file (optional when taskType is set to 7). |
srcContainerId |
Yes |
String |
Source space ID. |
uncompressFilePaths |
No |
Array of strings |
List of full paths of partially decompressed files in the compressed package. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
fileId |
No |
String |
File ID (optional for recycle bin clearance). |
filePath |
No |
String |
Full path of the file, including the file ID. (This parameter is mandatory for logical deletion, that is, moving the file to the recycle bin, which affects the restoration function.) |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
code |
String |
Error code. |
msg |
String |
Error message. |
data |
String |
Task ID. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
code |
String |
Response code. |
msg |
String |
Response description. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
code |
String |
Response code. |
msg |
String |
Response description. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
code |
String |
Response code. |
msg |
String |
Response description. |
Example Requests
Request for copying files.
POST /koodrive/ose/v1/jobs Authorization:Bearer+10f88d07fa************44791e9ff { "taskType":1 , "actionType":101 , "dstContainerId": "IAADfsBFCO6WtAtuA315074383680425b8aa9a130cba2d4" , "taskInfo": { "srcContainerId": "IAADfsBFCO6WtAtuA315074383680425b8aa9a130cba2d4", "newFilePath": "Fm9UdqBNTAQDos6l1xPlFnIqXJg2-UdqA" , "fileInfo": [ { "fileId": "FuZmQ66CF0DdpKRG1Y29Iwajbq04Nhwu3" } ] } }
Example Responses
Status code: 200
Basic response. Only the error code and error information are returned.
{ "data": "1309243162258308352" "code": 0, "msg": "success" }
Status Codes
Status Code |
Description |
---|---|
200 |
Basic response. Only the error code and error information are returned. |
400 |
Bad Request |
401 |
Unauthorized |
500 |
Internal Server Error |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot