Swagger documented REST-based API
How to use REST API
Endpoints are available on /v3/swagger/editor.spr URL, without any authentication.
From codebeamer 22.04 (Felicity) the API endpoints are ordered alphabetically in the editor.
To use a REST API endpoint users need 'api_permission'.
First steps
Please visit <site url>/v3/swagger/editor.spr URL for a built-in API tester (e.g. http://localhost:8080/cb/v3/swagger/editor.spr).
First, authentication is needed to use any API endpoint, click on the [Authorize] button and provide username and password.
After authentication, any API endpoints can be used. To see the avalaible API endpoints, click on the group names.
In order to execute an API request, click on the [Try it out] button.
Set an ID of your Tracker Item and click on the [Execute] button.
After the execution, a Curl example of the request is displayed, besides the response.
In case of the ID of Tracker Item is invalid, a 404 error code and an error message in the response is returned.
Examples are also provided for complex API requests.
Ways to generate a swagger client
Check out our GitHub repository
If you want to integrate the Swagger client generated code into your build process, you can check our GitHub repository: https://github.com/intland/swagger-client-bootstrap
You will find multiple maven modules:
- to generate the client code
- to authenticate
- to create a tracker item
- to create a report
- to move tracker items between states
Register on swaggerHub
You can register on swaggerHub and import our swagger.json, please use the /v3/swagger.json to download it.
Use openapi-generator-cli
You can find the latest generator here: https://github.com/openapitools/openapi-generator
The following command generates a java client based on the swagger.json, please use the /api-docs/v3.json to download it.
From codebeamer 22.04 (Felicity), the endpoints in the generated JSON are ordered alphabetically. For most requestBody parameters, there is a new property: "required": true/false, which may cause code generators to place them in a different position in the generated methods' signature.
Create a config.json with:
{"dateLibrary":"joda"}
Run the following command:
java -jar openapi-generator-cli-3.3.4.jar generate -i swagger.json -g java -c config.json -o <OUTPUT directory> --api-package <package name> --artifact-id=<artifact id>