User Tools


Get Project Status

Back to JEA API docs


The Get Project Status command retrieves a status object about the specified project. A valid JWT token must be included in the header, or the transaction will be rejected with an HTTP 401 Unauthorized error code.

Synopsis

Project Status

A Project Status report example is shown below:

{
  "projectName": "my_project",
  "status": "Evolving",
  "generations": 1,
  "solutions": 10,
  "ok": true,
  "description": "Engine is running. Current generation: 0, solutions explored: 10"
}

The JSON object contains the following fields:

  • ok - Status is ok or not
  • projectName - reference to the current project
  • status - Engine status code. It is one of the following, as shown in the Engine States Diagram:
    • Unknown - Engine does not exist or certain error states
    • Created - Engine created and configured
    • Initialzing - Running the first generation, which is normally randomly sampled and can have a different population size
    • Evolving - Evolution on-going
    • Paused - Evolution process on-hold
    • Terminated - Evolution process terminated, either on completion (including budget limit reached), or on user's command
    • Canceled - Evolution process cancelled, on user's command
  • description - Textual description of the status
  • Generations - number of generations has completed. This equals to the current/next generation number as JEA's zero-based
  • Solutions - number of solutions have been explored.

Example using curl://

To send the Project Status command using curl:

curl -H "Authorization:Bearer eyJraWQiOiIxNT...9gjFXUrpQ"  http://jea.ensims.com/jea_web/api/status/circle

On successful operation, an engine response object is returned. If the existing JWT is invalid, an HTTP 401 Unauthorized code will be returned.

Example using Python Requests

Make sure Requests is correctly installed in your Python environment, and run the following the lines:

import requests

jwt = 'eyJraWQiOiIxNTAy...yBqDDTkfjmsQons9gjFXUrpQ'
headers = {'Authorization': 'Bearer ' + jwt}
body = {}

# Get the status of the 'circle' project 
r = requests.get('http://jea.ensims.com/jea_web/api/status/circle', headers=headers, json=body)
  
r.json()


Site Tools