In Swagger v3, there are some general reconciliations. This page explains the basic conceptual changes made during the upgrade.
Instead of listing the fully populated models, Codebeamer provides model references which you can use directly for other endpoints. For example:
• You can list all the user references and use the same model to set an assignee of a tracker item.
• You can return a page of references listing all tracker items in a tracker as follows.
{
"page": 1,
"pageSize": 25,
"total": 5,
"itemRefs": [
{
"id": 1129,
"name": "Variants Management software",
"type": "TrackerItemReference"
},
{
"id": 1055,
"name": "Define Test Cases",
"type": "TrackerItemReference"
},
{
"id": 1054,
"name": "Variants Management software",
"type": "TrackerItemReference"
},
{
"id": 1053,
"name": "Bluetooth",
"type": "TrackerItemReference"
},
{
"id": 1052,
"name": "USB",
"type": "TrackerItemReference"
}
]
}• Another method is to list all tracker permissions as follows:
[
{
"role": {
"id": 1,
"name": "Project Admin",
"type": "RoleReference"
},
"trackerPermissions": [
{
"id": 0,
"name": "issue_view_not_own",
"type": "TrackerPermissionReference"
},
{
"id": 1,
"name": "issue_edit_not_own",
"type": "TrackerPermissionReference"
},
{
"id": 2,
"name": "issue_view",
"type": "TrackerPermissionReference"
},
• For multiple item queries you can use some specific endpoints such as GET /v3/reports/{reportId}/items.
As the product of reference-based listings, reference objects are used to refer entities in the system. This includes the usability and readability of the API.
For example, instead of providing a list of permission IDs for a specific role in a tracker, use references which are the same objects that return from the GET calls.
{
"permissions": [
{
"id": 0,
"name": "issue_view_not_own",
"type": "TrackerPermissionReference"
},
{
"id": 1,
"name": "issue_edit_not_own",
"type": "TrackerPermissionReference"
},
{
"id": 2,
"name": "issue_view",
"type": "TrackerPermissionReference"
}
]
}