Jobs API cleanup

This commit is contained in:
Brett Williams
2026-06-06 08:01:48 -05:00
parent d49cd9df79
commit 5e154b6bab
6 changed files with 53 additions and 52 deletions
+12 -12
View File
@@ -288,7 +288,7 @@
</article>
<article class="endpoint">
<div class="endpoint-header"><span class="method get">GET</span><span class="path">/api/jobs_long_poll</span></div>
<div class="endpoint-header"><span class="method get">GET</span><span class="path">/api/jobs/long_poll</span></div>
<p>Long-polls the job list until the supplied cache token changes or 30 seconds elapse.</p>
<table>
<tr><th>Query Parameter</th><th>Required</th><th>Description</th></tr>
@@ -298,30 +298,30 @@
</article>
<article class="endpoint">
<div class="endpoint-header"><span class="method get">GET</span><span class="path">/api/jobs/&lt;status_val&gt;</span></div>
<div class="endpoint-header"><span class="method get">GET</span><span class="path">/api/jobs/status/&lt;status_val&gt;</span></div>
<p>Returns jobs matching a render status converted by <code>string_to_status()</code>.</p>
<div class="note">No <code>RenderServerProxy</code> wrapper or in-repo caller was found.</div>
</article>
<article class="endpoint">
<div class="endpoint-header"><span class="method get">GET</span><span class="path">/api/job/&lt;job_id&gt;</span></div>
<div class="endpoint-header"><span class="method get">GET</span><span class="path">/api/jobs/&lt;job_id&gt;</span></div>
<p>Returns one job as JSON.</p>
<p>Known callers include <code>RenderServerProxy.get_job_info()</code>, <code>add_job.py</code>, <code>src/ui/main_window.py</code>, <code>src/distributed_job_manager.py</code>, and <code>tests/job_creation_tests.py</code>.</p>
</article>
<article class="endpoint">
<div class="endpoint-header"><span class="method get">GET</span><span class="path">/api/job/&lt;job_id&gt;/logs</span></div>
<div class="endpoint-header"><span class="method get">GET</span><span class="path">/api/jobs/&lt;job_id&gt;/logs</span></div>
<p>Returns the job log file as <code>text/plain</code>. The main window opens this URL directly.</p>
</article>
<article class="endpoint">
<div class="endpoint-header"><span class="method get">GET</span><span class="path">/api/job/&lt;job_id&gt;/file_list</span></div>
<div class="endpoint-header"><span class="method get">GET</span><span class="path">/api/jobs/&lt;job_id&gt;/files</span></div>
<p>Returns a list of output filenames for the job.</p>
<p>Known callers: <code>RenderServerProxy.get_job_files_list()</code> and <code>src/utilities/server_helper.py</code>.</p>
</article>
<article class="endpoint">
<div class="endpoint-header"><span class="method get">GET</span><span class="path">/api/job/&lt;job_id&gt;/download</span></div>
<div class="endpoint-header"><span class="method get">GET</span><span class="path">/api/jobs/&lt;job_id&gt;/download</span></div>
<p>Downloads one output file.</p>
<table>
<tr><th>Query Parameter</th><th>Required</th><th>Description</th></tr>
@@ -331,13 +331,13 @@
</article>
<article class="endpoint">
<div class="endpoint-header"><span class="method get">GET</span><span class="path">/api/job/&lt;job_id&gt;/download_all</span></div>
<div class="endpoint-header"><span class="method get">GET</span><span class="path">/api/jobs/&lt;job_id&gt;/download_all</span></div>
<p>Creates a temporary zip of the job output directory and downloads it.</p>
<p>Known callers: <code>RenderServerProxy.download_all_job_files()</code>, <code>src/ui/main_window.py</code>, and <code>src/utilities/server_helper.py</code>.</p>
</article>
<article class="endpoint">
<div class="endpoint-header"><span class="method get">GET</span><span class="path">/api/job/&lt;job_id&gt;/thumbnail</span></div>
<div class="endpoint-header"><span class="method get">GET</span><span class="path">/api/jobs/&lt;job_id&gt;/thumbnail</span></div>
<p>Returns a generated preview image or video for a job.</p>
<table>
<tr><th>Query Parameter</th><th>Required</th><th>Description</th></tr>
@@ -369,7 +369,7 @@
</article>
<article class="endpoint">
<div class="endpoint-header"><span class="method post">POST</span><span class="path">/api/job/&lt;job_id&gt;/cancel</span></div>
<div class="endpoint-header"><span class="method post">POST</span><span class="path">/api/jobs/&lt;job_id&gt;/cancel</span></div>
<p>Cancels a job. Requires a truthy <code>confirm</code> query parameter.</p>
<table>
<tr><th>Query Parameter</th><th>Required</th><th>Description</th></tr>
@@ -379,7 +379,7 @@
</article>
<article class="endpoint">
<div class="endpoint-header"><span class="method post">POST</span><span class="path">/api/job/&lt;job_id&gt;/delete</span></div>
<div class="endpoint-header"><span class="method post">POST</span><span class="path">/api/jobs/&lt;job_id&gt;/delete</span></div>
<p>Deletes a job, stops it first, deletes previews, and removes owned upload/output directories when safe.</p>
<table>
<tr><th>Query Parameter</th><th>Required</th><th>Description</th></tr>
@@ -388,7 +388,7 @@
</article>
<article class="endpoint">
<div class="endpoint-header"><span class="method post">POST</span><span class="path">/api/job/&lt;job_id&gt;/send_subjob_update_notification</span></div>
<div class="endpoint-header"><span class="method post">POST</span><span class="path">/api/jobs/&lt;job_id&gt;/subjob_update</span></div>
<p>Notifies a parent job that a child/subjob changed state. The request body is the JSON representation of the subjob.</p>
</article>
</section>
@@ -571,7 +571,7 @@
<div class="panel" style="margin-top: 14px;">
<h3>Routes With No In-Repo Callers Found</h3>
<ul>
<li><code>GET /api/jobs/&lt;status_val&gt;</code></li>
<li><code>GET /api/jobs/status/&lt;status_val&gt;</code></li>
<li><code>GET /api/presets</code></li>
<li><code>GET /api/disk_benchmark</code></li>
<li><code>GET /api/engines/&lt;engine_name&gt;/args</code></li>