Using the REST API with Swagger
The REST API endpoints are documented in Swagger specification language in the Swagger UI, and guidelines for using the Swagger UI with the API are provided in this topic. In addition to the Swagger UI, you can view the endpoints provided by this REST API in the Endpoint documentation page in this documentation.
The swagger.json file
The Swagger specification of the REST API consists of a file of JSON data called swagger.json. This file includes endpoint URLs, descriptions, request parameters, and response structures. Defining the endpoints in this standard, machine-readable format enables the use of automated tools such as interactive documentation and client code generation.
Because each version of the REST API has its own list of endpoints, there is one swagger.json file per version. For example, the specification of the endpoints in version 1.0 of the API can be found at:
This file is not protected by authentication, you can view this file in a browser.
The Swagger UI
The Swagger UI shows a list of endpoints in a web page. You can read and submit requests after authentication. BMC Atrium Core 9.1.03 and later host the Swagger UI. When you access the Swagger UI, default values for all the parameters are automatically populated.
You can access the Swagger UI directly at:
The Swagger UI opens the specified
Each endpoint has a Try it out! button, which lets you submit a request. However, you must supply an authentication token in HTTP header for all requests to endpoints in the REST API. When you provide a token, the Swagger UI automatically adds such a header to every request. Click Authorize in the upper-right corner of the Swagger UI page to display the Available authorizations dialog box.
Specify the token for the Value field in the following format:
AR-JWT <token>CMDB REST API supports token based authentications. You can generate the token as mentioned at
Try it out!
The Swagger UI allows you to call any endpoint in the REST API, but does not provide a sandbox for this experimentation. Some endpoints make changes to the state of the CMDB. For example, creating a new instance or deleting an instance. Call these endpoints from the Swagger UI only if you can accommodate the changes made on BMC Atrium CMDB.