NOTICE: This is the documentation for the legacy REST API. It is being replaced with the GraphQL API.
The builds.sr.ht API allows you to insert jobs, monitor their progress, and
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 and sr.ht-discuss mailing lists.
The following endpoints are available to users with an OAuth key valid for the specified scope.
Scopes: jobs:read
Returns a paginated list of job resources.
Scopes: jobs:write
Inserts a new job into the job queue.
{
"manifest": "string", The build manifest
"note": "string", Human-friendly description of this build
(markdown, optional)
"tags": [...], Arbitrary list of strings that identify this
build and can be used to navigate the
dashboard. Each string must use only
lowercase alphanumeric characters, or any
of "-_." (optional)
"execute": boolean, True to start the build immediately
(optional — defaults to true)
"secrets": boolean, True to provide secrets during the build
(optional — defaults to true)
}
Note: build manifests are YAML, which is machine editable. You are encouraged to edit it before submitting!
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",
},
...
]
}
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
}
Returns the original job's build manifest as plain text.
Starts a job that was created with execute=false
. Returns an empty JSON
object when successful.
Cancels a running job. Returns an empty JSON object when successful.
commit 93f98ec8f78010de4f1ef9edc6b89c11afce9216 Author: Conrad Hoffmann <ch@bitfehler.net> Date: 2024-09-24T17:03:25+02:00 ops: remove stale links to topology page