Skip to main content
Version: DAI 7.1

Eggplant DAI API Endpoints

You can retrieve and manage most of the model related data by using the DAI API endpoints. This allows models to be executed from other programs and scripts in parallel to increase testing bandwidth and improve your automation flow. Also see the Eggplant DAI Execution API Endpoints.

  • Agents that connect the Eggplant DAI server to system under test (SUTs) via Eggplant Functional
  • Models and submodels that represent your application
  • Coverage models that represent your bespoke coverage definitions for temporal path depth and parameter cross depth
  • Defect reports that provide a list of failed model test runs
  • Run reports with history of model test runs including timings and logs
  • Coverage reports that provide a glimpse of what areas of your model are visited by the Eggplant DAI engine
  • Screenshots to help identify the failure point in your model
  • Test cases for all your user defined journeys through your model
  • Test configuration tasks to define how a model should be tested and against which systems under test (SUT)
  • Test runs to show which test cases have been hit
  • Tags that are used to categorize various parts of your model to help with bug hunting
  • Insights that combines data from third-party providers and calculates scores to help you predict where you need to focus to improve your application quality

Global data

  • Generate authentication tokens to access the protected endpoints
  • Manage users of Eggplant DAI
  • Use groups to share models between users
  • Generate licenses for accessing Eggplant DAI and running multiple tests in parallel
  • Provide usage statistics
  • Ping for testing if the API is running


Most endpoints in the Eggplant DAI API require authentication. Therefore, you must obtain an access token by making a POST request to the /auth endpoint passing a valid username and password from an enabled Eggplant DAI user account. Typically, access tokens last for 7 days, and when they expire, you will get a 401 Unauthorized response from the endpoints that are user-restricted. When this happens, simply request another access token from the /auth endpoint. A typical response is as follows:

"user_id": "97cf2b38-b9bf-426c-9293-b2c92f5b92f3",
"expires_in": 604800,
"access_type": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE1NjE5NzczNTQsImV4cCI6MTU2MjU4MjE1NCwidXNlciI6eyJ1c2VybmFtZSI6Im1hcnRpbi5kYW5uQGVnZ3BsYW50LmlvIn0sImlzcyI6ImVnZ3BsYW50YWkuY29tIiwicmFuZCI6Nzg4ODY5OTQwMDQ5NDR9.Q8fp67rrMi32AEM6U-Hkulthh3-XXx6voSmEHsuwrgk",
"token_type": "bearer"


User restricted endpoints require a valid access token to be set in an Authorization header in all API requests. The format of the Authorization header is bearer {access token}. Some endpoints like the model related endpoints require you to have the correct permissions to access them. Permissions are determined by your group associations in Eggplant DAI, and models are associated with groups.

On registering with Eggplant DAI, users are assigned to their own individual group, which is named identical to their email addresses.

There are two user roles: A regular user and an admin user. Admin users have access to additional endpoints that regular users don’t, such as the ones for managing all users, all models, and other global settings. Admin users can also create additional groups to enable model sharing.


The documentation for all the Eggplant DAI API endpoints is automatically generated by Swagger. It provides the URLs, HTTP methods, headers, and body parameters that you need to pass to the endpoints as well as a list of possible responses.