Explore APIs

Org Admins and Developers can read more about the APIs and can test the APIs that are published in
API Portal
using the API Explorer.
apip43
In this article:
Org Admins and Developers can read more about the APIs and can test the APIs that are published in
API Portal
using the API Explorer or the Swagger UI. API Explorer is accessible only through the
API Portal
/Ingress tenant. If you are using an external tenant, test and explore APIs using the Swagger UI instead. The API Explorer and Swagger UI display only APIs that have WADL or Swagger .json files.
You can select an API and configure a query using the API Explorer or Swagger UI. This function uses information in a well-crafted WADL or Swagger .json file and displays information about the API, resource, method, and parameters that you select for the query. A request is submitted against the API and a call is routed to the endpoint specified in the file. If multiple clusters of API proxies are present, you can point the endpoint that is specified in the WADL or Swagger file to a particular cluster or a virtual IP address.
You can translate the generated query into one of the following programming languages: Curl, Java, JavaScript, Node.js, Objective C, PHP, Python, and Ruby.
Test and Explore an API using API Explorer
Follow these steps:
  1. Log in to
    API Portal
    as an Org Admin or Developer.
  2. Select
    one
    of the following methods:
    • Use API Explorer. On the menu bar, select
      API Explorer
      , and then select an API.
    • On the menu bar, select
      Manage
      ,
      APIs
      , select the menu icon for the API that you want to test, and then select
      Test
      .
  3. If the API requires authentication, complete the following substeps:
    1. From the
      App/API Key
      menu, select an application. The API Explorer uses the default API key and shared secret.
      When using the Portal API (PAPI) or the Portal Metrics API in the API Explorer, select
      Portal API app
      .
    2. Select
      Configure Authentication
      .
    3. Select the authentication type that the API requires.
      More fields appear. The fields depend on the authentication type.
    4. Complete the fields that the authentication type requires, and then select
      OK
      .
  4. Select a resource in the API.
  5. Select a method available for the resource. If the method requires a parameter value, then enter a valid value.
    API Portal
     supports
    application/json
    as the parameter content type. To view
    application/xml
    as the parameter type, manually convert the payload as an XML type, and paste as a body.
  6. (Optional) To add another parameter that the API supports, complete the following substeps:
    1. Select
      Add Parameter
      .
    2. Specify the parameter type: query, header, or template.
      Template parameters are URI parameters that are enclosed in { }. Template parameters must be substituted before the URI can be resolved.
    3. Enter the parameter name and value, and then select
      OK
      .
  7. Select
    Submit
    .
    The API Explorer displays the query that it sent to the API and the response from the API.
  8. To translate the query to another programming language, select the language from the menu.
To go from the API Explorer to the API Portal Home page, select the name of your
API Portal
.
Test and Explore an API using Swagger UI
Follow these steps:
  1. While logged in to
    API Portal
    , from the menu bar, select
    Manage
    ,
    APIs
    .
    The
    APIs
    page appears.
  2. Select the tile for the API that you want to test and explore.
    The
    Overview
    tab opens.
  3. Select the
    Spec
    tab.
    The Swagger UI opens.
  4. From the drop-down, select the application for which you want to test and explore this API. If the API is not included in an application, you can click
    Create an Application
    to add one.
    A second drop-down appears for your to select your API key.
  5. From the second drop-down, select your API key.
    The API key (client ID) and the shared secret (client secret) (if the shared secret was generated in plaintext), display.
  6. Ensure that your session is authorized. If applicable, the
    Padlock
    icon next to your selected endpoint indicates whether an endpoint is locked. If required, authorize your session by clicking the padlock, and then completing the information required in the
    Authorization
    window.
  7. Expand your selected endpoint, and then click
    Try it out
    .
  8. The example values in the
    Request Body
    field become editable. Make changes to the example request, and then click
    Execute
    .