K8 HQ

Board publication — K8 HQ Content API

Board publication operations for K8 HQ Content API. Requests, permissions and responses.

Version 1OpenAPI description (JSON)

Browse operation groups

Before making requests, read the authentication and request requirements.

Write a task's progress back to its linked external issues, under the board's publication policy.

Writing to linked external issues (board item #187): the board's publication policy, tasks' milestone facts, the plan, publishing its templated milestone comments and closure, and people's own replies. Nothing is published without an explicit run.

Base URL

Base URLFor
https://api.k8hq.com/v1API tokens and the K8 HQ web app

Endpoints

Board publication

Preview what publishing an issue would write

GET/boards/{board}/intake/issues/{issue}/publication

The plan (each milestone comment's exact text, the closure and what it waits for) and what was already written, with provenance. Writes nothing. For anyone on the board.

For API tokens with boards:read and the web app.

Parameters

NameTypeDescription
board (path) requiredstringBoard ID (brd_…).
issue (path) requiredstringExternal issue ID on the board (xis_…).

Response body (JSON)

FieldTypeDescription
plan requiredPublicationPlan
written requiredOutwardWrite[]

Responses

StatusBodyMeaning
200JSONThe plan and the writes.
400application/problem+jsonThe request is malformed (invalid).
401application/problem+jsonNo token, or it expired: sign in again (unauthenticated).
403application/problem+jsonThe token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden).
404application/problem+jsonNot found, or not yours (not_found).
426application/problem+jsonK8 HQ has been updated. Reload this page.
429application/problem+jsonToo many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response.
503application/problem+jsonTemporary failure; try again (unavailable).

Publish to an external issue

POST/boards/{board}/intake/issues/{issue}/publish

Writes the plan previewed (its planHash, required; for tokens too: fetch the plan first) through the issue's source connection: each milestone comment the policy turns on, from its template, once per issue, milestone and task (retries and concurrent publishers never post twice), then, if the resolution rule holds for every linked task, a closing comment and the closure. Nothing from a task's text is published. For someone who may change the board, holding boards.issues.publish, allowed to use the connection now (a token: boards:write and connections:use, with its own authorization).

For API tokens with boards:write and the web app.

Parameters

NameTypeDescription
board (path) requiredstringBoard ID (brd_…).
issue (path) requiredstringExternal issue ID on the board (xis_…).
Idempotency-Key (header)stringUp to 255 characters; a retry with the same key gets the first response.

Request body (JSON)

FieldTypeDescription
planHash requiredstringThe planHash of the plan previewed (GET …/publication).

Response body (JSON)

FieldTypeDescription
closed requiredboolean
plan requiredPublicationPlan
written requiredOutwardWrite[]

Responses

StatusBodyMeaning
200JSONWhat was written.
400application/problem+jsonThe request is malformed (invalid).
401application/problem+jsonNo token, or it expired: sign in again (unauthenticated).
402application/problem+jsonThe organization is read-only (read_only, design note 0024): it has been out of credit for 60 days, so nothing can be changed until an owner adds credit.
403application/problem+jsonThe token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden).
404application/problem+jsonNot found, or not yours (not_found).
409application/problem+jsonWhat it would write changed since the preview (plan_changed, with the fresh plan; nothing written), the connection isn't available (connection_unavailable) or can't write the repository's issues, the source was removed, or another publisher is writing (in_progress).
426application/problem+jsonK8 HQ has been updated. Reload this page.
429application/problem+jsonToo many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response.
503application/problem+jsonTemporary failure; try again (unavailable).

Reply on an external issue

POST/boards/{board}/intake/issues/{issue}/replies

Posts the person's own text on the issue, once for the reply's ID (xpc_, minted by the browser: a retry answers the reply as posted; other text under it is a conflict). No closing keywords. For a person signed in holding boards.issues.publish, allowed to use the connection; the app shows the text before it's sent.

For the web app.

Parameters

NameTypeDescription
board (path) requiredstringBoard ID (brd_…).
issue (path) requiredstringExternal issue ID on the board (xis_…).
Idempotency-Key (header)stringUp to 255 characters; a retry with the same key gets the first response.

