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-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. |
newFilePath |
No |
String |
New file path. |
srcContainerId |
Yes |
String |
Source space ID. |
uncompressFilePaths |
No |
Array of strings |
List of full paths of partially decompressed files in the compressed package. |
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