aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2020-02-26 14:36:57 -0500
committerDrew DeVault <sir@cmpwn.com>2020-02-26 14:37:18 -0500
commit8d981c707aae20f461806288bc929f4fae8a6524 (patch)
tree728578f1f6563b342a12c56d09f7d7a23ca6dcd8
parentcd5978c11b5eb9aeca31e2d9cebd283acbd2aba3 (diff)
downloadsr.ht-docs-8d981c707aae20f461806288bc929f4fae8a6524.tar.gz
Document builds.sr.ht artifacts API
-rw-r--r--builds.sr.ht/api.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/builds.sr.ht/api.md b/builds.sr.ht/api.md
index 2d72dc1..e6f722f 100644
--- a/builds.sr.ht/api.md
+++ b/builds.sr.ht/api.md
@@ -7,6 +7,10 @@ access some information about the build system. Authentication to this API is
brokered by meta.sr.ht. This API uses standard sr.ht error responses. All
requests should be submitted via https://builds.sr.ht.
+**Notice**: the builds.sr.ht API is due for an overhaul in the foreseeable
+future; be prepared for it to change. The changes will be announced in advance
+on the [sr.ht-announce][announce] and [sr.ht-discuss][discuss] mailing lists.
+
# API Endpoints
The following endpoints are available to users with an OAuth key valid for the
@@ -95,6 +99,25 @@ Gets information about a job by its ID.
- **success**: task completed without errors
- **failed**: task completed with errors
+## GET /api/jobs/:id/artifacts
+
+Returns a paginated list of artifact resources created by this job.
+
+**Scopes**: jobs:read
+
+Artifact resource:
+
+```
+{
+ "id": integer,
+ "created": timestamp,
+ "path": /original/filepath/in/guest,
+ "name": basename,
+ "url": URL from which the artifact may be downloaded,
+ "size": size in bytes
+}
+```
+
## GET /api/jobs/:id/manifest
Returns the original job's build manifest as plain text.