CreateMilestone - Create milestone
|
Applicable editions |
Central edition, Region edition |
Service endpoints and authorization
- Get service endpoint: Use this to replace the
{domain}placeholder in the request URL. - Get personal access token: Required for authentication via the
x-yunxiao-tokenrequest header. - Get
organizationId: Required only for the Central edition. Go to the organization admin console and get the organization ID from the Basic information page.
|
Product |
Resource |
Required permission |
|
Project Collaboration |
milestone |
Read/Write |
Request syntax
Central edition
POST https://{domain}/oapi/v1/projex/organizations/{organizationId}/projects/{id}/milestones
Region edition
POST https://{domain}/oapi/v1/projex/projects/{id}/milestones
Request headers
|
Parameter |
Type |
Required |
Description |
Example |
|
x-yunxiao-token |
string |
Yes |
Your personal access token. |
pt-0fh3****0fbG_35af****0484 |
Request parameters
|
Parameter |
Type |
In |
Required |
Description |
Example |
|
id |
string |
path |
Yes |
The unique ID of the project. |
|
|
organizationId |
string |
path |
|
The organization ID. |
|
| - |
object |
body |
No |
|
|
| assignedTo |
string |
body |
Yes |
The assignee. |
|
| description |
string |
body |
No |
The description of the milestone. |
|
| operatorId |
string |
body |
No |
The operator's |
|
| planEndDate |
string |
body |
Yes |
The planned end date. |
|
| subject |
string |
body |
Yes |
The subject or title of the milestone. |
|
Request example
Central edition
curl -X 'POST' \
'https://{domain}/oapi/v1/projex/organizations/{organizationId}/projects/{id}/milestones' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"assignedTo": "",
"description": "",
"operatorId": "",
"planEndDate": "",
"subject": ""
}'
Region edition
curl -X 'POST' \
'https://{domain}/oapi/v1/projex/projects/{id}/milestones' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"assignedTo": "",
"description": "",
"operatorId": "",
"planEndDate": "",
"subject": ""
}'
Response parameters
|
Parameter |
Type |
Description |
Example |
| - |
object |
|
|
| id |
string |
The ID of the milestone. |
id-xxx |
Response example
{
"id": "id-xxx"
}
Error codes
For a list of API error codes, see the Error Code Center.