Eggplant DAI Execution API Endpoints

The Eggplant DAI Execution API lets you run your Eggplant DAI models externally without needing to log in to the website, load your models, and interact with the execution controls.

Getting Started

The API is ready and available to use as soon as Eggplant DAI 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:8000/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 DAI web app. 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.

HTTP Methods

Use the following HTTP methods to send requests to the Eggplant DAI API endpoints:

  • GET for requesting data
  • POST for creating new records
  • PUT for updating records
  • DELETE for deleting records

Use the links in the table to go to the individual API methods for capabilities such as viewing run reports, viewing coverage reports, analyzing test cases, and so on. In addition, they also provide descriptions and examples for the endpoints and methods.

Title URL HTTP Method Description
Auth http://localhost/auth POST Returns an access token for the API
Run a Model http://localhost/api/run POST Starts a model run
Check Run Progress http://localhost/api/run/progress POST Returns the status of the run in progress
Monitor Agent Connections http://localhost/api/sut/status POST Shows the status of agent connections
Abort Execution http://localhost/api/run/abort POST Aborts the model run
Run a Model in Debug Mode http://localhost/api/run/continue POST Starts a model run in debug mode.

 

This topic was last updated on August 19, 2021, at 03:30:47 PM.

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