Skip to main content

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/.

To run a sample API request:

  1. 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.).

  2. Click Authorize at the top of the Swagger visualizations page.

    6123193161.png

    The Available authorizations window is shown.

  3. In the Available authorizations window, click Authorize.

    Note

    Leave the default client_id, “ast-app” in place.

    6123160437.png

    The Enter Tenant Name window is shown.

  4. In the Enter Tenant Name window, enter the Tenant Name of your organization and click Next.

    6124765712.png
  5. If you are not currently logged in to your Checkmarx account, when prompted, enter your Username and Password, and Click Sign in.

  6. In the Available authorizations window that is shown, click Close.

    6124864251.png

    You are returned to the Swagger visualization page, and are authorized to run sample requests in Swagger.

  7. 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.

    6124896442.png
  8. Click the Try it out button.

    6124896466.png
  9. In the Parameters section, enter the desired parameters for your request (if any), and click Execute.

    Note

    Required parameters are marked with an asterisk

    6123193298.png

    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.

    6124765768.png