Creating a Plan in a Project
Function
Create a plan in a project.
URI
POST /v1/projects/{project_id}/plans
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Unique ID of a project. The value is a string of 32 characters. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. Call IAM to obtain the user token (value of X-Subject-Token in the response header). |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
assigned_id |
No |
String |
Processor ID. If this parameter is left blank, the current user is used by default. |
name |
Yes |
String |
Plan name |
plan_cycle |
Yes |
PlanCycle object |
Plan period |
service_id_list |
Yes |
Array of integers |
Case types contained in the plan. The array length is less than 10. |
Response Parameters
Status code: 201
Parameter |
Type |
Description |
---|---|---|
plan_id |
String |
Plan ID returned after the API is called successfully |
error_code |
String |
Error code displayed after an API fails to be called |
error_msg |
String |
Error message displayed after an API fails to be called |
Example Requests
post https://{endpoint}/v1/projects/efdb403066474ab08836b9eeaaa23bca/plans { "assigned_id" : "efdb403066474ab08836b9eeaaa23bca", "name" : "This is a test plan name", "plan_cycle" : { "end_date" : "2020-03-31", "start_date" : "2020-03-04" }, "service_id_list" : [ 13, 24 ] }
Example Responses
Status code: 201
Created
{ "plan_id" : "b66aab5469cc4ab39b0dda8e644a42a4", "error_code" : "CLOUDTEST.00000001", "error_msg" : "Error message displayed after an API fails to be called" }
Status Codes
Status Code |
Description |
---|---|
201 |
Created |
400 |
Bad Request |
401 |
Unauthorized |
404 |
Not Found |
500 |
Internal Server Error |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackFor any further questions, feel free to contact us through the chatbot.
Chatbot