GetProject - Get a project
|
Applicable editions |
Central edition, Region edition |
Endpoint and authorization information
- Get the endpoint: Replace {domain} in the API request syntax.
- Get a personal access token.
- Get organizationId: Required only for the Central edition. Go to the Basic Information page in the Organization Management console to obtain your organization ID.
|
Product |
Resource |
Required permission |
|
Project Collaboration |
Project |
Read-only |
Request syntax
Central edition
GET https://{domain}/oapi/v1/projex/organizations/{organizationId}/projects/{id}
Region edition
GET https://{domain}/oapi/v1/projex/projects/{id}
Request headers
|
Parameter |
Type |
Required |
Description |
Example value |
|
x-yunxiao-token |
string |
Yes |
Personal access token. |
pt-0fh3****0fbG_35af****0484 |
Request parameters
|
Parameter |
Type |
Location |
Required |
Description |
Example value |
|
id |
string |
path |
Yes |
Unique project identifier. |
589c53d622cc8521793e08**** |
|
organizationId |
string |
path |
|
organizationId. |
|
Request examples
Central edition
curl -X 'GET' \
'https://{domain}/oapi/v1/projex/organizations/{organizationId}/projects/589c53d622cc8521793e08****' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Region edition
curl -X 'GET' \
'https://{domain}/oapi/v1/projex/projects/589c53d622cc8521793e08****' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Response parameters
|
Parameter |
Type |
Description |
Example value |
| - |
object |
|
|
| creator |
object |
Modifier. |
|
| id |
string |
User ID. |
674d96abd497cd558d68**** |
| name |
string |
Username. |
user-name-xxx |
| customCode |
string |
Number. |
CCDD |
| customFieldValues |
array |
Custom field values. |
|
| - |
object |
Custom field values. |
|
| fieldId |
string |
Field ID. |
fieldId1 |
| fieldName |
string |
Field name. |
field-test |
| values |
array |
|
|
| - |
object |
|
|
| displayValue |
string |
Display name of the value. |
111 |
| identifier |
string |
Unique identifier of the value. |
111 |
| description |
string |
Description. |
test |
| gmtCreate |
string |
Creation timestamp. |
|
| gmtModified |
string |
Update timestamp. |
|
| icon |
string |
Icon. |
xxx |
| id |
string |
ID. |
1111 |
| logicalStatus |
string |
Logical status. |
normal |
| modifier |
object |
Modifier. |
|
| id |
string |
User ID. |
674d96abd497cd558d68**** |
| name |
string |
Username. |
user-name-xxx |
| name |
string |
Name. |
project-test |
| scope |
string |
Visibility type. Valid values: public, private. |
public |
| status |
object |
Status. |
|
| id |
string |
Status ID. |
1111 |
| name |
string |
Status name. |
In Progress |
Response example
{
"creator": {
"id": "674d96abd497cd558d68****",
"name": "user-name-xxx"
},
"customCode": "CCDD",
"customFieldValues": [
{
"fieldId": "fieldId1",
"fieldName": "field-test",
"values": [
{
"displayValue": "111",
"identifier": "111"
}
]
}
],
"description": "test",
"gmtCreate": "",
"gmtModified": "",
"icon": "xxx",
"id": "1111",
"logicalStatus": "normal",
"modifier": {
"id": "674d96abd497cd558d68****",
"name": "user-name-xxx"
},
"name": "project-test",
"scope": "public",
"status": {
"id": "1111",
"name": "In Progress"
}
}
Error codes
For more information, see Error Code Center for API-related error codes.