aitododocs Coming soonAutonomous delivery

Store API

Markdown

One store's endpoints, for local and dev runs.

Referenceabout 8 min
On this page

Served only with AITODO_STORE_API=1 (tickets, groups, milestones, releases, decisions, docs, gotchas, templates, graph, workspace config, index), they answer what tkt … --json prints.

Details7 items

They take no token, so a request that came in on a network address gets 404 (forwarded headers do not change that), and the container refuses to start with AITODO_STORE_API=1.

Example:

Code
curl -s http://127.0.0.1:8000/v1/tickets?status=todo
curl -s -X POST http://127.0.0.1:8000/v1/tickets -H 'content-type: application/json' \
  -d '{"title": "First ticket", "groups": ["payments"]}'
  • Milestones: every tkt milestone subcommand has a REST counterpart with the same validation, error codes and JSON shape. GET /v1/milestones/{milestone_id} includes the hints of tkt lint milestone://…; GET …/plan?from=… is tkt milestone plan, and --apply is a POST of the add suggestions to …/tickets. DELETE /v1/tickets/{ticket_id} names the milestones the ticket left in the X-Removed-From-Milestones header.
  • Decisions: the same objects as tkt decision … --json. GET /v1/decisions filters: ?status=&affects=. PATCH /v1/decisions/{decision_id}: a relationship list replaces that type, [] empties it, "until": null clears it.
  • Docs and gotchas: read only. GET /v1/docs, …/{doc_id} (?anchor=) and …/{doc_id}/refs answer as tkt doc … --json; /v1/gotchas as tkt gotcha … --json. Writes go through the forwarded CLI (POST /v1/projects/{project_id}/cli), which also reports their impact.
  • Picking up work: GET /v1/tickets:next (filters: milestone, group, type, assignee) ranks the startable tickets; POST /v1/tickets:next {"assignee": "…"} claims the top one atomically and returns its bundle; POST /v1/tickets/{ticket_id}:release gives it back (someone else's claim: ERR_ALREADY_CLAIMED, 409, unless "force": true). REST does not read git claims (the server has no git): /v1/tickets:next never reports claimed_elsewhere; use tkt next and tkt ticket claims in a worktree.

Store API endpoints#

endpointsummaryrole
POST /v1/groupscreate group
GET /v1/groups/{group_id}get group
GET /v1/groupslist groups
PATCH /v1/groups/{group_id}update group
DELETE /v1/groups/{group_id}delete group
POST /v1/ticketscreate ticket
GET /v1/tickets/{ticket_id}/rawget ticket raw
GET /v1/tickets/{ticket_id}get ticket bundle
POST /v1/tickets:importCreate a whole plan of tickets, key-referenced dependencies included (#43)
GET /v1/tickets:nextThe next startable ticket, the ranked candidates and why the rest are skipped (#100)
POST /v1/tickets:nextClaim the next startable ticket: assignee + todo → in_progress, atomically; returns its Context Bundle
POST /v1/tickets/{ticket_id}:releaseGive a claimed ticket back (in_progress → todo, assignee cleared); someone else's claim needs force (ERR_ALREADY_CLAIMED, 409) (#100)
POST /v1/tickets/{ticket_id}:moveMove a ticket to another primary group: new id, every reference rewritten (#62)
POST /v1/tickets/{ticket_id}:resolveRe-resolve refs and re-run the context guard
PATCH /v1/tickets/{ticket_id}update ticket
DELETE /v1/tickets/{ticket_id}delete ticket
GET /v1/ticketslist tickets
GET /v1/tickets/{ticket_id}/context-referencesget ticket context references
POST /v1/context-references:resolveresolve context reference
POST /v1/index:rebuildrebuild index
GET /v1/index/statusindex status
GET /v1/workspace/configEvery known config.yaml key with its value and source (file / default)
PATCH /v1/workspace/configSet keys (null unsets one); all or nothing: a bad key or value is 422 and nothing is written
GET /v1/templateslist templates
GET /v1/templates/{ticket_type}get template
GET /v1/tickets/{ticket_id}/graphHierarchy + dependencies around a ticket (an epic brings its children)
GET /v1/groups/{group_id}/graphEvery ticket of a group, clustered by epic
GET /v1/graphThe whole workspace, clustered by group (no depth: everything is already in); with ref, the links around one store item that is not a ticket, depth hops out
POST /v1/milestonescreate milestone
GET /v1/milestoneslist milestones
GET /v1/milestones/{milestone_id}get milestone
PATCH /v1/milestones/{milestone_id}patch milestone
DELETE /v1/milestones/{milestone_id}delete milestone
POST /v1/milestones/{milestone_id}/ticketsAll-or-nothing; an existing member is reported in unchanged, not an error
DELETE /v1/milestones/{milestone_id}/ticketsA ticket that is no member is reported in unchanged; an id naming nothing fails the call
GET /v1/milestones/{milestone_id}/planOpen blockers outside the set with their chains and suggestions
GET /v1/milestones/{milestone_id}/boardboard
GET /v1/milestones/{milestone_id}/exit-criterialist milestone exit criteria
POST /v1/milestones/{milestone_id}/exit-criteriaadd milestone exit criterion
PATCH /v1/milestones/{milestone_id}/exit-criteriaCheck (done: true) or uncheck the selectors, or every item with all: true
PATCH /v1/milestones/{milestone_id}/exit-criteria/{selector}text rewrites the item (ac edit), done ticks or unticks it (ac check|uncheck)
DELETE /v1/milestones/{milestone_id}/exit-criteria/{selector}remove milestone exit criterion
PUT /v1/milestones/{milestone_id}/sections/{name}Replace the section's content (tkt <kind> section set)
POST /v1/milestones/{milestone_id}/sections/{name}Append after the section's last line (tkt <kind> section append)
POST /v1/decisionscreate decision
GET /v1/decisionslist decisions
GET /v1/decisions/{decision_id}get decision
PATCH /v1/decisions/{decision_id}patch decision
GET /v1/decisions/{decision_id}/refsWho cites the decision, and how: tkt decision refs
POST /v1/releasescreate release
GET /v1/releaseslist releases
GET /v1/releases/{release_id}The view plus its context guard hints (#290), as tkt release get --json
PATCH /v1/releases/{release_id}patch release
DELETE /v1/releases/{release_id}delete release
POST /v1/releases/{release_id}/membersAll-or-nothing; an existing member is reported in unchanged, not an error
DELETE /v1/releases/{release_id}/membersA member that is not in the release is reported in unchanged; one naming nothing fails the call
POST /v1/releases/{release_id}/shiptkt release ship: never asks, so an older version needs allowOlder
POST /v1/releases:adoptAdopt an untracked version as a shipped release
POST /v1/releases/{release_id}/notestkt release notes: the factual changelog only (the LLM summary is the CLI's, with its provider options); a release not shipped yet is a preview unless write; notes it already has are replaced only with yes (409 ERR_RELEASE_NOTES_EXIST)
GET /v1/releases/{release_id}/exit-criterialist release exit criteria
POST /v1/releases/{release_id}/exit-criteriaadd release exit criterion
PATCH /v1/releases/{release_id}/exit-criteriaCheck (done: true) or uncheck the selectors, or every item with all: true
PATCH /v1/releases/{release_id}/exit-criteria/{selector}text rewrites the item (ac edit), done ticks or unticks it (ac check|uncheck)
DELETE /v1/releases/{release_id}/exit-criteria/{selector}remove release exit criterion
PUT /v1/releases/{release_id}/sections/{name}Replace the section's content (tkt <kind> section set)
POST /v1/releases/{release_id}/sections/{name}Append after the section's last line (tkt <kind> section append)
POST /v1/releases/{release_id}/noteA dated - YYYY-MM-DD: text entry under ## Notes (tkt <kind> note)
GET /v1/reviews/{ref:path}The open reviews of ref (it builds on a changed item), the ones it opened (as a source), and everything that builds on it along the chain with its path (reached, #400)
GET /v1/docslist docs
GET /v1/docs/{doc_id}tkt doc get --json: hints, completeness, line 1, referencedBy; or the part anchor names
GET /v1/docs/{doc_id}/refsWho references the doc, and how: tkt doc refs
GET /v1/gotchaslist gotchas
GET /v1/gotchas/{gotcha_id}tkt gotcha get --json: hints, completeness, line 1, referencedBy; or the part anchor names
GET /v1/gotchas/{gotcha_id}/refsWho references or inherits the gotcha, and how: tkt gotcha refs
Generated from the registry: src/aitodo/api/selfdoc_entries/ref.py · ref.store-apiv0.1.298