Using the Eggplant AI API
The Eggplant AI API lets you run your Eggplant AI models externally without needing to log in to the website, load your models, and interact with the execution controls. This allows models to be executed from other programs and scripts in parallel to increase testing bandwidth and improve your automation flow.
The API is ready and available to use as soon as Eggplant AI is installed. You must have valid credentials to access the API, as each of the endpoints is protected. Access is gained by sending a request to the auth endpoint and retrieving an access token that is sent in subsequent requests to the API.
This example shows a typical successful response (Status 200).
This token lasts for one hour, after which a new token is required. See the Auth Method for more information.
As soon as an access token is acquired, models can be tested with all the options that are available in the Eggplant AI web GUI. After a run starts, it can be left to process. An ID is returned that can be used to check the progress of a run to see if it has completed. In addition, you can abort a run.
In addition to basic model execution controls, there are the capabilities to check agent connection statuses, view run reports, view coverage reports, and analyze test cases. See the individual API methods for more details.