Run a Model Method

To run a model, you must provide an Authorization header containing access token in the and also a Content-Type header with the value application/x-www-form-urlencoded.

The run endpoint accepts a POST request with parameters in the body of the request to control how the run is executed. The only required fields are the model name and your group name, which is assigned at account creation and defaults to your email address. If you run with only these two parameters, the model runs without connecting to any Eggplant Functional scripts and only generates a path through the model.

If you want to connect to an Eggplant Functional suite, you must use the agent to establish that connection. This allows the Eggplant AI engine to connect to your Eggplant Functional scripts and to execute them. Use the alias you provided in the agent as the agentName parameter in your REST API run request, and enter the path to your Eggplant Functional suite in the suiteLocation parameter. These two parameters are required to connect to Eggplant Functional. Other options allow you to modify things like the number of iterations, logfile name, log directory, seed number, maximum number of actions, and replay flag. The directedTest parameter can be used to run specific test cases.

Method

POST -> http://localhost/api/run

Headers

Name Value
Authorization bearer <access_token>
Content-Type application/x-www-form-urlencoded

Body Parameters

Name Type Required Default Value
agentName Text No  
bins Integer No 100
coverdb Text No ttdb
covertarget Integer No 1
directedTest Text No  
execute true/false No True
group Text Yes  
iterations Integer No 1
logdir Text No logs
logfile Text No modelname_seed_date.log
maxActions Integer No 10000
modelName Text Yes  
onerror Text (clean | continue | immediate | debug) No clean
path Text No  
replay Integer No  
seed Integer No Random (1-999999)
suiteLocation Text No  
verbosity Text No 0x6b00

Possible Responses

Name Type Description
200 OK  
400 Bad request The required parameters were not sent
401 Unauthorized The access token was not valid.
403 Forbidden Not enough available concurrent user licenses.
403 Forbidden The current user doesn’t have access to the model requested.

Response Body JSON

Typical response:

{

"cmd": "eggplantAI –input \"BBCSport\" –group \"TestPlant (R&D)\" –seed 55037 –logdir \"logs\" –logfile \"BBCSport_55037_20180531165002.log\" –debug –supressDebugInstructions 2>&1",

"processid": 39170,

"id": "f2cc79a5-b8cc-4da0-ab3c-001f19b44554"

}

Name Type Description
cmd Text The command that was generated to run the Eggplant AI engine.
processid Integer The ID of the running process.
id Text The unique ID of the execution used for checking progress.

 

This topic was last updated on October 30, 2019, at 02:28:09 PM.

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