Test API Access / Get API Token via MI API Test Tool
This article describes how you can quickly test your API access.
NOTE: The format of the API Test Tool is slightly different in Version 3.
1. Access Admin Menu > System> External Applications
Open the External Application to be tested.
2. Review External Application Editor to obtain ID
The ID value of your External Application can be obtained from the URL in its editor.
In our example the ID value of the 'External API' application is 11, as seen in the URL of the External Applications page.
3. Open API Test Tool (access Admin menu > Utilities > 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. In our example the ID value of the 'External API' application is 11, as seen in the URL of the External Application Editor page.
- Once the ID is entered, the system automatically generates a Raw request
4. Complete and Run the Raw request to get API Token
- Input Userid after 'user=' in the request
- Optional. When performing Raw request or Form Request, you can define the response format (XML or JSON) in the Accept field. NOTE: In the Accept field, the 'text/csv' setting is only applicable for 'metric_data' and 'report_data' Items.
- Click Run request at the top of the page
- The Token is returned and displayed in the Raw response field
NOTE: The test is successful since the API Token was obtained.
5. Get API Token using JSON
Alternately, you can use other formats such as JSON.
- Select JSON request format
- Both Application ID and the Application Key already provided but you must supply the user as previously described
- Run Request
- The request returns the API Token in Raw response field
6. Get API Token using XML format
Alternately you can use XML format for the get token request.
- Select XML request format
- The Application ID and the Application Key already provided but you must supply the user as previously described
- Run Request
- The API Token is returned in Raw response field