Test API Access / Get API Token via MI API Test Tool
This article describes how you can quickly test your API access.
Table of contents:
1. Obtain External Application ID
Access Admin > System > External Applications
- Open the External Application to be tested
- Copy the ID value of the External Application from the URL
- In our example the ID value of the 'App for API' application is 6, as seen in the URL
2. Open API Toolkit
Access Admin > System > API Toolkit
- Select the item depending on the request you need to create. This example demonstrates how to obtain token via API request.
- All Methods available for this item are shown in this field (in our example only the POST method is available)
- Enter ID value of your External Application
- See for Obtain External Application ID details
- Once the ID is entered, the system automatically generates a Raw request
3. Complete and Run Raw Request to Get API Token
- Enter Username after 'user=' in the request
- Username can be found under Admin > Users & Groups > Select a User from the Users grid > Locate Username under the Info tab
- 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.
- [Run request] at the top of the page
- The Token is returned and displayed in the Raw response field
4. Get API Token via JSON Request
- Select JSON request format
- 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
- [Run Request]
- The request returns the API Token in Raw response field
5. Get API Token via XML Request
NOTE: If you are using v7.0.1, refrain from using XML requests as they won’t be executed. The common approach is to use JSON.
- Select XML request format
- 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
- [Run Request]
- The API Token is returned in Raw response field