Bulk changes to entities
Use this request to make bulk updates to entities: projects or project portfolios.
Request format
Before making a request, get permission to access the API.
Use an HTTP POST
request for bulk changes of multiple entities. Request parameters are provided in the request body in JSON format.
POST /v2/entities/<entity_type>/bulkchange/_update
Host: https://api.tracker.yandex.net
Authorization: OAuth <OAuth_token>
X-Org-ID: <organization ID>
{
"metaEntities":[ "<entity_1_ID>","<entity_2_ID>", ...],
"values":
{
"fields":
{
"<field_key>":"<value>",
...
},
"comment":"<comment>"
}
}
Note
You can use the project or portfolio ID (the shortId
field value) instead of the entity 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 |
Request body parameters
Required parameters
Parameter | Description | Data type |
---|---|---|
metaEntities | List of entity IDs. | Array of strings |
values | Object with settings for bulk entity changes. | Object |
values
object fields
Parameter | Description | Data type |
---|---|---|
fields | Object with key-value pairs. | Object |
comment | Comment | String |
links | Array of objects with settings of links to other entities | Array of objects |
links
array object fields
Parameter | Description | Data type |
---|---|---|
relationship | Link type, e.g.:
|
String |
entity | Linked entity's ID | String |
Example: Updating a status, assigning a follower, leaving a comment for multiple projects
- An HTTP POST method is used.
- The project status changes to
At risk
.- A follower is assigned.
- A new record is added to project comments.
POST /v2/entities/project/bulkchange/_update HTTP/1.1 Host: https://api.tracker.yandex.net Authorization: OAuth <OAuth_token> X-Org-ID: <organization ID> { "metaEntities":[ "655f3be523db2132********","655f383923db2132********"], "values": { "fields": { "entityStatus":"at_risk", "followers":"agent007", }, "comment":"The project is at risk" } }
Response format
If the request is successful, the API returns a response with code 200 OK
.
The response body contains information about the bulk request in JSON format.
{
"id": "6560c6f59b0b1e76********",
"self": "https://https://api.tracker.yandex.net/v2/bulkchange/6560c6f59b0b1e76********",
"createdBy": { "self": "https://https://api.tracker.yandex.net/v2/users/11********", "id": "11********", "display": "Full name", "cloudUid": "ajevuhegoggf********", "passportUid": 11******** },
"createdAt": "2023-11-24T15:53:25.122+0000",
"status": "CREATED",
"statusText": "Bulk change task created.",
"executionChunkPercent": 0,
"executionIssuePercent": 0
}
Response parameters
Parameter | Description | Data type |
---|---|---|
id | Bulk request ID | String |
self | Address of the API resource with information about the bulk request | String |
createdBy | Block with information about the user who created the bulk request | Object |
createdAt | Entity creation date in YYYY-MM-DDThh:mm:ss.sss±hhmm format |
String |
status | Bulk request status | String |
statusText | Interpretation of the bulk request status | String |
createdBy
object fields
Parameter | Description | Data type |
---|---|---|
self | Address of the API resource with information about the entity creator | String |
id | User ID | Number |
display | Displayed user name | String |
cloudUid | Unique user 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.
- 412
- There was a conflict when editing the object. The error may be due to an invalid update version.
- 428
- Access to the resource is denied. Make sure all required conditions for the request are specified.