Swagger V3 Tracker Tree Endpoints
Since Codebeamer release 2.1 (IMPALA), the following Tracker Tree endpoints are available:
- List Tracker Tree - GET/v3/trackers/tree
- Update Tracker Tree - POST/v3/trackers/tree/update
List Tracker Tree
The List Tracker Tree endpoint returns the trackers of a project based on the projectId and shows the hierarchy in which the trackers are structured:
GET/v3/trackers/tree
Usage
To get the hierarchical structure of the trackers of a project,
- Use the GET/v3/trackers/tree endpoint in Swagger.
- Provide the projectId, and the workingSetId if any.
- Click Execute.
Code 200 in the Server response section confirms that the API call has been executed successfully.
The Response body returns the trackers of the relevant project in a hierarchical structure, and also shows the name of the folder, if any, containing the trackers.
Operation
If the tracker hierarchy is changed on the User Interface, the updated structure is returned in Swagger after executing the request again.
In case you hide a tracker on the User Interface and execute the request in Swagger, the hidden tracker is not returned among the other trackers in the Response body.
To have the hidden trackers listed in Swagger as well, enable displaying the hidden trackers on the User Interface first and execute the API request again.
In such cases, the hidden tracker is listed in the Response body within a new folder named Hidden Trackers.
If working-sets other than the Default Working-Set are available, provide the workingSetId of the relevant working-set before executing the request.
Update Tracker Tree
Use the Update Tracker Tree endpoint to change the content or tracker hierarchy of a project:
POST/v3/trackers/tree/update
Usage
To change the structural hierarchy of the trackers within a project,
- Use the POST/v3/trackers/tree/update endpoint in Swagger.
- Provide the relevant projectId, and workingSetId if any.
- Get the hierarchical structure of trackers of the relevant project by using the GET/v3/trackers/tree endpoint.
- Copy the JSON from the Response body.
- Paste the JSON to the Request body of the POST/v3/trackers/tree/update endpoint.
- Perform the necessary structural changes: create or delete folders, move the trackers into different folders.
- Click Execute.
Code 200 in the Server response section confirms that the changes have successfully been executed.
Operation
When the JSON in the Request body is modified and the request is executed, reload the User Interface to see the changes made in Swagger.
Changing the Structure or Hierarchy
Tracker A is structured above Tracker B on the User Interface.
To change the order of trackers,
- Exchange the "trackerId" of Tracker A with that of Tracker B and execute the API request.
- Go back to the User Interface, reload the page.
Tracker B is now structured above Tracker A in the Tracker tree.
Tracker A and Tracker B are on the same level in the tracker hierarchy.
Making Tracker B with "trackerId": 5678 the child item of Tracker A with "trackerId": 1234 :
{
"trackerId": 1234
"children": [
{
"trackerId": 56789
}
]
}
Creating Folders
To create a new folder and add items to it, use the following structure:
{
"isFolder": true,
"text": "Work Items",
"children": [
{
"trackerId": 5678
}
]
}
- "isFolder": true - Use to create a new folder.
- "text": Work Items - The name of the folder to create.
- "children" - Add the relevant items to the folder as children items.
Deleting Items or Folders
To delete an item or folder from the tracker tree, delete the relevant section from the JSON and click Execute.