meta data for this page
Get Project Status
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
- Method: GET
- Target: https://api.ensims.com/jea_web/api/status/<project ID>
- Header: Authorization “Bearer <existing JWT>”
- Body: none
- Success: Project Status
- Error: HTTP 401 - Unauthorized
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 notprojectName
- reference to the current projectstatus
- Engine status code. It is one of the following, as shown in the Engine States Diagram:Unknown
- Engine does not exist or certain error statesCreated
- Engine created and configuredInitialzing
- Running the first generation, which is normally randomly sampled and can have a different population sizeEvolving
- Evolution on-goingPaused
- Evolution process on-holdTerminated
- Evolution process terminated, either on completion (including budget limit reached), or on user's commandCanceled
- Evolution process cancelled, on user's command
description
- Textual description of the statusGenerations
- number of generations has completed. This equals to the current/next generation number as JEA's zero-basedSolutions
- number of solutions have been explored.
Example using curl://
To send the Project Status command using curl:
curl -b cookies https://api.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 # Make a request with the stored cookies from the log on transaction # Get the status of the 'circle' project r = requests.get('https://api.ensims.com/jea_web/api/status/circle', cookies=cookies) r.json()