MagicPod provides Web APIs for users. For information obtainable through the Web API, please refer to the page below for descriptions of each API.
The following page describes how to manage test results using MagicPod Web API.
Table of contents
1. How to use MagicPod Web API
1. Obtain an API Token
Log in to MagicPod and copy the API Token from this page.
2. Enter authentication information
Access MagicPod Web API(v1.0), click the 'Authorize' button in the upper right corner, and enter the API Token you copied in step 1 in the format 'Token [API token]'. Note that entering only the API Token without prefixing it with 'Token' and a space will result in an authentication error.
'Authorize' button
API Token input screen
3. Execute the Web API
Web API calls can be made directly on the site. Click on any Web API row, then click the 'Try it out' button. Next, input information into each input field and click the 'Execute' button. Ensure all items marked '* required' in red are filled in.
'Try it out' button
Input field and 'Execute' button
4. Check the execution result
If the execution is successful, an HTTP status code 200 is returned, allowing you to review the information retrieved. A curl command is also generated, which can be used for verification in your local command line tools or for integration into your CI tools.
Example responses
2. Important notes when executing POST requests
Some POST requests require a data object as a request parameter. Click "Example Value" to see examples of input values. Click "Try it out" and edit the values.
If no response is returned after pressing the "Execute" button, please check the following:
Check if the data type is correct
Please refer to the data type information and verify that the input values are correct.
For example, if you enter a value in a string-type field without double quotation marks, the API will not execute.
| string | String. Double quotation marks are required |
| integer | Numeric value. Double quotation marks are not required |
| boolean | Boolean value. Double quotation marks are not required |
Check for syntax errors, such as missing commas
- Add a comma (,) at the end of each line
- Do not add a comma (,) at the end of the final item
Please verify that there are no errors in the JSON format.
Below is an example of JSON format syntax.
{
"environment": "magic_pod",
"browser": "chrome"
}
Tips: How to configure the data object for POST /v1.0/{organization_name}/{project_name}/batch-run/
The data object for POST /v1.0/{organization_name}/{project_name}/batch-run/ can also be obtained using the following method:
1. On the project page, click the "Details" button in the "Batch runs" tab.
2. Click "︙" in the upper right corner of the screen > "Run from command line".
3. Select "Run with curl (Mac/Linux Terminal) (detailed settings)" and copy the contents within the [ ] brackets of test_settings from the command displayed at the bottom.
4. Remove the "\" characters using a text editor or similar tool, and paste it into the Web API's data object field.
3. API request limit
MagicPod Web API has an API request limit that is applied to each user individually.
- Each user may make up to 100 API requests per minute.
- This limit applies across all API endpoints (=URLs). For example, if you call an API to get a batch run result list 10 times and an API to get an individual batch run result 90 times, that would total 100 requests, and any additional requests will temporarily not be accepted.
These measures are designed to prevent system overload and to ensure fair and stable access for all users. If you reach the limit, an error with status code 429 (too many requests) is returned. The request capacity will reset after a short period, allowing you to continue using the API.