Appearance
flags
8 endpoints at a glance
| Method | Path | Summary |
|---|---|---|
GET | /flags/ | List Flags |
POST | /flags/ | Create Flag |
DELETE | /flags/{flag_id}/ | Delete Flag |
GET | /flags/{flag_id}/ | Get Flag |
PATCH | /flags/{flag_id}/ | Update Flag |
POST | /flags/{flag_id}/done | Set Done |
POST | /flags/counts/ | Counts For Targets |
GET | /flags/for-target/ | List For Target |
flags
List Flags
GET
/flags/
Management-view list. All filters optional; privacy filter
always applied (admins see everything else; non-admins see public
- their own private).
Parameters
Header Parameters
authorization
x-api-key
Query Parameters
collection
doc_id
author
type
priority
done
since_ts
until_ts
q
limit
Type
integer
Default
200Responses
Successful Response
application/json
JSON { "additionalProperties": "string" }
[
]
Create Flag
POST
/flags/
Authenticated. Validates the target row exists in its collection
so a typo can't create an orphan flag.
Parameters
Header Parameters
authorization
x-api-key
Request Body
application/json
JSON "target": { "collection": "string", "doc_id": 0 }, "type": "issue", "priority": "medium", "notes": "string", "due_date": "string", "url": "string", "private": false
{
}
Responses
Successful Response
application/json
JSON "additionalProperties": "string"
{
}
List For Target
GET
/flags/for-target/
Per-target list, newest-first. Same privacy filter as the
management view; convenience route so embedded <FlagList>
components don't need to repeat the management endpoint's full
parameter set.
Parameters
Header Parameters
authorization
x-api-key
Query Parameters
collection*
Type
Requiredstring
doc_id*
Required
Responses
Successful Response
application/json
JSON { "additionalProperties": "string" }
[
]
Counts For Targets
POST
/flags/counts/
Batched {<collection>:<doc_id>: {open, done}} counter map
for the per-target badge component. Privacy-filtered.
Parameters
Header Parameters
authorization
x-api-key
Request Body
application/json
JSON "targets": [ { "collection": "string", "doc_id": 0 } ]
{
}
Responses
Successful Response
application/json
JSON "additionalProperties": { "additionalProperties": 0 }
{
}
Get Flag
Delete Flag
Update Flag
PATCH
/flags/{flag_id}/
Author OR admin. Patches any subset of type / priority /
notes / due_date / private. Pass due_date: null
explicitly to clear it; omit the key to leave it unchanged.
Parameters
Header Parameters
authorization
x-api-key
Path Parameters
flag_id*
Type
Requiredstring
Request Body
application/json
JSON "type": "string", "priority": "string", "notes": "string", "due_date": "string", "url": "string", "private": true
{
}
Responses
Successful Response
application/json
JSON "additionalProperties": "string"
{
}
Set Done
POST
/flags/{flag_id}/done
Mark done / undone. Author OR admin. Body: {done: true|false}.
Records done_at / done_at_ts / done_by (the username
that flipped the toggle, distinct from the original author) when
going to done; nulls them on the way back.
Parameters
Header Parameters
authorization
x-api-key
Path Parameters
flag_id*
Type
Requiredstring
Request Body
application/json
JSON "done": true
{
}
Responses
Successful Response
application/json
JSON "additionalProperties": "string"
{
}