Creating a Task (Old Edition)
Function
This API is used to create a task on the old UI.
URI
POST /v1/{project_id}/tasks
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID. Minimum: 0 Maximum: 64 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Name. Minimum: 1 Maximum: 42 |
project_id |
Yes |
Integer |
Project ID. Minimum: 0 Maximum: 2147483647 |
temps |
No |
Array of strings |
Transaction information. Array Length: 0 - 1024 |
operate_mode |
No |
Integer |
Pressure phase mode (0: by duration; 1: by count; 2: both). Minimum: 0 Maximum: 2147483647 |
bench_concurrent |
No |
Integer |
Benchmark concurrency. Minimum: 0 Maximum: 2147483647 |
Response Parameters
Status code: 201
Parameter |
Type |
Description |
---|---|---|
code |
String |
Response code. Minimum: 0 Maximum: 1024 |
message |
String |
Response message. Minimum: 0 Maximum: 1024 |
task_id |
Integer |
Task ID. Minimum: 0 Maximum: 2147483647 |
Example Requests
Creating a task named task. The ID of the PerfTest project to which the task belongs is 1.
/v1/{project_id}/tasks { "name" : "task", "project_id" : 1, "temps" : [ ], "operate_mode" : 2, "bench_concurrent" : 100 }
Example Responses
Status code: 201
success
{ "code" : "SVCSTG.CPTS.0000000", "message" : "success", "task_id" : 184138 }
Status Codes
Status Code |
Description |
---|---|
201 |
success |
501 |
unknown error |
Error Codes
See Error Codes.
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