You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 82c19c8
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: examples/server/api.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1839,6 +1839,7 @@ the working directory's ./dgl directory unless --dgl-dir is set.
1839
1839
| POST /sdcpp/v1/dgl/script | Saves UTF-8 source with the given name. Pass previous_source to update an existing script. A conflict returns HTTP 409. |
1840
1840
| POST /sdcpp/v1/dgl/jobs | Queues the source string and returns a job ID with HTTP 202 |
1841
1841
| GET /sdcpp/v1/dgl/jobs/{id} | Returns the job status, error or result with tensor descriptions and inline encoded media |
1842
+
| POST /sdcpp/v1/dgl/jobs/{id}/cancel | Cancels a queued job or requests cancellation of a running job. Send `Content-Type: application/json`. |
1842
1843
| GET /sdcpp/v1/dgl/jobs/{id}/outputs/{index}?frame=0 | Returns a PNG of an image output or a video frame. Output and frame indexes start at zero. |
1843
1844
1844
1845
Failed jobs report `error.code` and `error.message`. When execution reports
@@ -1849,6 +1850,12 @@ Scripts share the component cache and execution settings used for generation.
1849
1850
Model reads are restricted to the configured model directories. Script writes
1850
1851
are restricted to output/ in the server's working directory.
1851
1852
1853
+
Cancellation returns the current job status with HTTP 200. A queued job
1854
+
becomes `cancelled` immediately. A running job sets the `cancel_requested`
1855
+
flag. Poll the status endpoint until it reports `cancelled`. Execution stops
1856
+
at a DGL cancellation check, so an operation currently running may have to
1857
+
finish first. A terminal job returns its current status.
1858
+
1852
1859
### Encoded DGL results
1853
1860
1854
1861
The existing job result has `type`, `outputs` and `media`. `outputs` retains
0 commit comments