User Tools


Get Project Data

Back to JEA API docs


The Get Project Data command retrieves either the whole data archive, or the part after the specified model version and generation, of a given project. The Data Archive object contains all the information about the history of the project that the JEA engine holds.

A valid JWT token must be included in the header, or the transaction will be rejected with an HTTP 401 Unauthorized error code.

Synopsis

Data Archive

The Data Archive object represent all the data that the JEA engine holds about the a project. These include the project definitions, solution details and stats, and the exploration history.

The details of this JSON object are provided here.

Example using curl://

To send the Project Data command using curl:

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

Or, to get the new project data after generation 15:

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

On successful operation, a Data Archive object is returned. This object can be modified and submitted to update the project. 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 whole data archive of the 'circle' project 
r = requests.get('http://jea.ensims.com/jea_web/api/data/circle', headers=headers, json=body)
  
# Get the data archive of the 'circle' project after generation 15
r = requests.get('http://jea.ensims.com/jea_web/api/data/circle/15', headers=headers, json=body)
  
r.json()


Site Tools