Getting entity parameters
Use this request to get information about an entity: a project or project portfolio.
The request is a unified method for getting project and portfolio information – more flexible and functional than the getting project information API.
Request format
Before making a request, get permission to access the API.
To get entity parameters, use an HTTP GET
request.
GET /v2/entities/<entity_type>/<entity_ID>?expand=attachments&fields=summary,teamAccess
Host: https://api.tracker.yandex.net
Authorization: OAuth <OAuth_token>
X-Org-ID: <organization ID>
Headers
-
Host
Address of the node that provides the API:
https://api.tracker.yandex.net
-
Authorization
OAuth token in
OAuth <OAuth_token>
format, e.g.:OAuth 0c4181a7c2cf4521964a72ff********
-
X-Org-ID or X-Cloud-Org-ID
Organization ID. You can find it out on the Tracker organizations page
.- If a Yandex 360 for Business organization is the only one linked to Tracker, the
X-Org-ID
header is used. - If a Yandex Cloud Organization organization is the only one linked to Tracker, the
X-Cloud-Org-ID
header is used. - If both Yandex 360 for Business and Yandex Cloud Organization organizations are linked to Tracker at the same time, the
X-Org-ID
header and the Yandex 360 for Business organization ID are used.
- If a Yandex 360 for Business organization is the only one linked to Tracker, the
Resource
Parameter | Description | Data type |
---|---|---|
<entity_type> | Entity type:
|
String |
<entity_ID> | Entity ID. To get the ID, see the entity list. | String |
<project_or_portfolio_ID> | Project or portfolio ID (the shortId value). You can use it instead of the entity ID in the request. |
String |
Warning
Entity ID is not the same as project or portfolio ID.
Request parameters
Additional parameters
Parameter | Description | Data type |
---|---|---|
fields | Additional entity fields to be included into the response. | String |
expand | Additional information to be included into the response:
|
String |
Example: Getting information about a portfolio
- An HTTP GET method is used.
- The response will display attachments.
- The response will include the
teamAccess
field.GET /v2/entities/portfolio/655f328da834c763********?expand=attachments&fields=teamAccess HTTP/1.1 Host: https://api.tracker.yandex.net Authorization: OAuth <OAuth_token> X-Org-ID: <organization ID>
Response format
If the request is successful, the API returns a response with code 200 OK
.
The response body contains information about the entity in JSON format.
{
"self": "https://https://api.tracker.yandex.net/v2/entities/project/655f328da834c763********",
"id": "655f328da834c763********",
"version": 3,
"shortId": 2,
"entityType": "project",
"createdBy": { "self": "https://https://api.tracker.yandex.net/v2/users/11********", "id": "11********", "display": "Full Name", "cloudUid": "ajevuhegoggf********", "passportUid": 11******** },
"createdAt": "2023-11-23T11:07:57.298+0000",
"updatedAt": "2023-11-23T15:46:26.391+0000",
"attachments": [
{
"self": "https://https://api.tracker.yandex.net/v2/attachments/8",
"id": "8",
"name": "file1.docx",
"content": "https://api.tracker.yandex.net/v2/attachments/8/file1.docx",
"createdBy": { "self": "https://https://api.tracker.yandex.net/v2/users/11********", "id": "11********", "display": "Full Name", "cloudUid": "ajevuhegoggf********", "passportUid": 11******** },
"createdAt": "2023-11-23T15:46:20.617+0000",
"mimetype": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"size": 18585
},
{
"self": "https://https://api.tracker.yandex.net/v2/attachments/9",
"id": "9",
"name": "file2.pdf",
"content": "https://api.tracker.yandex.net/v2/attachments/9/file2.pdf",
"createdBy": { "self": "https://https://api.tracker.yandex.net/v2/users/11********", "id": "11********", "display": "Full Name", "cloudUid": "ajevuhegoggf********", "passportUid": 11******** },
"createdAt": "2023-11-23T15:46:25.932+0000",
"mimetype": "application/pdf",
"size": 175656
}
],
"fields":
{
"teamAccess":null
}
}
Response parameters
Parameter | Description | Data type |
---|---|---|
self | Address of the API resource with information about the project. | String |
id | Entity ID. | String |
version | Entity version. Each change of the parameters increases the version number. | Number |
shortId | Project or portfolio ID | String |
entityType | Entity type. | String |
createdBy | Block with information about the user who created the entity. | Object |
createdAt | Entity creation date in YYYY-MM-DDThh:mm:ss.sss±hhmm format. |
String |
updatedAt | Date when the entity was last updated, in YYYY-MM-DDThh:mm:ss.sss±hhmm format. |
String |
attachments | Array of objects with information about the attachment. | Array of objects |
createdBy
object fields
Parameter | Description | Data type |
---|---|---|
self | Address of the API resource with information about the user who created the entity. | String |
id | User ID. | Number |
display | Displayed user name. | String |
cloudUid | User unique ID in Yandex Cloud Organization. | String |
passportUid | Unique ID of the user account in the Yandex 360 for Business organization and Yandex ID. | String |
If the request is processed incorrectly, the API returns a response with an error code:
- 400
- One or more request parameters have an invalid value.
- 401
- The user isn't authorized. Make sure to perform the actions described in API access.
- 403
- Insufficient rights to perform this action. You can check what rights you have in the Tracker interface. The same rights are required to perform an action via the API and interface.
- 404
- The requested object was not found. You may have specified an invalid object ID or key.