meta data for this page
Pause Project
The Pause Project command puts the exploration process of an existing project on hold until a Resume command is issued subsequently. A valid JWT token must be included in the header, otherwise, the transaction will be rejected with an HTTP 401 Unauthorized error code. The result of the operation will be reported in an Engine Response object.
Synopsis
- Method: GET
- Target: https://api.ensims.com/jea_web/api/pause/<projectId>
- Header: Authorization “Bearer <existing JWT>”
- Body: none
- Success: Engine Response
- Error: HTTP 401 - Unauthorized
Engine Response
Result of the operation is returned as an engine response object as seen in the example here:
{ "description": "Pause flag set for project circle. Engine will pause after the current generation.", "ok": true }
If the project is not accessible or is in a state that cannot be paused, the response may look like:
{ "description": "Project \"circle\" does not exist or not accessible to user \"yi@jeplus.org\".", "ok": false }
Example using curl://
To send the Pause Project command using curl:
curl -H "Authorization:Bearer eyJraWQiOiIxNTAyMzE2Mz...Qons9gjFXUrpQ" https://api.ensims.com/jea_web/api/pause/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 # Pause 'circle' project # Make a request with the stored cookies from the log on transaction r = requests.get('https://api.ensims.com/jea_web/api/pause/circle', cookies=cookies) r.json()