Test API Access / Get API Token via MI API Test Tool

1. Obtain External Application ID And Key

Access Admin > System > External Applications

  1. Open the External Application to be tested
  2. Copy the ID value of the External Application from the URL
    • In our example the ID value of the 'App for API' application is 1, as seen in the URL
  3. Copy the values of the Application ID and Application key
    • NOTE: Application ID and the ID value from the URL are two different values.

2. Open API Toolkit

Access Admin > System > API Toolkit

  1. Select the item depending on the request you need to create. This example demonstrates how to obtain token via API request.
  2. All Methods available for this item are shown in this field (in our example only the POST method is available)
  3. Enter ID value from the URL of your External Application
  4. Once the ID is entered, the system automatically generates a Raw request

NOTE: Beginning v7.0.2, application_id and application_key values must be provided manually additionally to the user value.

3. Complete and Run Raw Request to Get API Token

Alternately, you can use JSON requests.

  1. Assign values to the following parameters:
    • application_id: External Application ID
    • application_key: External Application key
    • user: Username
      • Username can be found under Admin > Users & Groups > Select a User from the Users grid > Locate Username under the Info tab.
  2. Optionally, you can define the response format in the Accept field

NOTE: In v6, XML or JSON response formats can be selected for Raw request or Form Request, the 'text/csv' format is only applicable for 'metric_data' and 'report_data' Items.

  1. [Run request] at the top of the page
  2. The Token is returned and displayed in the Raw response field

4. Get API Token via JSON Request

  1. Select JSON request format
  2. Assign values to the following parameters:
    • application_id: External Application ID
    • application_key: External Application key
    • user: Username
      • This value can be found under Admin > Users & Groups > Select a User from the Users grid > Locate Username under the Info tab.
  3. [Run Request]
  4. The request returns the API Token in Raw response field

5. Get API Token via XML Request

NOTE: Beginning v7.0.1, XML requests are deprecated and no longer executed. Use JSON as a standard format instead.

  1. Select XML request format
  2. Enter Username in the <user> field
    • Username can be found under Admin > Users & Groups > Select a User from the Users grid > Locate Username under the Info tab
  3. [Run Request]
  4. The API Token is returned in Raw response field