- Checkmarx Documentation
- Checkmarx One
- Checkmarx One API Documentation
- How to Run API Samples in Swagger
How to Run API Samples in Swagger
You can easily try out our APIs by running samples in the Swagger visualization.
The Swagger visualizations for the Checkmarx One REST APIs are available at <Checkmarx_One_base_URL>/spec/v1/.
US Environment - https://ast.checkmarx.net/spec/v1/
US2 Environment - https://us.ast.checkmarx.net/spec/v1/
EU Environment - https://eu.ast.checkmarx.net/spec/v1/
EU2 Envitonment - https://eu-2.ast.checkmarx.net/spec/v1/
Australia & New Zealand – https://anz.ast.checkmarx.net/spec/v1/
Singapore - https://sng.ast.checkmarx.net/spec/v1/
To run a sample API request:
In the Select a definition field in the header bar, select from the dropdown list the category of APIs that you would like to test (e.g., Scans, Projects etc.).
Click Authorize at the top of the Swagger visualizations page.
The Available authorizations window is shown.
In the Available authorizations window, click Authorize.
Note
Leave the default client_id, “ast-app” in place.
The Enter Tenant Name window is shown.
In the Enter Tenant Name window, enter the Tenant Name of your organization and click Next.
If you are not currently logged in to your Checkmarx account, when prompted, enter your Username and Password, and Click Sign in.
In the Available authorizations window that is shown, click Close.
You are returned to the Swagger visualization page, and are authorized to run sample requests in Swagger.
Scroll down to the sample request you wish to run, and click on it.
The section expands, showing the Parameters and sample Responses sub-sections.
Click the Try it out button.
In the Parameters section, enter the desired parameters for your request (if any), and click Execute.
Note
Required parameters are marked with an asterisk
The top of the Responses section is populated with the Curl, Request URL, and the actual Server response for your sample request.
Note
Below the Server response section, there is a Responses section which shows sample success and error responses.
These samples do not relate to the API request that you submitted.