Skip to content

api(service-tokens): document organisation service tokens - #999

Closed
sebartyr wants to merge 3 commits into
mainfrom
api-service-tokens
Closed

api(service-tokens): document organisation service tokens#999
sebartyr wants to merge 3 commits into
mainfrom
api-service-tokens

Conversation

@sebartyr

Copy link
Copy Markdown
Member

Adds a page documenting organisation service tokens, the Biscuit-based machine-to-machine credentials for CI/CD pipelines, monitoring tools and scripts.

Content

  • content/api/service-tokens.md: scope and limitations, the four endpoints under /v2/organisations/{id}/service-tokens, creation fields and response, bearer and git-over-HTTP authentication, security boundaries.
  • content/api/_index.md: a card linking to the page.
  • content/api/howto.md: service tokens listed alongside API tokens and OAuth 1, which moves that section from two authentication mechanisms to three.

Why this stays a draft

Two things need to land before this can be merged, both tracked in an HTML comment at the top of the page:

  1. The backend is unreachable in production. Every /service-tokens endpoint answers 502 with {"id":21002,"message":"Failed to communicate with token service"}, in read as well as in write. The same OAuth 1 signature returns 200 on /v2/self, so authentication is fine and the failure is downstream, in the token-api dependency. Publishing now would document endpoints that fail for every reader.

  2. The CLI commands are not released. clever service-tokens (create, get, list, revoke) lives in feat: add service-tokens command clever-tools#1080, still a draft. Its files claim since: 4.8.0 while master is at 4.11.0, so that marker needs a refresh before it ships. The CLI section should be added here once it is released.

Field naming to confirm

The request and response fields follow the implementation in that CLI PR rather than the original spec: resources, an array of application or add-on IDs, where the spec described a single app_id. The response shape { token, metadata: { id, expiredAt } } and the fact that the biscuit is only returned at creation also come from that code. Both need confirming against the API once it answers.

Vale and markdownlint pass on the three files. Hugo was not available locally, so the build has not been verified; the page uses no shortcode.

Add a page covering organisation service tokens: scope and limitations,
the CRUD endpoints under /v2/organisations/{id}/service-tokens, token
creation fields, bearer and git-over-HTTP authentication, and security
boundaries.

Link the page from the API index and list service tokens alongside API
tokens and OAuth 1 in the API overview.
Replace app_id with the resources array, add the description field, and
document the creation response along with the fact that the biscuit is
only returned once, following the clever service-tokens implementation.

Add a hidden note listing what to confirm before publishing: the token-api
backend answering 502, and the CLI command set still being an unreleased
draft PR.
@sebartyr
sebartyr deployed to update doc August 25, 2026 13:36 — with GitHub Actions Active
@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown

👋` Review app deleted

You closed this PR and deleted the review app.

@sebartyr
sebartyr force-pushed the api-service-tokens branch from 2dcc1e4 to b04f841 Compare August 25, 2026 13:37
@sebartyr
sebartyr deployed to update doc August 25, 2026 13:37 — with GitHub Actions Active
@davlgd

davlgd commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

This is already being done in #911, and aligned with integrations.

@sebartyr sebartyr closed this Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants