Developer's Guide > Developer's Guide > Codebeamer Developer Tools > Swagger > Swagger Documented - REST-Based API
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 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.
First, authentication is needed to use any API endpoint, click Authorize and provide username and password.
After authentication, any API endpoints can be used. To see the available API endpoints, click the group names.
In order to execute an API request, click Try it out.
Set an ID of your Tracker Item and click Execute.
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, 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>
Was this helpful?