User Tools


Get Project Definition

Back to JEA API docs


The Get Project Definition command retrieves the latest project definition in a Update Command object ready to be modified. A valid JWT token must be included in the header, or the transaction will be rejected with an HTTP 401 Unauthorized error code.

Synopsis

Example using curl://

To send the Project Report command using curl:

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

On successful operation, an Command object for Update operation 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 a report of the 'circle' project 
r = requests.get('http://jea.ensims.com/jea_web/api/definition/circle', headers=headers, json=body)
  
r.json()


Site Tools