Execute a Plan or Test API
APIs to execute plans or tests provide functionality equivalent to selecting Run on the interface. These APIs enable automated execution and integration into external workflows and systems.
Execute Plan API
To run this API, you need:
-
API key. For details on how to retrieve your personal API key, see Managing API Keys.
-
The Plan ID. To obtain the Plan ID, from the Plans page, next to a plan, click > Copy plan ID.
The Plan ID is also available from the URL of the plan.
Syntax
POST /api/plan/{plan_id}/execute?apiKey={personal_key}
Parameters
Parameter | Type | Represents |
---|---|---|
plan_id | String | The unique identifier of the plan you want to execute. This ID is required to target the specific plan within Autonomous. |
personal_key | String | Personal API key (see REST APIs). If you use a generated API key, the key must have execute permissions. For details, see Managing API Keys. |
Example
POST /api/plan/9f83812e-8e07-47c0-8b26-a56e65a8227e/execute?apiKey=AuoT101102alCT9f83812e-8e07-47c0-8b26-a56e65a8227e
This example demonstrates how to execute a plan with the ID 9f83812e-8e07-47c0-8b26-a55e65a8127e using a personal API key. Upon successful execution, the API will return a unique Plan run ID that can be used to track or retrieve the results of the plan execution.
Output
The API runs the specified plan and returns the plan run ID and read token.
{
"result": {
"id": "7eab6e31-81fa-4c57-bd56-eff05af28da2",
"read_token": "7bc15279c1339c2cak9834b25ee57479"
}
}
The plan execution ID is a unique identifier for that particular execution of the plan. You can use this ID to monitor the status of the plan or retrieve results. If the API key does not have read/write permissions, you will also need the read token to retrieve results. For details, see Get Results API.
Execute Test API
To run this API, you need:
-
API key. For details on how to retrieve your personal API key, see Managing API Keys.
-
The Test ID. To obtain the Tests ID, from the Tests page, next to a test, click > Copy test ID.
Syntax
POST /api/test/{test_id}/execute?apiKey={personal_key}
Parameters
Parameter | Type | Represents |
---|---|---|
test_id | String | The unique identifier of the test you want to execute. This ID is required to target the specific test within Autonomous. |
personal_key | String | Personal API key (see REST APIs). If you use a generated API key, the key must have execute permissions. For details, see Managing API Keys. |
Output
The API runs the specified test and returns the run ID and read token.
{
"result": {
"id": "7eab6e31-81fa-4c57-bd56-eff05af28da2",
"read_token": "7bc15279c1339c2cak9834b25ee57479"
}
}
The execution ID is a unique identifier for that particular execution of the test. You can use this ID to monitor the status of the test or retrieve results. If the API key does not have read/write permissions, you will also need the read token to retrieve results. For details, see Get Results API.