REST API endpoint streamlining and cleanup (#133)

* Consolidate engine_info api calls

* Change api methods to use POST when possible

* Delete engine API cleanup

* Remove redundant installed_engines endpoint

* Update proxy to use similar named methods to new API calls

* More API cleanup

* Jobs API cleanup

* More jobs API cleanup

* Fix add jobs error due to null queue

* Remove unnecessary full_status and snapshot API endpoints

* Streamline add job POST endpoint

* Fix test after method name change
This commit is contained in:
2026-06-06 12:04:52 -05:00
committed by GitHub
parent 24eb7b5616
commit f0be78adcc
15 changed files with 1255 additions and 203 deletions
+23 -11
View File
@@ -83,18 +83,24 @@ The system works by:
Jobs can be submitted via the desktop UI or programmatically via the API:
- **Via UI**: Use the desktop interface to upload project files, specify render settings, and queue jobs.
- **Via API**: Send POST requests to `/api/jobs` with job configuration in JSON format.
- **Via API**: Send `POST` requests to `/api/jobs` with job configuration in JSON format.
Example API request:
```bash
curl -X POST http://localhost:5000/api/jobs \
curl -X POST http://localhost:8080/api/jobs \
-H "Content-Type: application/json" \
-d '{
"engine": "blender",
"project_path": "/path/to/project.blend",
"output_path": "/path/to/output",
"frames": "1-100",
"settings": {"resolution": "1920x1080"}
"name": "example-render",
"engine_name": "blender",
"local_path": "/path/to/project.blend",
"output_path": "example-output",
"start_frame": 1,
"end_frame": 100,
"args": {
"export_format": "PNG",
"resolution": [1920, 1080]
},
"enable_split_jobs": false
}'
```
@@ -103,9 +109,15 @@ curl -X POST http://localhost:5000/api/jobs \
- **UI**: View job status, progress, logs, and worker availability in real-time.
- **API Endpoints**:
- `GET /api/jobs`: List all jobs
- `GET /api/jobs/{id}`: Get job details
- `DELETE /api/jobs/{id}`: Cancel a job
- `GET /api/workers`: List connected workers
- `POST /api/jobs`: Submit a new job
- `GET /api/jobs/<job_id>`: Get job details
- `POST /api/jobs/<job_id>/cancel`: Cancel a job
- `POST /api/jobs/<job_id>/delete`: Delete a job
- `GET /api/status`: Get server and queue status
- `GET /api/engines`: List engine information
For the full endpoint reference, see [`docs/api.html`](docs/api.html) or
[`docs/API.md`](docs/API.md).
#### Worker Management
@@ -193,4 +205,4 @@ Zordon is licensed under the MIT License. See the [LICENSE](LICENSE.txt) file fo
## Notice
This software is in beta and intended for casual/hobbyist use. Not recommended for mission-critical environments.
This software is in beta and intended for casual/hobbyist use. Not recommended for mission-critical environments.