aboutsummaryrefslogtreecommitdiffstats
path: root/builds.sr.ht/api.md
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-12-03 12:40:45 -0500
committerDrew DeVault <sir@cmpwn.com>2017-12-03 12:40:45 -0500
commit87cac8d029c50d25e2d5010c0a2584ed5928b50b (patch)
treea5ddf16b24fce8f41bdfb78020f287a3c08c888b /builds.sr.ht/api.md
parentfbacd2222f254e57292b0d058abb7987b87a977b (diff)
downloadsr.ht-docs-87cac8d029c50d25e2d5010c0a2584ed5928b50b.tar.gz
Add another builds endpoint
Diffstat (limited to 'builds.sr.ht/api.md')
-rw-r--r--builds.sr.ht/api.md38
1 files changed, 38 insertions, 0 deletions
diff --git a/builds.sr.ht/api.md b/builds.sr.ht/api.md
index 74e7e03..36fa40e 100644
--- a/builds.sr.ht/api.md
+++ b/builds.sr.ht/api.md
@@ -4,6 +4,9 @@ brokered by meta.sr.ht. This API uses standard sr.ht error responses.
# API Endpoints
+The following endpoints are available to users with an OAuth key valid for the
+specified scope.
+
## POST /api/jobs
**Scopes**: jobs:write
@@ -37,3 +40,38 @@ Inserts a new job into the job queue.
"execute": boolean, True to start the build immediately
(optional - defaults to true)
}
+
+## GET /api/jobs/:id
+
+Gets information about a job by its ID.
+
+**Scopes**: jobs:read
+
+ {
+ "id": integer,
+ "status": "job status enum",
+ "setup_log": "url", URL to captured stdout/stderr of setup
+ "tasks": [
+ {
+ "name": "setup",
+ "status": "task status enum"
+ "log": "url",
+ },
+ ...
+ ]
+ }
+
+### Job status enum
+
+- pending: waiting for user intervention to start
+- queued: queued to start when a worker is available
+- running: job is in-progress
+- success: build completed without errors
+- failed: build completed with errors
+
+### Task status enum
+
+- pending: waiting for earlier tasks to complete
+- running: task is in-progress
+- success: task completed without errors
+- failed: task completed with errors