ListProgramVersions - List program versions
|
Applicable editions |
Central edition, Region edition |
Endpoints and authorization
-
Get service endpoint: Use this to replace the
{domain}placeholder in the request syntax. -
Get the organization ID: Required only for the Central edition. Go to the basic information page in the organization admin console.
|
Product |
Resource |
Required permission |
|
Projex |
version |
Read-only |
Request syntax
Central edition
GET https://{domain}/oapi/v1/projex/organizations/{organizationId}/programs/{id}/versions
Region edition
GET https://{domain}/oapi/v1/projex/programs/{id}/versions
Request headers
|
Parameter |
Type |
Required |
Description |
Example value |
|
x-yunxiao-token |
string |
Yes |
Your personal access token. |
pt-0fh3****0fbG_35af****0484 |
Request parameters
|
Parameter |
Type |
Location |
Required |
Description |
Example value |
|
organizationId |
string |
path |
|
The organization ID. |
|
|
id |
string |
path |
Yes |
The unique identifier of the program. |
|
|
status |
array[string] |
query |
No |
Filters the results by status. Valid values include |
|
|
page |
integer |
query |
No |
The page number for pagination. |
|
|
perPage |
integer |
query |
No |
The number of items to return per page. |
Request examples
Central edition
curl -X 'GET' \
'https://{domain}/oapi/v1/projex/organizations/{organizationId}/programs/{id}/versions?status={status}&page={page}&perPage={perPage}' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Region edition
curl -X 'GET' \
'https://{domain}/oapi/v1/projex/programs/{id}/versions?status={status}&page={page}&perPage={perPage}' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Response parameters
|
Parameter |
Type |
Description |
Example value |
| - |
array |
An array of version objects. |
|
| - |
object |
A version object. |
|
| creator |
object |
The creator of the version. |
|
|
id |
string |
The user ID of the creator. |
674d96abd497cd558d68**** |
|
name |
string |
The username of the creator. |
user-name-xxx |
|
gmtCreate |
string |
The timestamp when the version was created. |
|
|
gmtModified |
string |
The timestamp when the version was last updated. |
|
|
id |
string |
The unique identifier of the version. |
1111 |
|
locked |
boolean |
Indicates whether the version is locked. |
false |
| modifier |
object |
The user who last modified the version. |
|
|
id |
string |
The user ID of the modifier. |
674d96abd497cd558d68**** |
|
name |
string |
The username of the modifier. |
user-name-xxx |
|
name |
string |
The name of the version. |
1111 |
| owners |
array |
The owners of the version. |
|
| - |
object |
An owner object. |
|
|
id |
string |
The user ID of the owner. |
674d96abd497cd558d68**** |
|
name |
string |
The username of the owner. |
user-name-xxx |
|
publishDate |
string |
The date when the version was published. |
|
|
startDate |
string |
The start date of the version. |
|
|
status |
string |
The status of the version. |
TODO |
Response example
[
{
"creator": {
"id": "674d96abd497cd558d68****",
"name": "user-name-xxx"
},
"gmtCreate": "",
"gmtModified": "",
"id": "1111",
"locked": false,
"modifier": {
"id": "674d96abd497cd558d68****",
"name": "user-name-xxx"
},
"name": "1111",
"owners": [
{
"id": "674d96abd497cd558d68****",
"name": "user-name-xxx"
}
],
"publishDate": "",
"startDate": "",
"status": "TODO"
}
]
Response headers
|
Parameter |
Description |
Example value |
|
x-next-page |
The next page number. |
|
|
x-page |
The current page number. |
|
|
x-per-page |
The number of items per page. |
|
|
x-prev-page |
The previous page number. |
|
|
x-total |
The total number of items. |
|
|
x-total-pages |
The total number of pages. |
Error codes
For a list of API error codes, see the Error Code Center.