Using the Eggplant AI API v2 (Legacy)

Note: This API will be deprecated in the next release version of Eggplant AI. The Eggplant AI API will be replaced with REST 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.

Getting Started

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.

POST -> http://localhost/auth

This example shows a typical successful response (Status 200).

Example:

{

"access_token": "eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1Mjc3ODU3ODAsImlhdCI6MTUyNzc4MjE4MCwiaXNzIjoiZWdncGxhbnRhaS5jb20iLCJ1c2VyIjp7InVzZXJuYW1lIjoibWFydGluLmRhbm5AZWdncGxhbnQuaW8ifX0.I7oef6kA9F6gvY9HHsgMvLBka4JsmLTiQIB6gPt8xrU",

"expires_in": 3600,

"token_type": "bearer"

}

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.

 

This topic was last updated on January 24, 2020, at 11:16:18 AM.

Eggplant icon Eggplantsoftware.com | Documentation Home | User Forums | Support | Copyright © 2020 Eggplant