This folder contains executeREST.py, a minimal Python client that sends a JSON payload to a Corticon Server REST endpoint.
- Create and activate a virtual environment.
- Install dependencies.
- Update endpoint and payload path values in
executeREST.py. - Run the script and review the JSON response.
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install requests
python executeREST.pyEdit these variables in executeREST.py:
corticonServerProtocol: usehttpswhen SSL/TLS is enabled.corticonServerAddress: target host name or IP.corticonServerPort: server listening port (for example8080).corticonServerPath: endpoint path (for example/axis/corticon/execute).
- Create a JSON payload file (for example
input.json). - Update
jsonFilePathinexecuteREST.pyto your payload location.
If your API requires authentication, add the appropriate header to the requests.post(...) call. For example:
headers={
'Content-type': 'application/json',
'Authorization': 'Bearer <token>'
}- README terminology now matches the actual script file (
executeREST.py). - Existing directory names and slugs are unchanged.