8d981c707aae20f461806288bc929f4fae8a6524 — Drew DeVault a day ago cd5978c master
Document builds.sr.ht artifacts API
1 files changed, 23 insertions(+), 0 deletions(-)

M builds.sr.ht/api.md
M builds.sr.ht/api.md => builds.sr.ht/api.md +23 -0
@@ 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.