Request body (JSON)

FieldTypeDescription
id requiredstring
text requiredstring

Response body (JSON)

FieldTypeDescription
bodyHash requiredstringSHA-256 of what was posted (a reply's text isn't kept).
by requiredstring
claimedAt requiredstring
connection requiredstring
id requiredstringxpc_
issue requiredstring
kind requiredmilestone | reply | closure
schemaVersion requiredinteger
state requiredposting | posted | closed
via requiredstring
commentstringThe provider's comment ID.
itemstring
milestonestring
postedAtstring
templateinteger
urlstring

Responses

StatusBodyMeaning
200OutwardWriteThe reply's write.
400application/problem+jsonThe request is malformed (invalid).
401application/problem+jsonNo token, or it expired: sign in again (unauthenticated).
402application/problem+jsonThe organization is read-only (read_only, design note 0024): it has been out of credit for 60 days, so nothing can be changed until an owner adds credit.
403application/problem+jsonThe token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden).
404application/problem+jsonNot found, or not yours (not_found).
409application/problem+jsonThat ID was used for other text, the connection can't write, or another publisher is writing (in_progress).
413application/problem+jsonThe text is too long.
426application/problem+jsonK8 HQ has been updated. Reload this page.
429application/problem+jsonToo many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response.
503application/problem+jsonTemporary failure; try again (unavailable).

Read a board's publication policy

GET/boards/{board}/intake/publication

Which milestones are commented on linked issues and the resolution rule. For anyone on the board.

For API tokens with boards:read and the web app.

Parameters

NameTypeDescription
board (path) requiredstringBoard ID (brd_…).

Response body (JSON)

FieldTypeDescription
milestones requiredtracked | integrated | promoted | released | deployed[]
resolution requiredoff | integrated | promoted | released | deployed
schemaVersion requiredinteger
version requiredinteger
setAtstring
setBystring

Responses

StatusBodyMeaning
200PublicationPolicyThe policy.
400application/problem+jsonThe request is malformed (invalid).
401application/problem+jsonNo token, or it expired: sign in again (unauthenticated).
403application/problem+jsonThe token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden).
404application/problem+jsonNot found, or not yours (not_found).
426application/problem+jsonK8 HQ has been updated. Reload this page.
429application/problem+jsonToo many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response.
503application/problem+jsonTemporary failure; try again (unavailable).

Set a board's publication policy

PUT/boards/{board}/intake/publication

Turns milestone comments on or off and sets the resolution rule: off (K8 HQ never closes issues; the default), or the milestone every linked task must reach. For a person signed in holding boards.issues.publish on the board. Nothing is published until someone publishes an issue.

For the web app.

Parameters

NameTypeDescription
board (path) requiredstringBoard ID (brd_…).
Idempotency-Key (header)stringUp to 255 characters; a retry with the same key gets the first response.

Request body (JSON)

FieldTypeDescription
milestones requiredtracked | integrated | promoted | released | deployed[]
resolution requiredstring
version requiredinteger

Response body (JSON)

FieldTypeDescription
milestones requiredtracked | integrated | promoted | released | deployed[]
resolution requiredoff | integrated | promoted | released | deployed
schemaVersion requiredinteger
version requiredinteger
setAtstring
setBystring

Responses

StatusBodyMeaning
200PublicationPolicyThe policy.
400application/problem+jsonThe request is malformed (invalid).
401application/problem+jsonNo token, or it expired: sign in again (unauthenticated).
402application/problem+jsonThe organization is read-only (read_only, design note 0024): it has been out of credit for 60 days, so nothing can be changed until an owner adds credit.
403application/problem+jsonThe token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden).
404application/problem+jsonNot found, or not yours (not_found).
409application/problem+jsonA request with the same Idempotency-Key is still running (in_progress).
412application/problem+jsonThe policy changed since that version (version_mismatch).
426application/problem+jsonK8 HQ has been updated. Reload this page.
429application/problem+jsonToo many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response.
503application/problem+jsonTemporary failure; try again (unavailable).

List a task's milestones

