Accessing API using Swagger UI


You can use an Application Programming Interface (API) by executing API requests using Swagger. Swagger UI allows visualizing and interacting with the API’s resources without any implementation logic in place. It is automatically generated from your OpenAPI specification, and the visual documentation makes it easy for back-end implementation and client-side consumption.

Important considerations

  • Be careful when using POST, PUT, PATCH, or DELETE requests. These operations modify data on the server. Double-check your parameters and request body before executing these types of calls, especially in a production environment. Recommend testing on a development or staging environment first.
  • If you make too many requests in a short period, you might receive a 429 Too Many Requests error. 
  • Learn to interpret the HTTP status codes and error messages that the API returns. This helps you to trouble shoot problems.
  • Swagger UI includes schemas at the bottom of the page. These define the structure of the data used in request and response bodies. Refer to these schemas to understand the expected data format.

Related topics

To access the interactive API documentation and test API calls for BMC Helix Edge.

Before you begin

  • URL of the BMC Helix Edge core node.  
  • Connected to the same network with appropriate firewall rules configured, or use a VPN if necessary.
  • Depending on the platform, you might authenticate before executing swagger requests. Consult your administrator to determine the required authentication method.

To access BMC Helix APIs through Swagger UI

  1. Launch your preferred web browser.
  2. In the web browser address bar, enter the URL of your core node followed by /swagger/index.html. For instance, in https://clm-aus-wxrld7:8000/swagger/index.htmlclm-aus-wxrld7:8000 is the URL of the core node. 
    Replace with your core node URL.
  3. Press Enter.
    You see a page titled Hedge Edge API as follows:
    image-2025-2-12_12-13-44.png
    The page lists the available API endpoint categories for API calls. These APIs are grouped by functionality, such as Devices, Alerts, or Users.
    image-2025-2-7_2-23-42.png
  1. Click the name of an API request to expand it. For example, click GET /api.v3/deviceinfo/device/name/{deviceName} Get Complete Device Info to expand it.
    The system reveals details about that specific API call.
    Each request has a description explaining its purpose.
  2. In the Parameters section, observe for the following: 

    Parameter name

    Description

    Path Parameters

    Parts of the URL that specify a particular resource, for example /devices/{deviceId} where {deviceId} is a path parameter.

    Query Parameters

    Optional parameters are added to the URL after a ?, for example /devices?status=active.

    Request Body

    For POST, PUT, and sometimes PATCH requests, this field describes the data you must send in the body of the request in JSON format. Swagger UI often shows you the expected data structure such as the schema.

    Headers

    Custom request headers.

  3. (Optional) In case the Authorize button is present perform the following steps.
    1. On the top left corner of the Swagger UI, click Authorize.
    1. Select the appropriate authentication method that the BMC Helix Edge instance uses.
    2. Enter the required credentials.
    3. Click Authorize
      The system authorizes you to make API calls. If there are multiple security schemes, you must approve each one.
    4. Click Close.
  1. Select an API request to test, for example, a GET request to retrieve data, and perform the following steps:
    1. In the expanded endpoint section, click Try it out.
    2. If the endpoint requires parameters such as path, query, or body, enter the appropriate values in the provided fields.
      Swagger UI provides helpful input validation and suggestions based on the API definition.
    3. Click Execute.
      The system returns with the request. The following table describes the parameters:

      Parameter name

      Description

      Curl Command

      Swagger UI shows you the equivalent curl command that was executed. This is useful for scripting or debugging.

      Request URL

      The full URL used for the request.

      Response Code

      The server returns the HTTP status code. For example 200, 404, so on.

      Response Body

      The server returns the data in JSON format. The body is the data you requested.

      Response Headers

      The server returns the HTTP headers.

  2. Click the lock icon to log out.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*