Eggplant AI API Endpoints

You can retrieve and manage the following data by using the advanced Eggplant AI API endpoints:

Model related data

  • Agents that connect the Eggplant AI server to system under test (SUTs) via Eggplant Functional
  • Models and sub models that represent your application
  • Coverage models that represent your bespoke coverage definitions for temporal path depth and variable 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 AI engine
  • Test cases for all your user defined journeys through your model
  • 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 AI
  • Use groups to share models between users
  • Generate licenses for accessing Eggplant AI and running multiple tests in parallel
  • Provide usage statistics
  • Ping for testing if the API is running


Most endpoints in the Eggplant AI 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 AI 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_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE1NjE5NzczNTQsImV4cCI6MTU2MjU4MjE1NCwidXNlciI6eyJ1c2VybmFtZSI6Im1hcnRpbi5kYW5uQGVnZ3BsYW50LmlvIn0sImlzcyI6ImVnZ3BsYW50YWkuY29tIiwicmFuZCI6Nzg4ODY5OTQwMDQ5NDR9.Q8fp67rrMi32AEM6U-Hkulthh3-XXx6voSmEHsuwrgk",
"token_type": "bearer"

To find out when a token expires, you can use the expires_in value of the response. This indicates when the access token will expire in milliseconds (604800 seconds = 7 days).


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 AI, and models are associated with groups.

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

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

HTTP Methods

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

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


The documentation for all the advanced Eggplant AI API endpoints is automatically generated by Swagger. It allows you to determine how to use each of those endpoints to extract data. In addition, it provides the URLs, HTTP methods, headers, and body parameters that you need to pass to the endpoints and a list of possible responses.

See the API documentation link below, for available methods.


This topic was last updated on October 16, 2020, at 08:27:13 PM.

Eggplant icon | Documentation Home | User Forums | Support | Copyright © 2020 Eggplant