GET/boards/{board}/items/{item}/milestones

The task's recorded milestone facts. For anyone on the board.

For API tokens with boards:read and the web app.

Parameters

NameTypeDescription
board (path) requiredstringBoard ID (brd_…).
item (path) requiredstringItem ID (itm_…).

Response body (JSON)

FieldTypeDescription
item requiredstring
milestones requiredMilestoneFact[]

Responses

StatusBodyMeaning
200JSONThe facts.
400application/problem+jsonThe request is malformed (invalid).
401application/problem+jsonNo token, or it expired: sign in again (unauthenticated).
403application/problem+jsonThe token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden).
404application/problem+jsonNot found, or not yours (not_found).
426application/problem+jsonK8 HQ has been updated. Reload this page.
429application/problem+jsonToo many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response.
503application/problem+jsonTemporary failure; try again (unavailable).

Record a task's milestone

PUT/boards/{board}/items/{item}/milestones/{milestone}

Records that the task reached the milestone, with an optional evidence reference (a commit or ref name). The first record stands (200 again). It publishes nothing by itself. For anyone who may change the board.

For API tokens with boards:write and the web app.

Parameters

NameTypeDescription
board (path) requiredstringBoard ID (brd_…).
item (path) requiredstringItem ID (itm_…).
milestone (path) requiredintegrated | promoted | released | deployedintegrated, promoted, released or deployed.
Idempotency-Key (header)stringUp to 255 characters; a retry with the same key gets the first response.

Request body (JSON)

FieldTypeDescription
evidencestring

Response body (JSON)

FieldTypeDescription
at requiredstring
by requiredstring
item requiredstring
milestone requiredstring
schemaVersion requiredinteger
via requiredstringperson, or the token (tok_).
evidencestringA commit or ref name.

Responses

StatusBodyMeaning
200MilestoneFactAlready recorded.
201MilestoneFactRecorded.
400application/problem+jsonThe request is malformed (invalid).
401application/problem+jsonNo token, or it expired: sign in again (unauthenticated).
402application/problem+jsonThe organization is read-only (read_only, design note 0024): it has been out of credit for 60 days, so nothing can be changed until an owner adds credit.
403application/problem+jsonThe token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden).
404application/problem+jsonNot found, or not yours (not_found).
409application/problem+jsonThe task is in Trash, or a request with the same Idempotency-Key is still running (in_progress).
426application/problem+jsonK8 HQ has been updated. Reload this page.
429application/problem+jsonToo many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response.
503application/problem+jsonTemporary failure; try again (unavailable).

Retract a task's milestone

DELETE/boards/{board}/items/{item}/milestones/{milestone}

Removes a fact recorded in error. What was published stays. For anyone who may change the board.

For API tokens with boards:write and the web app.

Parameters

NameTypeDescription
board (path) requiredstringBoard ID (brd_…).
item (path) requiredstringItem ID (itm_…).
milestone (path) requiredintegrated | promoted | released | deployedintegrated, promoted, released or deployed.
Idempotency-Key (header)stringUp to 255 characters; a retry with the same key gets the first response.

Responses

StatusBodyMeaning
204Retracted.
400application/problem+jsonThe request is malformed (invalid).
401application/problem+jsonNo token, or it expired: sign in again (unauthenticated).
402application/problem+jsonThe organization is read-only (read_only, design note 0024): it has been out of credit for 60 days, so nothing can be changed until an owner adds credit.
403application/problem+jsonThe token lacks the scope (scope_missing), the container is zero-access (zero_access), or the caller may not use this operation (forbidden).
404application/problem+jsonNot found, or not yours (not_found).
409application/problem+jsonA request with the same Idempotency-Key is still running (in_progress).
426application/problem+jsonK8 HQ has been updated. Reload this page.
429application/problem+jsonToo many requests (rate_limited). The token is paused until midnight UTC if it goes over its daily request or download limit, or reaches its daily recipient limit. A message with more recipients than the token has left today is refused. If the token has some recipients left, you can send to fewer. Too many attempts with a wrong token also return this response.
503application/problem+jsonTemporary failure; try again (unavailable).