Previous Topic: OpenAPI ControlsNext Topic: OpenAPI Query Troubleshooting


Create an OpenAPI Query

The OpenAPI Query Builder lets you create a Query URL. For every parameter in the query, the OpenAPI adds the corresponding parameter to the Query URL. The parameter availability depends on the component, device, router, or other item that you want to query.


Follow these steps:

  1. Click the Specify the Query field to start a query.

    A list of tokens appears.

  2. Select a token or recipe.

    The token or recipe appears in the Specify the Query field.

    The address bar of the web browser updates to show the changes that you make in the Specify the Query field. Copy and save this URL for your records if you or another user wants to continue editing the query later.

  3. Complete the query using the available tokens.
  4. Click Format and Payload Options to customize the formatting of the data.

    Select the sorting method, the number of items to return, and the format of the data.

  5. (Optional) Click the Run button.

    The OpenAPI runs the query and the results appear in the format that you selected.

  6. Click the Copy (copyURL) button.

    The Query URL is copied to the clipboard, and can be pasted into a web browser or REST tool.

    The base URL for all OpenAPI queries is the following:

    http://hostname:port/odata/api/
    

Important: Queries that return large sets of results can negatively impact your system. We recommend refining your queries to return only the results that are relevant to your needs.