{"openapi":"3.1.0","info":{"title":"Hackorum API","version":"1","description":"Access to hackorum, an archive of the PostgreSQL mailing lists with\npatch tracking. Everything is read with GET. The one thing that can be\nwritten is a draft of a reply, and the API has no way to send it. All\nof it is JSON except attachment content, the YAML form of this\ndocument and the guide.\n\nTwo more documents describe the API. The guide,\n[/api/v1/guide.md](/api/v1/guide.md), is a short text in plain\nmarkdown for language models and tool authors: how to read a thread,\nfind patches and CI results, follow the feed and prepare a draft, in\none request. [/api/docs](/api/docs) on the site is this document as\na page for people.\n\nWhat is here:\n\n- Threads (`/topics`): the thread list with search, one thread, the\n  commits linked to it.\n- Messages: the messages of a thread, one message by id or by\n  Message-ID header, attachments and their content.\n- Notes: the notes people left on a thread and on its messages, as far\n  as the caller may see them.\n- Patchsets: the messages that carry patches, per thread and per person.\n- Branches and CI: the git branches hackorum builds from patchsets,\n  and their CI runs.\n- Events (`/events`): what happened since your last call, to follow\n  changes by polling.\n- People: a person by email address, the threads they wrote in.\n- Lists: the mailing lists.\n- Me: the token owner's saved searches and activities.\n- Drafts: the token owner's drafts of replies. They can be written,\n  read, changed and deleted here, and are sent on the site only.\n- Meta: `/me`, this document and the guide.\n\nWords used below:\n\n- thread, topic: one discussion on a mailing list. The paths say\n  `topics`, the text says thread.\n- merged thread: a thread that was folded into another one because\n  both are the same discussion. It is not listed, and a request for it\n  under `/topics/{id}` is answered with 301, see below.\n- hidden list: a mailing list with `hidden_by_default` true. Threads\n  that are only on such lists are left out of default listings.\n- patchset: one message with patch files attached, a version of the\n  proposed change.\n- branch: hackorum's try to apply one patchset on PostgreSQL's master.\n  When it worked and was pushed there is a git branch named\n  `t\u003ctopic id\u003e_\u003cn\u003e`; n is set when the branch is first built and does\n  not change after.\n- commitfest: the PostgreSQL project's patch review tracker, at\n  commitfest.postgresql.org. A thread can have entries there.\n\nNaming: a field named `x_id` is always the numeric id of an x.\n`message_id` is the id of a message, its Message-ID header is\n`rfc_message_id`.\n\nAuthentication: optional. A token (Settings, API tokens on the site) is\nsent as `Authorization: Bearer hko_...`. Everything public is answered\nwithout one. What a token gives:\n\n- A higher rate limit, see below.\n- The owner's own state: threads carry it in `me` (stars, ignores,\n  what is read, a note count), messages say in `me` whether the owner\n  read them. `me` is null without a token.\n- The thread list as the owner sees it: `/topics` leaves out the\n  threads the owner ignores and its search runs as the owner, so the\n  selectors that need a caller work (`unread:me`, `starred:me`,\n  `from:me` and the others listed at `q`). Without a token they match\n  nothing and the answer says so in `warnings`.\n- Notes: `/topics/{id}/notes` gives the public notes without a token,\n  and with one also the private notes the owner wrote or is mentioned\n  in, directly or through a team.\n- Saved searches: `/me/saved_searches` lists the owner's and\n  `/topics?saved_search_id=` runs one. Without a token only the\n  site-wide ones can be run.\n- Activities: `/me/activities` is the owner's activity list.\n- Drafts: the owner's drafts of replies can be written, read, changed\n  and deleted, see below. Not sent.\n\n`me` only ever holds the token owner's own state, and no response\nnames teammates. In the search, the name of a team works in the state\nselectors as it does on the site, for a member of that team only.\nNo GET changes the owner's state: reading a thread, a message, a note\nor the activity list here does not mark anything as seen. A token that\nis invalid, expired or revoked gets 401 `invalid_token`, never an\nanonymous answer. This document and the guide are the exception:\nthey are public and ignore the header.\n\nLineage: for some threads a language model has read the patchsets and\nthe linked commits and written down how the patchsets derive from each\nother, which commits belong to the thread, who reviewed what and a short\nstory of the thread. It is in `/topics/{id}/lineage`, a `lineage` field\non patchsets, `link_source`, `verdict` and a `source` per credit on\ncommits, the commits and credits a model added, and `links.lineage` on\na thread. All of it is model output with a confidence, not fact: it can\nbe wrong.\n\nDrafts: a token owner whose account has a Gmail identity that may\nsend (`send_authorized` in `/me`) can have replies prepared:\n\n1. `POST /drafts` with the message to reply to makes a draft, or gives\n   the one the owner already has for that message.\n2. `PATCH /drafts/{id}` changes its subject and text, `GET` reads it\n   back with the recipients a send would use.\n3. `POST /drafts/{id}/attachments` adds a file, a patch for example,\n   as Base64 in JSON.\n   `DELETE /drafts/{id}/attachments/{attachment_id}` takes one off.\n4. The owner opens `html_url` on the site and reads the draft in the\n   composer there, where it is marked as made or edited through the\n   API, with the name of the token. Before a send the site shows the\n   whole text, the recipients and the attachments, which the owner can\n   download to check them. Then the owner sends it, or not.\n5. `DELETE /drafts/{id}` throws an unsent draft away.\n\nThe API cannot send mail. There is no operation that sends a draft or\nstarts a send, and a token does not carry that permission: sending\ntakes a signed-in person and a confirmation on the site. A draft can\nstill be changed through a token until it is sent. The site refuses to\nsend a draft that changed after the owner confirmed it and asks to\nlook at it again, so what goes out is what the owner saw.\n\nThe limits of drafts: a subject has at most 998 characters, the text\n1 MB (on `POST` the quote counts with the body), the attachments of\none draft 2 MB together in decoded bytes, a request 4 MB. Through\ntokens an account can have 50 drafts that are not sent, and 20 MB of\nattachments on them together; over that the answer is 422\n`draft_limit` until drafts are sent or deleted. The byte limit is\nchecked per request without a lock on the account, so two uploads at\nthe same moment can pass it by one file.\n\nWhat is stored of an attachment can differ from what was sent, and the\nresponse shows the stored values. The content type is reduced to\n`type/subtype` in lower case, with a `charset` parameter when it is a\ncommon one; every other parameter is dropped, and `multipart/*`,\n`message/*` and a type the site cannot use are stored as\n`application/octet-stream`. Of a file name only the last part of a\npath is kept, invisible and control characters are taken out or\nreplaced, and a name with nothing left is `attachment`.\n\nRequest bodies: `POST` and `PATCH` take a JSON object and need\n`Content-Type: application/json`, anything else is 415\n`unsupported_media_type`. JSON that cannot be parsed is 400\n`bad_request`. A body that is not an object, has a field the operation\ndoes not document, a value of the wrong type or one over its limit is\n422 `invalid_body`, and the message names the field. Nothing is read\nfrom the query string of these requests. A request body may have 4 MB\nat most, on any operation: a larger one is 413 `payload_too_large`\nand is not parsed, whatever its content type. A body that is not JSON\nis never parsed, so form fields do nothing. That includes the method\noverride of HTML forms: `_method` and `X-HTTP-Method-Override` are\nignored, a request has the method it was sent with. A request that is\nanswered with an error has changed nothing. A write that has to wait\nmore than 2 seconds for a draft another request is working on is 409\n`conflict`: try again.\n\nCaching: every response has `Vary: Authorization`. A response to a\nrequest with a token belongs to that token's user and must not be\nstored for anyone else.\n\nRate limits are per minute: 60 requests per IP address without a\ntoken, 600 per token with one. These are the defaults, a site can set\nother numbers, and `RateLimit-Limit` says what applies. They are\ncounted per server process, so on a site with several processes more\ncan get through. Every response has `RateLimit-Limit`,\n`RateLimit-Remaining` and `RateLimit-Reset` (seconds). Over the limit\nyou get 429 `rate_limited` with `Retry-After`.\n\nTime limit: a database statement that runs longer than 5 seconds\n(the default, a site can set another limit) is stopped and the answer\nis 400 `query_too_expensive`. Any operation can\ngive it, a broad search is the usual cause: narrow the query, a date\nselector helps.\n\nParameters: an operation takes only the query parameters it documents,\nany other one is 400 `invalid_parameter`. A parameter that is present\nwith an empty or whitespace-only value is 400 `invalid_parameter` as\nwell: leave it out instead.\n\nPaging: lists take `limit` (default 50; a value above 200 is lowered\nto 200) and an opaque `cursor`. Pass `next_cursor` back as `cursor` to\nget the next page, `next_cursor: null` means the end. A cursor belongs\nto the request that gave it: the same path and the same query\nparameters with the same values. Only `limit` and `body` may change\nbetween pages. Anything else is 400 `invalid_cursor`. A cursor of\n`/topics`, of `/topics/{id}/notes`, of `/me/activities` or of `/drafts`\nalso belongs to its caller, because the list does: one made with a token works with any token of\nthe same user, one made without a token only without one.\n\nThree lists are not paged: `/mailing_lists`, `/topics/{id}/commits`\nand `/me/saved_searches` give everything at once, with\n`next_cursor: null`. They do not take `limit` and `cursor`: sending\none is 400 `invalid_parameter`.\n\nFollowing changes: `/events` is a feed of what happened: a message\narrived, a patchset was posted, a branch was created, a CI run\nfinished. Make the first call with `since=\u003cduration\u003e`, `since=24h`\nfor example, and from then on pass the `next_cursor` of the last\nresponse as `since`. `next_cursor` is never null there, also not on\nan empty page, and `has_more: true` says that the next page is\nwaiting now. Poll once a minute at most: the limits below allow more\n(60 calls a minute without a token, 600 with one), but nothing is\ngained by it. Events are held back for 5 seconds before they are\ngiven out, so that none is passed over. The feed keeps 90 days. A\nposition older than that is answered with 410 `cursor_expired`: read\nthe state again from the list endpoints and start over with a\nduration. A cursor of the feed is a position in it, not tied to the\nfilters or to the caller, and it is not a `cursor` of the lists.\n\nBy default the feed leaves out CI runs that only repeat the previous\nverdict of the same patchset: branches are rebased and run again\nabout daily, so most runs say what the run before them said. Pass\n`ci_runs=all` to get every run.\n\nMessage bodies: operations that return messages take `body`. `text`\n(the default) is the body without quoted lines, attribution lines and\nforwarded originals, `full` is the stored body, `none` gives\n`body: null`.\n\nMerged threads: `/topics/{id}` and the lists under it answer a merged\nthread with 301 and no body. `Location` is the same request on the\nthread it was merged into, follow it.\n\nErrors always look the same: `{\"error\": {\"code\": ..., \"message\": ...}}`.\n`code` is stable and meant for programs, `message` is for people.\nUnknown paths under `/api/v1` get a 404 in this shape too. The codes:\n\n| code | status | meaning |\n|---|---|---|\n| `bad_request` | 400 | The request could not be read, for example a badly encoded query string |\n| `invalid_parameter` | 400 | A parameter is unknown, blank or has a value that cannot be used |\n| `invalid_query` | 400 | `q` cannot be parsed, is too long or has a value out of range |\n| `invalid_cursor` | 400 | `cursor` is malformed or belongs to another request |\n| `invalid_limit` | 400 | `limit` is not a positive integer |\n| `query_too_expensive` | 400 | A database statement ran longer than 5 seconds or needed too much memory and was stopped. Any operation can give it, a broad search is the usual cause: narrow the query |\n| `token_required` | 401 | `/me`, a path under it or `/drafts` without a token, or `starred` or `participating` on `/events` without one |\n| `invalid_token` | 401 | The token sent is invalid, expired or revoked |\n| `no_send_identity` | 403 | A draft was asked for and the account has no Gmail identity that may send. Connect one on the site |\n| `not_found` | 404 | No such record or path |\n| `method_not_allowed` | 405 | The HTTP method is not usable here |\n| `not_acceptable` | 406 | The requested format cannot be served |\n| `cursor_expired` | 410 | `since` of `/events` is a position older than the 90 days the feed keeps. Read the state again from the list endpoints and start over |\n| `conflict` | 409 | The draft is being sent, it changed since the `updated_at` the request gave, or another request holds it right now: try again |\n| `payload_too_large` | 413 | The request body has more than 4 MB |\n| `unsupported_media_type` | 415 | A request body that is not sent as `application/json` |\n| `invalid_body` | 422 | The request body is not an object, has an unknown field or a value that cannot be used, the stored text of a new draft would be over 1 MB, the draft was sent and cannot be changed, or a file would take its attachments over 2 MB |\n| `draft_limit` | 422 | The account has 50 drafts that are not sent and a new one was asked for, or a file would take the attachments of those drafts over 20 MB. Send or delete drafts on the site, or delete them here |\n| `unprocessable_content` | 422 | The request was understood and cannot be processed |\n| `rate_limited` | 429 | Too many requests, wait `Retry-After` seconds |\n| `internal_error` | 500 | A failure on the server |\n\nA failure answered with a status that is not in the table has the\nreason phrase of that status as its code, in lower case with\nunderscores.\n\nThis API cannot send email. There is no send endpoint.\n"},"tags":[{"name":"Meta","description":"The caller, this document and the guide"},{"name":"Me","description":"The token owner's saved searches and activities"},{"name":"Drafts","description":"The token owner's drafts of replies. Written here, sent on the site only"},{"name":"Lists","description":"The mailing lists"},{"name":"People","description":"A person by email address, and what they wrote"},{"name":"Threads","description":"The thread list with search, one thread and its commits"},{"name":"Messages","description":"Messages and their attachments"},{"name":"Notes","description":"Notes on threads and messages, public ones and the caller's private ones"},{"name":"Patchsets","description":"Messages that carry patches"},{"name":"Lineage","description":"What a language model wrote about the patchsets and commits of a thread"},{"name":"Branches and CI","description":"The git branches hackorum builds from patchsets, and their CI runs"},{"name":"Events","description":"The feed of what happened, for following changes by polling"}],"servers":[{"url":"/api/v1"}],"security":[{},{"bearer":[]}],"paths":{"/me":{"get":{"operationId":"getMe","tags":["Meta"],"summary":"The user the token belongs to","security":[{"bearer":[]}],"responses":{"200":{"description":"The current user","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/me/saved_searches":{"get":{"operationId":"listMySavedSearches","tags":["Me"],"summary":"The saved searches the site offers the token owner","description":"What the sidebar of the site shows the owner, in its order: the\nsite-wide searches (`scope` `global`), then the owner's\n(`scope` `user`: the ones every user gets, then the ones the owner\nmade), then per team of the owner that team's searches followed by\nthe team templates (`scope` `team`). Inside a group the order is\nthe position set on the site, then the name. Searches the owner hid\non the site are left out.\n\nA team template is one saved search whose query has a placeholder\nfor a team name. It is listed once per team of the owner, with the\nsame `id`, that team in `team` and the name filled into `query`.\nTo run an entry, GET its `topics_url`.\n\nThe list is not paged: `next_cursor` is always null, and `limit`\nand `cursor` are refused with 400 `invalid_parameter`.\n","security":[{"bearer":[]}],"responses":{"200":{"description":"The saved searches","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SavedSearch"}},"next_cursor":{"type":"null"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/me/activities":{"get":{"operationId":"listMyActivities","tags":["Me"],"summary":"The token owner's activities, newest first","description":"The activity list of the site: a new message in a thread the owner\nstarred, a note the owner wrote, a note that mentions the owner or\none of the owner's teams. Ordered by `id`, newest first. Unlike the\nsite, which shows the latest 100, the list pages through all of\nthem.\n\nReading the list changes nothing: no entry is marked as read, and\nthere is no operation here that does.\n\nAn entry stays in the list when the message or note it is about is\ngone, or when the note is no longer visible to the owner: it then\nhas `message_id` and `note_id` null.\n","security":[{"bearer":[]}],"parameters":[{"name":"unread","in":"query","description":"`true` gives only the entries with `read_at` null. Any other\nvalue is answered with `invalid_parameter`: leave the parameter\nout for the whole list.\n","schema":{"type":"string","enum":["true"]}},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"}],"responses":{"200":{"description":"A page of activities","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Activity"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/mailing_lists":{"get":{"operationId":"listMailingLists","tags":["Lists"],"summary":"All mailing lists, by display name","description":"The list is not paged: `next_cursor` is always null, and `limit`\nand `cursor` are refused with 400 `invalid_parameter`.\n","responses":{"200":{"description":"Every list in one page, `next_cursor` is always null","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MailingList"}},"next_cursor":{"type":"null"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/people/{email}":{"get":{"operationId":"getPerson","tags":["People"],"summary":"A person, by any of their email addresses","description":"The address is matched without case. An address of a merged person\nanswers with the person it was merged into. There is no lookup by id.\n","parameters":[{"$ref":"#/components/parameters/personEmail"}],"responses":{"200":{"description":"The person","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Person"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/people/{email}/topics":{"get":{"operationId":"listPersonTopics","tags":["People"],"summary":"The threads a person took part in, last active first","description":"Threads with a message of the person, ordered by the person's last\nmessage in each. Merged threads and threads of lists hidden by\ndefault are left out.\nWith a token each row has the token owner's\nstate in `me`; the rows are the same for every caller, threads the\nowner ignores included.\n","parameters":[{"$ref":"#/components/parameters/personEmail"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"}],"responses":{"200":{"description":"A page of threads","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PersonTopic"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/people/{email}/patchsets":{"get":{"operationId":"listPersonPatchsets","tags":["People","Patchsets"],"summary":"The patchsets a person sent, newest first","description":"Messages of the person that carry patches, over all threads. Merged\nthreads and threads of lists hidden by default are left out, so the\nlist can be shorter than `stats.patches_sent` of the person, which\nalso counts patches posted to hidden lists.\n","parameters":[{"$ref":"#/components/parameters/personEmail"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"}],"responses":{"200":{"description":"A page of patchsets","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Patchset"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/topics":{"get":{"operationId":"listTopics","tags":["Threads"],"summary":"Threads, newest activity first, optionally searched","description":"Without `q` and `list` this is the default listing: threads that are\nonly on lists hidden by default are left out. With `q` it is the site\nsearch, which includes them unless the query says `hidden:false`.\nWith `list` you get the threads of that list, hidden or not. Merged\nthreads are never listed.\n\nWith a token the list is the token owner's: threads the owner\nignores are left out unless they are starred too, with `q` unless the\nquery has an `ignored:` selector (`ignored:me` lists them). The\nsearch runs as the owner, see `q` for the selectors that need a\ntoken. Each row has the owner's state in `me`. Because the rows\ndepend on the caller, so does the cursor: it is only taken back from\nthe same user, or without a token when it was made without one.\n\n`saved_search_id` runs a saved search in place of `q`. The answer\nthen has `query`, the text that ran.\n","parameters":[{"name":"q","in":"query","description":"A query in the site's search language, at most 500 characters;\na longer one is answered with `invalid_query`. In short:\n\n- A bare word matches thread titles and message bodies, full-text\n  with English stemming. `\"two words\"` in quotes is a phrase.\n- Terms are joined with AND, written or not. `OR` is the\n  alternative, AND binds tighter, parentheses group. A leading\n  `-` negates a word, a selector or a group: `-(a OR b)`.\n- A selector is `name:value`, a value with spaces is quoted:\n  `from:\"Tom Lane\"`. Text: `title:`, `body:`.\n- Authors: `from:` (wrote in the thread), `starter:`,\n  `last_from:`. The value is part of a name or address; with an\n  `@` only addresses are searched, in quotes the match is exact.\n  It can also be `contributor`, `committer`, `core_team`,\n  `major_contributor`, `significant_contributor` or the name of\n  a public team; with a token also `me` and the name of a\n  private team the token owner is in.\n- Dates: `first_after:`, `first_before:` (first message),\n  `messages_after:`, `messages_before:` (any message),\n  `last_after:`, `last_before:` (last message), with\n  `2024-01-15`, `2024-01`, `2024`, an ISO timestamp, `today`,\n  `yesterday`, or an age as `7d`, `2w`, `3m`, `1y`.\n- Counts: `messages:`, `participants:`, `contributors:` with\n  `10`, `\u003e10`, `\u003c10`, `\u003e=10` or `\u003c=10`.\n- `has:` with `attachment`, `patch`, `contributor`, `committer`,\n  `core_team` or `commitfest`. `list:` with the `display_name`\n  of a mailing list. `commitfest:` with a commitfest name,\n  `[status:committed]` or `[tag:bugfix]`. `hidden:false` leaves\n  out threads that are only on hidden lists, top level only.\n- Brackets tie conditions to the same author or attachment:\n  `from:andres[messages:\u003e=10]`, `has:patch[from:michael]`.\n\nA part that cannot be used is skipped and named in `warnings`;\nonly a query that cannot be parsed is an error.\n\nSelectors that need a token: `unread:`, `read:`, `reading:`,\n`new:`, `starred:`, `ignored:` and `notes:` take `me` or the\nname of a team the token owner is in (`starred:\u003cteam\u003e`,\n`unread:\u003cteam\u003e` and so on: the state of its members taken\ntogether, exactly as the site's search does for that user; the\nanswer still does not say which member), `from:me`,\n`starter:me` and `last_from:me` are the owner's own messages.\n`tag:` finds threads by the tags of notes; with a token the\nnotes the owner can see, with `tag:name[from:me]` or\n`[from:\u003cuser or team name\u003e]` for one author, without a token\npublic notes only. Without a token `me` and the state selectors\nmatch nothing and add a warning.\n\nThe value of a state selector says whose state is meant, it is\nnot a yes or no: write `unread:me`, not `unread:true`. A value\nthat is neither `me` nor a team of the owner matches nothing\nand is named in `warnings`, with a token as well.\n\n`read:me` and `unread:me` compare the highest message the owner\nread with the last message of the thread. They can disagree\nwith `me.status` for someone who read only the newest message:\n`read:me` finds the thread, `me.status` says `reading`.\n\nThe whole language: `/help/search` on the site.\n","schema":{"type":"string","maxLength":500}},{"name":"saved_search_id","in":"query","description":"Run a saved search: its stored query is used as `q`, with the\nsame checks (`invalid_query` when it cannot be parsed or is too\nlong, `warnings` for the parts that were skipped). `q` cannot be\ngiven with it, that is `invalid_parameter`; `list`, `author`\nand `sort` can.\n\nThe ids come from `/me/saved_searches`, whose `topics_url` is\nthis request ready made. A search the caller may not see is 404:\nwithout a token only the site-wide ones (`scope` `global`) can\nbe run, with one also the owner's and those of the owner's\nteams. A search hidden on the site still runs.\n\nA cursor belongs to the id, not to the text of the search: when\nits owner changes the search between two pages, the next page\nis from the new text.\n","schema":{"type":"integer","minimum":0}},{"name":"team_id","in":"query","description":"The team a team search (`scope` `team`) is run for: its name is\nfilled into the query of a team template. Only with\n`saved_search_id`, alone it is `invalid_parameter`. The team\nmust be one the caller is in or a public one, any other is 404.\nWithout it a search that belongs to a team is run for that\nteam; a team template, which belongs to none, is\n`invalid_parameter`. On a search that is not a team search the\nparameter is ignored.\n","schema":{"type":"integer","minimum":0}},{"name":"list","in":"query","description":"Mailing list identifier, as `/mailing_lists` gives it. A list hidden by default is shown when asked for.\nAn identifier that is not a list is answered with `invalid_parameter`.\n","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"author","in":"query","description":"Email of a person, for the threads they wrote in. An unknown address gives an empty list.\nA value over 254 characters is answered with `invalid_parameter`.\n","schema":{"type":"string","minLength":1,"maxLength":254}},{"name":"sort","in":"query","description":"`activity` orders by the last message and leaves out threads without one,\n`created` by the first. Newest first, a cursor belongs to one sort.\n","schema":{"type":"string","enum":["activity","created"],"default":"activity"}},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"}],"responses":{"200":{"description":"A page of threads","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["data","next_cursor","warnings"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TopicBrief"}},"next_cursor":{"type":["string","null"]},"warnings":{"type":"array","description":"Parts of the query that were ignored or could not be used","items":{"type":"string"}},"query":{"type":"string","description":"Only with `saved_search_id`: the query of the saved\nsearch as it ran, with the team name filled in.\n"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/topics/{id}":{"get":{"operationId":"getTopic","tags":["Threads"],"summary":"A thread, by id or slug","description":"Digits are an id, anything else is a slug, matched without case.\nThis is the metadata of the thread, its messages, patchsets and\ncommits are under `links`. `links` also has `lineage` when the\nthread has lineage data.\nWith a token `me` is the token owner's state\nand names the first unread message.\n","parameters":[{"$ref":"#/components/parameters/topicId"}],"responses":{"200":{"description":"The thread","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Topic"}}}},"301":{"$ref":"#/components/responses/TopicMoved"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/topics/{id}/messages":{"get":{"operationId":"listTopicMessages","tags":["Messages"],"summary":"The messages of a thread, oldest first","description":"Every message of the thread, ordered by `created_at`, then `id`.\n`number` is the current position in that order and does not depend\non the page. A message sent through the site that the mailing list has not\ndelivered back yet is listed with the state `pending`. Drafts are\nnever listed.\n","parameters":[{"$ref":"#/components/parameters/topicId"},{"$ref":"#/components/parameters/body"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"}],"responses":{"200":{"description":"A page of messages","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"next_cursor":{"type":["string","null"]}}}}}},"301":{"$ref":"#/components/responses/TopicMoved"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/topics/{id}/patchsets":{"get":{"operationId":"listTopicPatchsets","tags":["Patchsets"],"summary":"The patchsets of a thread, newest first","description":"Every message of the thread that carries patches, ordered by\n`created_at`, then `id`, both descending. Each row has `lineage`,\nsee the description of the API.\n","parameters":[{"$ref":"#/components/parameters/topicId"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"}],"responses":{"200":{"description":"A page of patchsets","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Patchset"}},"next_cursor":{"type":["string","null"]}}}}}},"301":{"$ref":"#/components/responses/TopicMoved"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/topics/{id}/commits":{"get":{"operationId":"listTopicCommits","tags":["Threads"],"summary":"The commits linked to a thread, newest first","description":"The commits whose message names the thread in a `Discussion:` trailer.\nA change and its backports are one entry, so there are usually fewer\nentries than the `commit_count` of the thread, which counts every\nbackport. Ordered by `committed_at`, descending. The list is not\npaged: `next_cursor` is always null, and `limit` and `cursor` are\nrefused with 400 `invalid_parameter`.\n\nThe list also has the commits a language model linked to the\nthread, and the credits it added. Each entry has `link_source` and\n`verdict`, each credit a `source`.\n","parameters":[{"$ref":"#/components/parameters/topicId"}],"responses":{"200":{"description":"Every commit entry of the thread","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CommitGroup"}},"next_cursor":{"type":"null"}}}}}},"301":{"$ref":"#/components/responses/TopicMoved"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/topics/{id}/notes":{"get":{"operationId":"listTopicNotes","tags":["Notes"],"summary":"The notes on a thread the caller may see, oldest first","description":"Notes are short remarks users of the site leave on a thread or on\none of its messages. Ordered by `created_at`, then `id`.\n\nWho sees what, the same as on the site: a public note (`global`\ntrue) is given to everyone, also without a token. A private note is\ngiven only to its author, to the users it mentions and to the\nmembers of the teams it mentions. Without a token the list has the\npublic notes only. Deleted notes are never listed.\n\nReading the list changes nothing, a mention is not marked as seen.\n","parameters":[{"$ref":"#/components/parameters/topicId"},{"name":"message_id","in":"query","description":"Only the notes on this message. A message that is not in the\nthread gives an empty list. Notes on the thread itself have\n`message_id: null` and cannot be asked for alone.\n","schema":{"type":"integer","minimum":0}},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"}],"responses":{"200":{"description":"A page of notes","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Note"}},"next_cursor":{"type":["string","null"]}}}}}},"301":{"$ref":"#/components/responses/TopicMoved"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/topics/{id}/lineage":{"get":{"operationId":"getTopicLineage","tags":["Lineage"],"summary":"The lineage of a thread, as a language model wrote it","description":"The result of the latest finished lineage run on the thread: a\nshort story of the thread and, for each patchset the run looked at,\nthe patchset it derives from. Everything here is the output of a\nlanguage model with a confidence, not fact.\n\n404 when the thread has no finished run. The verdicts of the same\nrun on commits are in `/topics/{id}/commits`.\n\nReferences in `text`, `reason` and `evidence` fields are tokens:\n`[msg:\u003cid\u003e]` is a message, read it at `/messages/{id}`;\n`[commit:\u003csha\u003e]` is a commit of the PostgreSQL repository by its\nfull sha. The text is given as stored, tokens included.\n","parameters":[{"$ref":"#/components/parameters/topicId"}],"responses":{"200":{"description":"The lineage of the thread","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lineage"}}}},"301":{"$ref":"#/components/responses/TopicMoved"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"No such thread, or the thread has no finished lineage run (`not_found`)","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/messages/lookup":{"get":{"operationId":"lookupMessage","tags":["Messages"],"summary":"A message, by its Message-ID header","parameters":[{"name":"rfc_message_id","in":"query","required":true,"description":"The Message-ID, with or without the angle brackets. It is a query\nparameter and has to be percent-encoded: a `+` sent as it is reads\nas a space, send `%2B`.\n","schema":{"type":"string","minLength":1,"maxLength":998}},{"$ref":"#/components/parameters/body"}],"responses":{"200":{"description":"The message","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageDetail"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/messages/{id}":{"get":{"operationId":"getMessage","tags":["Messages"],"summary":"A message, by id","description":"A message of a thread that was merged into another one is served\nfrom the thread it is stored in, there is no redirect.\n","parameters":[{"$ref":"#/components/parameters/messageId"},{"$ref":"#/components/parameters/body"}],"responses":{"200":{"description":"The message","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageDetail"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/attachments/{id}":{"get":{"operationId":"getAttachment","tags":["Messages"],"summary":"An attachment, without its content","parameters":[{"$ref":"#/components/parameters/attachmentId"}],"responses":{"200":{"description":"The attachment","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Attachment"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/attachments/{id}/content":{"get":{"operationId":"getAttachmentContent","tags":["Messages"],"summary":"The bytes of an attachment","description":"Always a download, and never with the stored content type. What the\nstored type says is text comes as `text/plain; charset=utf-8`,\nanything else as `application/octet-stream`. The bytes are the\ndecoded attachment as it was sent: text can be in another encoding\nthan the header says, the stored `content_type` names it.\n","parameters":[{"$ref":"#/components/parameters/attachmentId"}],"responses":{"200":{"description":"The content","headers":{"Content-Disposition":{"description":"`attachment`, with the file name","schema":{"type":"string"}},"X-Content-Type-Options":{"description":"Always `nosniff`","schema":{"type":"string"}},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"text/plain":{"schema":{"type":"string"}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound","description":"No such attachment, or it has no content (`not_found`)"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/branches":{"get":{"operationId":"listBranches","tags":["Branches and CI"],"summary":"The git branches hackorum built from patchsets, last changed first","description":"One branch per patchset that hackorum tried to apply, with where it\nstands on CI. Ordered by `updated_at`, then `id`, both descending.\nWithout `current=false` only the newest patchset of each thread is\nlisted. The filters combine with AND.\n\nA branch `id` is one patchset and stays with it. hackorum applies\nevery live patchset on the current master again about once a day,\npushes the result and runs CI on it: each time `pushed_head_sha`\nchanges and `updated_at` moves, while `id` and `created_at` stay.\nMost rows near the top are therefore daily rebases, and a row whose\n`created_at` is new to you is a new patchset.\n\nTo follow new branches and finished CI runs use `/events`, not\nthis list. The feed does not report the daily rebases or a change\nof `state`: for those read the branch again.\n","parameters":[{"name":"topic","in":"query","description":"Numeric id of a thread, not a slug. A merged thread has its own branches, there is no redirect.","schema":{"type":"integer","minimum":0,"maximum":999999999}},{"name":"author","in":"query","description":"Email address of the sender of the patch message, any address of that person.\nAn unknown address gives no rows. A value over 254 characters is answered\nwith `invalid_parameter`.\n","schema":{"type":"string","minLength":1,"maxLength":254}},{"name":"state","in":"query","description":"The `state` of the branch","schema":{"$ref":"#/components/schemas/BranchState"}},{"name":"ci_status","in":"query","description":"The `ci_status` of the branch, `none` for branches CI never ran for","schema":{"type":"string","enum":["ci_none","pushed_awaiting_ci","push_failed","queued","running","success","build_failed","build_timeout","tests_failed","tests_timeout","cancelled","infra_error","none"]}},{"name":"pg_major","in":"query","description":"PostgreSQL major version the branch was built for","schema":{"type":"integer","minimum":0,"maximum":999}},{"name":"current","in":"query","description":"`false` also lists the branches of patchsets that a newer one of the thread replaced","schema":{"type":"string","enum":["true","false"],"default":"true"}},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"}],"responses":{"200":{"description":"A page of branches","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Branch"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/branches/{id}":{"get":{"operationId":"getBranch","tags":["Branches and CI"],"summary":"One branch","parameters":[{"$ref":"#/components/parameters/branchId"}],"responses":{"200":{"description":"The branch","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Branch"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/branches/{id}/ci_runs":{"get":{"operationId":"listBranchCiRuns","tags":["Branches and CI"],"summary":"The CI runs of a branch, newest first","description":"Ordered by `created_at`, the time hackorum first recorded the run,\nthen `id`, both descending.\n","parameters":[{"$ref":"#/components/parameters/branchId"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"}],"responses":{"200":{"description":"A page of CI runs","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CiRun"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/events":{"get":{"operationId":"listEvents","tags":["Events"],"summary":"What happened after a position, oldest first","description":"The feed for following changes. Four things are reported, once each:\n\n- `message.received`: a message arrived on a list, or was sent\n  through the site.\n- `patchset.posted`: a message turned out to carry patches. It\n  comes with the `message.received` of the same message.\n- `branch.created`: hackorum tried to apply a patchset for the\n  first time, whether it applied or not. Later rebases of the same\n  branch are not reported.\n- `ci.completed`: a CI run reached its final status. A run is\n  reported again, as a new event, if its verdict changes: a result\n  that arrives late replaces an `infra_error`. A branch that is\n  stuck without a run produces no event.\n\nBy default the feed leaves out CI runs that only repeat the\nprevious verdict of the same patchset. Every live branch is\nrebased and run again about daily, and most of these runs say what\nthe one before said. A `ci.completed` event is given when the run\nis the first of its branch or its verdict differs from the run\nbefore it; `ci_run.first_run` and `ci_run.previous_status` say\nwhich. Pass `ci_runs=all` to get every run.\n\nEvents are ordered by `id`, ascending, which is the order hackorum\nrecorded them in. `since` says where to start, see there.\n`next_cursor` is the position after the last event this request\nlooked at and is always a string: pass it as `since` next time.\nOn a page that is not full it is the end of the feed as of now, so\na filter that matches little still moves forward. `has_more` is\ntrue when the page is full and more is waiting.\n\nEvents of the last 5 seconds are not given out yet, and\n`next_cursor` stays before them, so they come with a later call.\nFollowing `next_cursor` gives every event once. `occurred_at` is\nwhen the thing happened, the date of a mail or the end of a run,\nand can be long ago; `recorded_at` is when hackorum stored the\nevent, and the order of the feed and `since` go by that one.\n\nEach event carries the record as it is now, not as it was when the\nevent was recorded, in the shape its own endpoint gives it:\n`message` without the body, `patchset`, `branch` or `ci_run`,\nexactly one of them, by `type`. `topic` is the thread the message\nis in now. Left out are events whose record was deleted since,\nevents of threads that are only on hidden lists (unless `list` is\ngiven) and events of a patchset that is not one any more. In rare\ncases such an event becomes visible again behind a cursor, at its\nold position: when a thread stops being hidden, or a message is a\npatchset again. A client that followed `next_cursor` past it does\nnot get it.\n\nThe filters combine with AND. A cursor is only a position: it can\nbe used with other filters than the request that gave it, and by\nany caller. The feed keeps 90 days, an older position is 410\n`cursor_expired`.\n","parameters":[{"name":"since","in":"query","description":"Where to start. One of:\n\n- the `next_cursor` of an earlier response: events after it.\n- a duration, a number and `m`, `h` or `d`: `90m`, `12h`, `7d`.\n  Events recorded in that last time span, 90 days at most.\n- a timestamp, ISO 8601 with seconds and `Z` or an offset,\n  `2026-11-12T10:00:00Z`: events recorded at or after it. A\n  `+` in an offset has to be sent as `%2B`. A time in the\n  future gives an empty page with a cursor to go on with, one\n  more than 90 days back is 410 `cursor_expired`.\n\nThe two differ at the edge: a duration over 90 days is 400\n`invalid_parameter`, a timestamp older than that is 410.\n\nA duration and a timestamp go by the time hackorum recorded\nthe event (`recorded_at`), not by `occurred_at`. Without\n`since` it is `24h`. Anything else, a `cursor` of a list\nincluded, is `invalid_parameter`.\n","schema":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z0-9_.:+-]+$","default":"24h"}},{"name":"types","in":"query","description":"Only events of these types, separated by commas. An unknown type is `invalid_parameter`.","schema":{"type":"string","pattern":"^(message\\.received|patchset\\.posted|branch\\.created|ci\\.completed)(,(message\\.received|patchset\\.posted|branch\\.created|ci\\.completed))*$"}},{"name":"topic","in":"query","description":"Numeric id of a thread, not a slug: events whose message is in\nthat thread now. The id of a merged thread stands for the\nthread it was merged into. An id that is no thread gives no rows.\n","schema":{"type":"integer","minimum":0,"maximum":999999999}},{"name":"author","in":"query","description":"Email address of the sender of the message, of the patchset, or of\nthe patchset a branch or a run belongs to, any address of that\nperson. An unknown address gives no rows. A value over 254\ncharacters is answered with `invalid_parameter`.\n","schema":{"type":"string","minLength":1,"maxLength":254}},{"name":"list","in":"query","description":"Mailing list identifier, as `/mailing_lists` gives it: events of the threads on that list. A list hidden\nby default is shown when asked for. An identifier that is not a list is answered with `invalid_parameter`.\n","schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"starred","in":"query","description":"`true`: only events of threads the token owner starred. Needs a\ntoken, without one the answer is 401 `token_required`. Any other\nvalue is `invalid_parameter`.\n","schema":{"type":"string","enum":["true"]}},{"name":"participating","in":"query","description":"`true`: only events of threads the token owner wrote in. Needs a\ntoken, without one the answer is 401 `token_required`. Any other\nvalue is `invalid_parameter`. With `starred` both have to hold.\n","schema":{"type":"string","enum":["true"]}},{"name":"ci_runs","in":"query","description":"Which `ci.completed` events to give. `changed`, the default:\nonly runs that are the first of their branch or whose verdict\ndiffers from the run before them on the branch, as it was when\nthe event was recorded. `all`: every run. The other event\ntypes are not affected. Any other value is `invalid_parameter`.\n","schema":{"type":"string","enum":["changed","all"],"default":"changed"}},{"$ref":"#/components/parameters/limit"}],"responses":{"200":{"description":"A page of events","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["data","next_cursor","has_more"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"next_cursor":{"type":"string","description":"The position to pass as `since` next time. Never null."},"has_more":{"type":"boolean","description":"True when more events are waiting after this page"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"410":{"$ref":"#/components/responses/CursorExpired"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/drafts":{"get":{"operationId":"listDrafts","tags":["Drafts"],"summary":"The token owner's drafts, last changed first","description":"Every draft of the owner, the sent ones too, whether it was made\nhere or on the site. Ordered by `updated_at`, then `id`, both\ndescending. The site orders its list by the time of sending for\nsent drafts, this list does not. The rows have no `body` and no\n`recipients`: read one draft for those.\n","security":[{"bearer":[]}],"parameters":[{"name":"state","in":"query","description":"Only the drafts in this state. Without it, all of them.","schema":{"$ref":"#/components/schemas/DraftState"}},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"}],"responses":{"200":{"description":"A page of drafts","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DraftBrief"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"createDraft","tags":["Drafts"],"summary":"Make a draft of a reply to a message","description":"Makes the owner's draft of a reply to the message\n`reply_to_message_id`, as the Reply button of the site does, and\nanswers 201. The owner can have one unsent draft per message: when\nthere is one already, made here or on the site, it is given back\nwith 200 and nothing of it is changed, whatever the request says.\nUse `PATCH` to change it.\n\n`reply_to_message_id` is required for now: drafts that start a\nthread are not supported yet, and a request without it is 422\n`invalid_body`.\n\nThe draft is not sent, and nothing here can send it. The owner\nsends it on the site, at `html_url`.\n\nThe stored text is the quote, as the site formats it, followed by\n`body`. Together they may have 1 MB, more is 422 `invalid_body`.\nAn account can have 50 drafts that are not sent: a request for one\nmore is 422 `draft_limit`. An existing draft is still given back.\n\nThe account needs a Gmail identity that may send, connected on the\nsite (`send_authorized` in `/me`), and that address must be one of\nthe account's addresses. Otherwise the answer is 403\n`no_send_identity`.\n","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftCreate"}}}},"responses":{"200":{"description":"The unsent draft the owner already has for the message, unchanged","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"201":{"description":"The new draft","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/NoSendIdentity"},"404":{"$ref":"#/components/responses/NotFound"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/InvalidBody"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/drafts/{id}":{"parameters":[{"$ref":"#/components/parameters/draftId"}],"get":{"operationId":"getDraft","tags":["Drafts"],"summary":"A draft of the token owner","description":"A draft of another user is 404.","security":[{"bearer":[]}],"responses":{"200":{"description":"The draft","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"updateDraft","tags":["Drafts"],"summary":"Change the subject or the text of a draft","description":"Only the fields that are sent change, an empty object changes\nnothing and gives the draft back. The draft then names the token\nin `last_edited_via`, until it is edited on the site.\n\nTo not overwrite what was changed in between, on the site or by\nanother client, send the `updated_at` the client saw last. When\nthe draft has another one now the answer is 409 `conflict`: read\nthe draft again. Without `updated_at` the last write wins.\n\nA draft that is being sent is 409 `conflict`. A sent draft cannot\nbe changed, that is 422 `invalid_body`. A draft of another user is\n404.\n","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftUpdate"}}}},"responses":{"200":{"description":"The draft after the change","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/InvalidBody"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"deleteDraft","tags":["Drafts"],"summary":"Delete an unsent draft","description":"Deletes the draft and its attachments. A draft that is being sent\nis 409 `conflict`. A sent draft is kept as the record of the mail\nand cannot be deleted, that is 422 `unprocessable_content`. A\ndraft of another user is 404.\n","security":[{"bearer":[]}],"responses":{"204":{"description":"The draft is deleted, there is no body","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/drafts/{id}/attachments":{"parameters":[{"$ref":"#/components/parameters/draftId"}],"post":{"operationId":"addDraftAttachment","tags":["Drafts"],"summary":"Attach a file to a draft","description":"One file per request, its content as Base64 inside the JSON body.\nThere is no multipart upload. The answer is the whole draft, with\nthe new file and its id in `attachments` and a new `updated_at`.\nThe draft then names the token in `last_edited_via`.\n\nThe files of a draft may have 2 MB together, counted in decoded\nbytes. A file that would take the draft over that is 422\n`invalid_body` and is not stored. Content that is not Base64, or\nempty, is 422 `invalid_body` as well. The files of all drafts of\nthe account that are not sent may have 20 MB together: over that\nthe answer is 422 `draft_limit`.\n\nThe file is stored as an upload in the composer of the site stores\nit, and goes out with the mail when the owner sends the draft\nthere. `file_name` and `content_type` are cleaned before they are\nstored, see the fields of the request: the answer shows the stored\nvalues. The content is not given back by the API, the owner can\ndownload the file on the site.\n\nA draft that is being sent is 409 `conflict`. A sent draft cannot\nbe changed, that is 422 `invalid_body`. A draft of another user is\n404.\n","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftAttachmentCreate"}}}},"responses":{"201":{"description":"The draft with the new file","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/InvalidBody"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/drafts/{id}/attachments/{attachment_id}":{"parameters":[{"$ref":"#/components/parameters/draftId"},{"name":"attachment_id","in":"path","required":true,"description":"Numeric id of the file, from `attachments` of the draft","schema":{"type":"integer"}}],"delete":{"operationId":"deleteDraftAttachment","tags":["Drafts"],"summary":"Take a file off a draft","description":"The answer is the whole draft, without the file and with a new\n`updated_at`. The draft then names the token in `last_edited_via`.\n\nA file that is not on this draft is 404, as is a draft of another\nuser. A draft that is being sent is 409 `conflict`. A sent draft\ncannot be changed, that is 422 `unprocessable_content`.\n","security":[{"bearer":[]}],"responses":{"200":{"description":"The draft without the file","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/Unprocessable"},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/openapi.json":{"get":{"operationId":"getOpenapiJson","tags":["Meta"],"summary":"This document as JSON","responses":{"200":{"description":"OpenAPI document","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/openapi.yaml":{"get":{"operationId":"getOpenapiYaml","tags":["Meta"],"summary":"This document as YAML","responses":{"200":{"description":"OpenAPI document","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/yaml":{"schema":{"type":"string"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}},"/guide.md":{"get":{"operationId":"getGuide","tags":["Meta"],"summary":"A guide to this API as plain markdown, for agents and tool authors","description":"One text of under 2500 words that says how to use the API: the\nrules, how to read a thread, patches and CI, the event feed,\ndrafts, and a table of the operations. Made to be loaded in one\nrequest by a language model or by somebody who writes a tool.\nPublic like this document: the `Authorization` header is ignored.\n","responses":{"200":{"description":"The guide","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"text/markdown":{"schema":{"type":"string"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"$ref":"#/components/responses/Error"}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}},"parameters":{"topicId":{"name":"id","in":"path","required":true,"description":"Numeric id, or the topic's slug","schema":{"type":"string"}},"personEmail":{"name":"email","in":"path","required":true,"description":"The address, percent-encoded (`alice%40example.org`). A plain `@` is taken too.","schema":{"type":"string"}},"branchId":{"name":"id","in":"path","required":true,"description":"Numeric id of the branch","schema":{"type":"integer"}},"messageId":{"name":"id","in":"path","required":true,"description":"Numeric id of the message","schema":{"type":"integer"}},"attachmentId":{"name":"id","in":"path","required":true,"description":"Numeric id of the attachment","schema":{"type":"integer"}},"draftId":{"name":"id","in":"path","required":true,"description":"Numeric id of the draft","schema":{"type":"integer"}},"limit":{"name":"limit","in":"query","description":"Page size, default 50. A value above 200 is lowered to 200. Anything\nthat is not a positive integer is answered with `invalid_limit`.\n","schema":{"type":"integer","minimum":1,"default":50}},"cursor":{"name":"cursor","in":"query","description":"The `next_cursor` of the previous page. It is only taken with the\npath and the query parameters of the request that gave it; `limit`\nand `body` may differ. Otherwise the answer is `invalid_cursor`.\n","schema":{"type":"string","minLength":1,"maxLength":500}},"body":{"name":"body","in":"query","description":"How much of the message text to send: `none` gives `body: null`,\n`text` the body without quoted lines, attribution lines and\nforwarded originals, `full` the stored body. It does not change\nwhich messages a list has, so it may change between pages.\n","schema":{"type":"string","enum":["none","text","full"],"default":"text"}}},"headers":{"RateLimit-Limit":{"description":"Requests allowed per minute for this caller","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current minute","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the budget is full again","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before the next request","schema":{"type":"integer"}}},"responses":{"TopicMoved":{"description":"The thread was merged into another one, `Location` is the same request on that thread, query string included","headers":{"Location":{"description":"URL of the thread this one was merged into","schema":{"type":"string"}},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}}},"Unauthorized":{"description":"A token was sent and is not usable, because it is invalid, expired\nor revoked: `invalid_token`. Every operation that reads the token\ncan answer this, the request is never served anonymously instead.\nOn `/me`, the paths under it and `/drafts`, and on `/events` with\n`starred` or `participating`: no token was sent, `token_required`.\n","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"BadRequest":{"description":"A parameter is unknown, blank or not usable: `invalid_parameter`,\n`invalid_query`, `invalid_cursor` or `invalid_limit`. Or the request\ncould not be read: `bad_request`. Or the request was stopped\nbecause it ran too long or needed too much memory:\n`query_too_expensive`, narrow the query.\n","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such record (`not_found`)","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NoSendIdentity":{"description":"The account has no Gmail identity that may send, or its address is not an address of the account (`no_send_identity`)","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"The draft is being sent, it changed since the `updated_at` the request gave, or another request is working on it right now and this one can be tried again (`conflict`)","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"PayloadTooLarge":{"description":"The request body has more than 4 MB (`payload_too_large`)","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnsupportedMediaType":{"description":"The body was not sent as `application/json` (`unsupported_media_type`)","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InvalidBody":{"description":"The body is not a JSON object, has an unknown field or a value that cannot be used, the message names the field. Or the stored text of a new draft would be over 1 MB, the draft was sent and cannot be changed, or the file would take the attachments of the draft over 2 MB (`invalid_body`). Or the account has 50 drafts that are not sent, or 20 MB of attachments on them (`draft_limit`)","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unprocessable":{"description":"The draft was sent and cannot be deleted or changed (`unprocessable_content`)","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"CursorExpired":{"description":"`since` is a position older than the feed keeps (`cursor_expired`).\nRead the state again from the list endpoints and start over with a\nduration.\n","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Too many requests (`rate_limited`)","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error":{"description":"Any other error, for example `bad_request`, `query_too_expensive` or `internal_error`. The description of the API lists every code.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","description":"One of the codes listed in the description of the API"},"message":{"type":"string"}}}}},"AliasRef":{"type":"object","additionalProperties":false,"description":"A name and an address somebody sent mail with","required":["name","email"],"properties":{"name":{"type":"string"},"email":{"type":"string"}}},"PersonBrief":{"type":"object","additionalProperties":false,"description":"A person, as other records name them. One person can have several\naddresses.\n","required":["id","name","email","url","html_url"],"properties":{"id":{"type":"integer","description":"Numeric id of the person. People are looked up by address, not by id."},"name":{"type":"string","description":"The name on the person's main address, or on another address of\ntheirs when no main one is set. `Unknown` when the person has no\naddress at all.\n"},"email":{"type":["string","null"],"description":"The address that name belongs to, null when the person has no address"},"url":{"type":["string","null"],"description":"The person in this API, `/people/{email}`. Null when `email` is null."},"html_url":{"type":["string","null"],"description":"The person's page on the site. Null when `email` is null."}}},"MailingList":{"type":"object","additionalProperties":false,"required":["identifier","display_name","hidden_by_default"],"properties":{"identifier":{"type":"string"},"display_name":{"type":"string"},"hidden_by_default":{"type":"boolean","description":"Threads that are only on such lists are left out of default listings"}}},"MailingListRef":{"type":"object","additionalProperties":false,"description":"A mailing list, as other records name it","required":["identifier","display_name"],"properties":{"identifier":{"type":"string"},"display_name":{"type":"string"}}},"ContributorType":{"type":["string","null"],"description":"PostgreSQL contributor status, null for none","enum":["core_team","committer","major_contributor","significant_contributor","past_major_contributor","past_significant_contributor",null]},"TopicParticipant":{"type":"object","additionalProperties":false,"description":"A person who wrote in the thread","required":["person","message_count","first_message_at","last_message_at","contributor_type"],"properties":{"person":{"$ref":"#/components/schemas/PersonBrief"},"message_count":{"type":"integer"},"first_message_at":{"type":"string","format":"date-time"},"last_message_at":{"type":"string","format":"date-time"},"contributor_type":{"$ref":"#/components/schemas/ContributorType"}}},"TopicCommitfest":{"type":"object","additionalProperties":false,"description":"The thread's entry in the latest commitfest it is in","required":["name","status","commitfest_url","patch_url","committed"],"properties":{"name":{"type":"string"},"status":{"type":"string","description":"Status of the patch in that commitfest, for example `Needs review`"},"commitfest_url":{"type":"string"},"patch_url":{"type":"string"},"committed":{"type":"boolean"}}},"TopicCi":{"type":"object","additionalProperties":false,"description":"The current patchset of the thread on hackorum's CI, when there is something to say about it","required":["state","ci_status","branch_id","branch_name","url"],"properties":{"state":{"$ref":"#/components/schemas/BranchState"},"ci_status":{"oneOf":[{"$ref":"#/components/schemas/CiStatus"},{"type":"null"}],"description":"CI verdict for the commit that is pushed now, null when CI never ran for this patchset"},"branch_id":{"type":"integer"},"branch_name":{"type":"string"},"url":{"type":"string","description":"The branch, `/branches/{branch_id}`"}}},"TopicBrief":{"type":"object","additionalProperties":false,"required":["id","slug","title","url","html_url","created_at","last_message_at","message_count","participant_count","contributor_participant_count","highest_contributor_type","has_attachments","commit_count","last_commit_at","creator","last_sender","mailing_lists","commitfest","ci","me"],"properties":{"id":{"type":"integer"},"slug":{"type":["string","null"],"description":"Short name of the thread, when it has one"},"title":{"type":"string"},"url":{"type":"string"},"html_url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"last_message_at":{"type":["string","null"],"format":"date-time"},"message_count":{"type":"integer"},"participant_count":{"type":"integer"},"contributor_participant_count":{"type":"integer","description":"Participants with a PostgreSQL contributor status"},"highest_contributor_type":{"$ref":"#/components/schemas/ContributorType","description":"Highest contributor status among the participants"},"has_attachments":{"type":"boolean"},"commit_count":{"type":"integer","description":"Commits linked to this thread. Each backport of a change is\ncounted separately; `/topics/{id}/commits` groups them.\n"},"last_commit_at":{"type":["string","null"],"format":"date-time"},"creator":{"$ref":"#/components/schemas/PersonBrief"},"last_sender":{"oneOf":[{"$ref":"#/components/schemas/PersonBrief"},{"type":"null"}]},"mailing_lists":{"type":"array","items":{"$ref":"#/components/schemas/MailingListRef"}},"commitfest":{"oneOf":[{"$ref":"#/components/schemas/TopicCommitfest"},{"type":"null"}]},"ci":{"oneOf":[{"$ref":"#/components/schemas/TopicCi"},{"type":"null"}]},"me":{"oneOf":[{"$ref":"#/components/schemas/TopicMe"},{"type":"null"}],"description":"The token owner's own state on the thread, null without a token"}}},"TopicMe":{"type":"object","additionalProperties":false,"description":"What the token owner did with a thread. It only ever holds the state\nof the user the token belongs to, and no response names teammates.\n(The search can still use the combined state of a team: a member\ncan put the team's name into a state selector of `q`, as on the\nsite.) Reading it changes nothing: a thread is not marked as seen by\nan API request.\n","required":["starred","ignored","status","read_count","unread_count","note_count"],"properties":{"starred":{"type":"boolean"},"ignored":{"type":"boolean","description":"Ignored threads are left out of `/topics` for this user, unless\nthey are starred as well.\n"},"status":{"type":"string","enum":["new","aware","reading","read"],"description":"`read`: every message is read. `reading`: some are. `aware`: none\nis read, but the user has seen the thread in a list or marked\neverything up to a date as seen and the thread has no later\nmessage. `new`: none of that.\n"},"read_count":{"type":"integer","description":"Messages of the thread the user has read"},"unread_count":{"type":"integer","minimum":0,"description":"`message_count` minus `read_count`, never below 0"},"note_count":{"type":"integer","description":"Notes on the thread the user can see: their own, public ones and\nthose that mention the user or one of their teams.\n"},"first_unread_message_id":{"type":["integer","null"],"description":"On `/topics/{id}` only, lists do not have the key. The first\nmessage in thread order (`created_at`, then `id`) the user has\nnot read, null when all are read or the thread has no messages.\nIt can be null while `unread_count` is above 0 after threads\nwere merged: the count comes from stored read ranges, the id\nfrom what those ranges cover.\n"}}},"Topic":{"type":"object","additionalProperties":false,"description":"Everything `TopicBrief` has, and the detail","required":["id","slug","title","url","html_url","created_at","last_message_at","message_count","participant_count","contributor_participant_count","highest_contributor_type","has_attachments","commit_count","last_commit_at","creator","last_sender","mailing_lists","commitfest","ci","me","participants","commitfest_patches","patchset_count","links"],"properties":{"id":{"type":"integer"},"slug":{"type":["string","null"],"description":"Short name of the thread, when it has one"},"title":{"type":"string"},"url":{"type":"string"},"html_url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"last_message_at":{"type":["string","null"],"format":"date-time"},"message_count":{"type":"integer"},"participant_count":{"type":"integer"},"contributor_participant_count":{"type":"integer","description":"Participants with a PostgreSQL contributor status"},"highest_contributor_type":{"$ref":"#/components/schemas/ContributorType","description":"Highest contributor status among the participants"},"has_attachments":{"type":"boolean"},"commit_count":{"type":"integer","description":"Commits linked to this thread. Each backport of a change is\ncounted separately; `/topics/{id}/commits` groups them.\n"},"last_commit_at":{"type":["string","null"],"format":"date-time"},"creator":{"$ref":"#/components/schemas/PersonBrief"},"last_sender":{"oneOf":[{"$ref":"#/components/schemas/PersonBrief"},{"type":"null"}]},"mailing_lists":{"type":"array","items":{"$ref":"#/components/schemas/MailingListRef"}},"commitfest":{"oneOf":[{"$ref":"#/components/schemas/TopicCommitfest"},{"type":"null"}]},"ci":{"oneOf":[{"$ref":"#/components/schemas/TopicCi"},{"type":"null"}]},"me":{"oneOf":[{"$ref":"#/components/schemas/TopicMe"},{"type":"null"}],"description":"The token owner's own state on the thread, null without a token"},"participants":{"type":"array","description":"At most 50, most messages first","items":{"$ref":"#/components/schemas/TopicParticipant"}},"commitfest_patches":{"type":"array","description":"Commitfest entries of the thread, each with its state in its latest commitfest","items":{"type":"object","additionalProperties":false,"required":["external_id","title","status","commitfest_name","reviewers","committer","tags","ci_status","url"],"properties":{"external_id":{"type":"integer","description":"Id of the patch in the commitfest app"},"title":{"type":"string"},"status":{"type":"string"},"commitfest_name":{"type":"string"},"reviewers":{"type":"array","items":{"type":"string"}},"committer":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"ci_status":{"type":["string","null"],"description":"CI result as the commitfest app reports it"},"url":{"type":"string"}}}},"patchset_count":{"type":"integer","description":"Messages of the thread that carry patches"},"links":{"type":"object","additionalProperties":false,"required":["messages","patchsets","commits"],"properties":{"messages":{"type":"string"},"patchsets":{"type":"string"},"commits":{"type":"string"},"lineage":{"type":"string","description":"`/topics/{id}/lineage`. Only present when the thread has a\nfinished lineage run.\n"}}}}},"PersonTopic":{"type":"object","additionalProperties":false,"description":"Everything `TopicBrief` has, and what the person did in the thread","required":["id","slug","title","url","html_url","created_at","last_message_at","message_count","participant_count","contributor_participant_count","highest_contributor_type","has_attachments","commit_count","last_commit_at","creator","last_sender","mailing_lists","commitfest","ci","me","participation"],"properties":{"id":{"type":"integer"},"slug":{"type":["string","null"],"description":"Short name of the thread, when it has one"},"title":{"type":"string"},"url":{"type":"string"},"html_url":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"last_message_at":{"type":["string","null"],"format":"date-time"},"message_count":{"type":"integer"},"participant_count":{"type":"integer"},"contributor_participant_count":{"type":"integer","description":"Participants with a PostgreSQL contributor status"},"highest_contributor_type":{"$ref":"#/components/schemas/ContributorType","description":"Highest contributor status among the participants"},"has_attachments":{"type":"boolean"},"commit_count":{"type":"integer","description":"Commits linked to this thread. Each backport of a change is\ncounted separately; `/topics/{id}/commits` groups them.\n"},"last_commit_at":{"type":["string","null"],"format":"date-time"},"creator":{"$ref":"#/components/schemas/PersonBrief"},"last_sender":{"oneOf":[{"$ref":"#/components/schemas/PersonBrief"},{"type":"null"}]},"mailing_lists":{"type":"array","items":{"$ref":"#/components/schemas/MailingListRef"}},"commitfest":{"oneOf":[{"$ref":"#/components/schemas/TopicCommitfest"},{"type":"null"}]},"ci":{"oneOf":[{"$ref":"#/components/schemas/TopicCi"},{"type":"null"}]},"me":{"oneOf":[{"$ref":"#/components/schemas/TopicMe"},{"type":"null"}],"description":"The token owner's own state on the thread, null without a token"},"participation":{"type":"object","additionalProperties":false,"required":["message_count","first_message_at","last_message_at","started"],"properties":{"message_count":{"type":"integer","description":"Messages of the person in the thread"},"first_message_at":{"type":"string","format":"date-time"},"last_message_at":{"type":"string","format":"date-time"},"started":{"type":"boolean","description":"True when the person started the thread"}}}}},"Person":{"type":"object","additionalProperties":false,"required":["id","name","email","url","html_url","aliases","contributor_type","contributor_badge","stats"],"properties":{"id":{"type":"integer"},"name":{"type":"string","description":"As in `PersonBrief`"},"email":{"type":["string","null"],"description":"As in `PersonBrief`"},"url":{"type":["string","null"],"description":"As in `PersonBrief`"},"html_url":{"type":["string","null"],"description":"As in `PersonBrief`"},"aliases":{"type":"array","description":"Names and addresses the person sent mail with, by address. An\naddress that was only mentioned is not listed, so `email` can be\nmissing here when the main address never sent mail.\n","items":{"$ref":"#/components/schemas/AliasRef"}},"contributor_type":{"$ref":"#/components/schemas/ContributorType","description":"Highest PostgreSQL contributor status, null for none"},"contributor_badge":{"type":["string","null"],"description":"The status as the site labels it"},"stats":{"type":"object","additionalProperties":false,"description":"All-time numbers. `messages_sent`, `threads_started` and\n`threads_joined` leave out lists hidden by default; the hidden part\nof each is its `_hidden` count, add the two for the total.\n`patches_sent`, `patch_threads` and the two timestamps include\nhidden lists.\n","required":["messages_sent","messages_sent_hidden","threads_started","threads_started_hidden","threads_joined","threads_joined_hidden","patches_sent","patch_threads","first_message_at","last_message_at"],"properties":{"messages_sent":{"type":"integer"},"messages_sent_hidden":{"type":"integer"},"threads_started":{"type":"integer"},"threads_started_hidden":{"type":"integer"},"threads_joined":{"type":"integer"},"threads_joined_hidden":{"type":"integer"},"patches_sent":{"type":"integer"},"patch_threads":{"type":"integer"},"first_message_at":{"type":["string","null"],"format":"date-time"},"last_message_at":{"type":["string","null"],"format":"date-time"}}}}},"Attachment":{"type":"object","additionalProperties":false,"required":["id","message_id","file_name","content_type","byte_size","is_patch","url","content_url"],"properties":{"id":{"type":"integer"},"message_id":{"type":"integer","description":"Numeric id of the message the file came with; use `/messages/{message_id}`"},"file_name":{"type":"string"},"content_type":{"type":["string","null"],"description":"The type the mail gave, parameters included. The content is not served with it."},"byte_size":{"type":"integer","description":"Size of the content in bytes, as `content_url` serves it"},"is_patch":{"type":"boolean","description":"True when hackorum takes the file for a patch of the message: by\nits name (`.patch`, `.diff`, `.diffs`, also with `.gz`, `.bz2`,\n`.txt` or a number after it, or a bare `patch` or `diff`) or by a\npatch content type as the mail gave it (`text/x-diff`,\n`text/x-patch`, `application/x-patch`). The content is not\nlooked at. A file is left out when its name has `nocfbot` or\n`no_cfbot` in it: authors put that in the name of a file that\nthe project's CI bot should skip, a file that is not part of\nthe patch series. These are the `files` of a patchset and the\nfiles of its `download_url` archive.\n"},"url":{"type":"string"},"content_url":{"type":"string"}}},"Message":{"type":"object","additionalProperties":false,"required":["id","url","html_url","topic_id","number","rfc_message_id","subject","created_at","state","sender","sender_alias","reply_to_id","depth","is_patch_submission","body","attachments","me"],"properties":{"id":{"type":"integer"},"url":{"type":"string"},"html_url":{"type":"string","description":"The thread page of the site, at this message"},"topic_id":{"type":"integer"},"number":{"type":"integer","description":"Current position of the message in its thread, from 1, by\n`created_at` and `id`. It can change when older mail arrives\nlate, and may differ from the suffix of a branch name.\n"},"rfc_message_id":{"type":["string","null"],"description":"The Message-ID header, usually without angle brackets"},"subject":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"state":{"type":"string","enum":["sent","pending"],"description":"`pending` is a message written on the site that has not come back from the list yet"},"sender":{"$ref":"#/components/schemas/PersonBrief"},"sender_alias":{"$ref":"#/components/schemas/AliasRef","description":"The name and address this message was sent with"},"reply_to_id":{"type":["integer","null"],"description":"Id of the message this one answers, which can be in another thread"},"depth":{"type":"integer","description":"Replies above this message inside the thread, 0 for a root and for a reply to a message outside of it"},"is_patch_submission":{"type":"boolean","description":"True when at least one attachment of the message has `is_patch`\ntrue, see `Attachment`. The message is then a patchset.\n"},"body":{"type":["string","null"],"description":"As the `body` parameter asks, null for `none`"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/Attachment"}},"me":{"oneOf":[{"$ref":"#/components/schemas/MessageMe"},{"type":"null"}],"description":"The token owner's own state on the message, null without a token"}}},"MessageMe":{"type":"object","additionalProperties":false,"description":"What the token owner did with a message. It is only ever the state\nof the user the token belongs to. Reading a message here does not\nmark it as read.\n","required":["read"],"properties":{"read":{"type":"boolean","description":"The user has read the message, on the site or by marking the thread as read"}}},"NoteUser":{"type":"object","additionalProperties":false,"description":"A user of the site, as a note shows them: by the display name the\nsite shows. Never an e-mail address. The display name falls back\nto the username when the account has no name on record.\n","required":["name"],"properties":{"name":{"type":"string","description":"The name the site shows: the name of the user's main address,\nelse the username, else `User #\u003cn\u003e`. `Deleted user` for a\ndeleted account.\n"}}},"NoteMention":{"type":"object","additionalProperties":false,"required":["type","name"],"properties":{"type":{"type":"string","enum":["user","team"]},"name":{"type":"string","description":"The username or the team name the site shows as `@name`,\nwithout the `@`. For a user without a username it is the name\nthe site shows instead.\n"}}},"Note":{"type":"object","additionalProperties":false,"description":"A remark a user left on a thread or on one message of it. Public\nnotes (`global` true) are given to everyone. A private note is given\nonly to its author, to the users it mentions and to the members of\nthe teams it mentions.\n","required":["id","topic_id","message_id","author","body","global","tags","mentions","created_at","updated_at","edited","last_editor"],"properties":{"id":{"type":"integer"},"topic_id":{"type":"integer"},"message_id":{"type":["integer","null"],"description":"The message the note is on, null for a note on the thread itself"},"author":{"$ref":"#/components/schemas/NoteUser"},"body":{"type":"string","description":"Plain text as it was written, with its `@mentions` and `#tags`\nin place. Not HTML: escape it before showing it in a page.\n"},"global":{"type":"boolean","description":"True for a public note, which everyone can read"},"tags":{"type":"array","description":"The `#tags` of the body, lower case, without the `#`","items":{"type":"string"}},"mentions":{"type":"array","description":"The users and teams the note mentions; `@global`, which makes a\nnote public, is not one of them. Everyone who can read the note\ngets all of them, as on the site, also the name of a private\nteam they are not a member of.\n","items":{"$ref":"#/components/schemas/NoteMention"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"edited":{"type":"boolean","description":"True when the body was changed after the note was written.\nEarlier versions are not available.\n"},"last_editor":{"oneOf":[{"$ref":"#/components/schemas/NoteUser"},{"type":"null"}],"description":"Who changed the note last when that was not its author (an\nadmin can edit a public note), else null.\n"}}},"MessageDetail":{"type":"object","additionalProperties":false,"required":["id","url","html_url","topic_id","number","rfc_message_id","subject","created_at","state","sender","sender_alias","reply_to_id","depth","is_patch_submission","body","attachments","me","topic"],"properties":{"id":{"type":"integer"},"url":{"type":"string"},"html_url":{"type":"string","description":"The thread page of the site, at this message"},"topic_id":{"type":"integer"},"number":{"type":"integer","description":"Current position of the message in its thread, from 1, by\n`created_at` and `id`. It can change when older mail arrives\nlate, and may differ from the suffix of a branch name.\n"},"rfc_message_id":{"type":["string","null"],"description":"The Message-ID header, usually without angle brackets"},"subject":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"state":{"type":"string","enum":["sent","pending"],"description":"`pending` is a message written on the site that has not come back from the list yet"},"sender":{"$ref":"#/components/schemas/PersonBrief"},"sender_alias":{"$ref":"#/components/schemas/AliasRef","description":"The name and address this message was sent with"},"reply_to_id":{"type":["integer","null"],"description":"Id of the message this one answers, which can be in another thread"},"depth":{"type":"integer","description":"Replies above this message inside the thread, 0 for a root and for a reply to a message outside of it"},"is_patch_submission":{"type":"boolean","description":"True when at least one attachment of the message has `is_patch`\ntrue, see `Attachment`. The message is then a patchset.\n"},"body":{"type":["string","null"],"description":"As the `body` parameter asks, null for `none`"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/Attachment"}},"me":{"oneOf":[{"$ref":"#/components/schemas/MessageMe"},{"type":"null"}],"description":"The token owner's own state on the message, null without a token"},"topic":{"$ref":"#/components/schemas/TopicRef","description":"The thread the message is stored in"}}},"BranchBrief":{"type":"object","additionalProperties":false,"description":"The record of hackorum trying to apply this patchset. `status` says\nwhether it applied. A git branch to fetch exists only when\n`pushed_at` is set.\n","required":["id","branch_name","status","ci_status","pushed_at","url"],"properties":{"id":{"type":"integer"},"branch_name":{"type":"string","description":"The name the git branch has, or would have, `t\u003ctopic id\u003e_\u003cn\u003e`"},"status":{"type":"string","enum":["applied","failed"],"description":"Whether the patches applied"},"pushed_at":{"type":["string","null"],"format":"date-time","description":"When the branch was last pushed. Null means no git branch exists to fetch."},"ci_status":{"oneOf":[{"$ref":"#/components/schemas/CiStatus"},{"type":"null"}],"description":"CI verdict for the commit that is pushed now, null when CI never ran for this branch"},"url":{"type":"string"}}},"TopicRef":{"type":"object","additionalProperties":false,"description":"A thread, as the records that belong to one name it","required":["id","slug","title","url","html_url"],"properties":{"id":{"type":"integer"},"slug":{"type":["string","null"]},"title":{"type":"string"},"url":{"type":"string"},"html_url":{"type":"string"}}},"BranchState":{"type":"string","enum":["applies","awaiting_ci","needs_rebase","never_applied","wont_retry"],"description":"Where the patchset stands, as the CI pages of the site name it.\nIt is computed when the request is made, from the row, its thread\nand the master hackorum last fetched, so it can change while\n`updated_at` stays.\n\nThe values are tested in a fixed order and the first match wins:\n`wont_retry` when CI was skipped, when the patchset was mailed at\nor before the last commit linked to its thread, or when the thread\nwas merged into another; then `never_applied`, then `awaiting_ci`,\nthen `wont_retry` when the base is too old, then `applies`, and\n`needs_rebase` for the rest. So `wont_retry` outranks the others: a\nfrozen branch that applied does not read `applies`. Only a base\nthat is too old, with no other reason, comes after `never_applied`\nand `awaiting_ci`.\n\nA commit freezes only the patchsets that were there when it\nlanded. A patchset mailed after the last linked commit of its\nthread stays live.\n\n`applies`: the patches applied on the master of the last try\n(`master_apply_sha`), and the pushed branch is based on it. This\nsays nothing about CI, not all of these passed: read `ci_status`.\n\n`needs_rebase`: the patches do not apply on the current master\n(`master_apply_error`, `master_conflict_files`). The pushed branch\nstill exists, on the older base in `base_sha`, and `ci_status`\nrefers to that base. hackorum keeps trying master; it stays here\nuntil that works or the author sends a rebased patchset.\n\n`awaiting_ci`: the branch is not pushed yet, or it is pushed and\nits CI run has not finished. Wait and ask again.\n\n`never_applied`: the patches did not apply anywhere, `failure_stage`\nand `failure_reason` say why. There is nothing to fetch or test,\nignore the row. Careful with `failure_stage: empty`: such a row can\nstill have `pushed_at` and a pushed branch, which holds an empty\ncommit.\n\n`wont_retry`: frozen. hackorum will not rebase or re-run it again,\nbecause the patchset is not newer than the last commit linked to\nits thread, the thread was merged into another, the base is too\nold, or CI was skipped; `state_reason` says which. Its\nlast results stay: the branch when one was pushed, `ci_status` and\n`latest_run` are valid for the base in `base_sha`, not for the\ncurrent master.\n"},"CiStatus":{"type":"string","enum":["ci_none","pushed_awaiting_ci","push_failed","queued","running","success","build_failed","build_timeout","tests_failed","tests_timeout","cancelled","infra_error"],"description":"Where CI stands for a branch. `ci_none` hackorum\nruns no CI for this branch, `ci_skip_reason` says why.\n`pushed_awaiting_ci` the branch is pushed and no run was seen yet.\n`push_failed` the push did not work, it is tried again. `queued` the\nrun waits for a runner. `running` the run is in progress. `success`\nit built and every test passed. `build_failed` the build broke.\n`build_timeout` the build ran out of time. `tests_failed` it built\nand tests failed. `tests_timeout` the tests ran out of time.\n`cancelled` the run was cancelled. `infra_error` the run ended or\nwent silent without a usable result, which says nothing about the\npatches. The first three are set on a branch only, a run has a\n`CiRunStatus`.\n"},"CiRunStatus":{"type":"string","enum":["queued","running","success","build_failed","build_timeout","tests_failed","tests_timeout","cancelled","infra_error"],"description":"Where one run stands. The values mean what they mean in `CiStatus`."},"CiRun":{"type":"object","additionalProperties":false,"description":"One run of the CI workflow on a branch","required":["id","github_run_id","run_attempt","status","head_sha","pg_major","queued_at","started_at","completed_at","build_seconds","test_seconds","tests_total","failed_tests","image_ref","image_pull_ref","image_digest","created_at","github_url"],"properties":{"id":{"type":"integer"},"github_run_id":{"type":"integer","format":"int64"},"run_attempt":{"type":"integer","description":"From 1, a re-run of the same GitHub run has the next number"},"status":{"$ref":"#/components/schemas/CiRunStatus"},"head_sha":{"type":["string","null"],"description":"The commit that was tested"},"pg_major":{"type":["integer","null"]},"queued_at":{"type":["string","null"],"format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"build_seconds":{"type":["integer","null"]},"test_seconds":{"type":["integer","null"]},"tests_total":{"type":["integer","null"],"description":"Number of tests the run reported"},"failed_tests":{"type":"array","description":"Names of the tests that failed","items":{"type":"string"}},"image_ref":{"type":["string","null"],"description":"Docker image the run pushed, by tag. The tag is per thread and\nmoves: every later run of the thread overwrites it, also a run of\nanother patchset, so it may no longer be the image of this run.\n"},"image_pull_ref":{"type":["string","null"],"description":"The image of exactly this run, as `\u003crepository\u003e@\u003cdigest\u003e`. Pull\nthis one. Null when the run recorded no digest.\n"},"image_digest":{"type":["string","null"],"description":"Digest of the image this run built"},"created_at":{"type":"string","format":"date-time","description":"When hackorum first saw the run. The list of runs is ordered by it."},"github_url":{"type":"string","description":"The run on GitHub"}}},"Event":{"description":"One thing that happened. `type` says which, and which of `message`,\n`patchset`, `branch` and `ci_run` the event has: exactly one.\n","oneOf":[{"$ref":"#/components/schemas/MessageReceivedEvent"},{"$ref":"#/components/schemas/PatchsetPostedEvent"},{"$ref":"#/components/schemas/BranchCreatedEvent"},{"$ref":"#/components/schemas/CiCompletedEvent"}]},"MessageReceivedEvent":{"description":"A message arrived on a list or was sent through the site","type":"object","additionalProperties":false,"required":["id","type","occurred_at","recorded_at","topic","author","message"],"properties":{"id":{"type":"integer","description":"Position of the event in the feed"},"type":{"const":"message.received"},"occurred_at":{"type":"string","format":"date-time","description":"The date of the message, which can be well before `recorded_at` for mail that came late"},"recorded_at":{"type":"string","format":"date-time","description":"When hackorum recorded the event. `since` as a time goes by this."},"topic":{"$ref":"#/components/schemas/TopicRef"},"author":{"oneOf":[{"$ref":"#/components/schemas/PersonBrief"},{"type":"null"}],"description":"The sender of the message"},"message":{"$ref":"#/components/schemas/Message"}}},"PatchsetPostedEvent":{"description":"A message turned out to carry patches","type":"object","additionalProperties":false,"required":["id","type","occurred_at","recorded_at","topic","author","patchset"],"properties":{"id":{"type":"integer","description":"Position of the event in the feed"},"type":{"const":"patchset.posted"},"occurred_at":{"type":"string","format":"date-time","description":"The date of the message"},"recorded_at":{"type":"string","format":"date-time","description":"When hackorum recorded the event. `since` as a time goes by this."},"topic":{"$ref":"#/components/schemas/TopicRef"},"author":{"oneOf":[{"$ref":"#/components/schemas/PersonBrief"},{"type":"null"}],"description":"The sender of the message"},"patchset":{"$ref":"#/components/schemas/Patchset"}}},"BranchCreatedEvent":{"description":"hackorum tried to apply a patchset for the first time","type":"object","additionalProperties":false,"required":["id","type","occurred_at","recorded_at","topic","author","branch"],"properties":{"id":{"type":"integer","description":"Position of the event in the feed"},"type":{"const":"branch.created"},"occurred_at":{"type":"string","format":"date-time","description":"When the patchset was applied, or failed to"},"recorded_at":{"type":"string","format":"date-time","description":"When hackorum recorded the event. `since` as a time goes by this."},"topic":{"$ref":"#/components/schemas/TopicRef"},"author":{"oneOf":[{"$ref":"#/components/schemas/PersonBrief"},{"type":"null"}],"description":"The sender of the patchset"},"branch":{"$ref":"#/components/schemas/Branch"}}},"CiCompletedEvent":{"description":"A CI run reached its final status. A run is reported again, with a new id, if its verdict changes.","type":"object","additionalProperties":false,"required":["id","type","occurred_at","recorded_at","topic","author","ci_run"],"properties":{"id":{"type":"integer","description":"Position of the event in the feed"},"type":{"const":"ci.completed"},"occurred_at":{"type":"string","format":"date-time","description":"When the run completed"},"recorded_at":{"type":"string","format":"date-time","description":"When hackorum recorded the event. `since` as a time goes by this."},"topic":{"$ref":"#/components/schemas/TopicRef"},"author":{"oneOf":[{"$ref":"#/components/schemas/PersonBrief"},{"type":"null"}],"description":"The sender of the patchset the run tested"},"ci_run":{"$ref":"#/components/schemas/EventCiRun"}}},"EventCiRun":{"type":"object","additionalProperties":false,"description":"A CI run as an event carries it: a `CiRun` with its branch, and how\nit compares to the run before it on the branch\n","required":["id","github_run_id","run_attempt","status","head_sha","pg_major","queued_at","started_at","completed_at","build_seconds","test_seconds","tests_total","failed_tests","image_ref","image_pull_ref","image_digest","created_at","github_url","branch","first_run","previous_status"],"properties":{"id":{"type":"integer"},"github_run_id":{"type":"integer","format":"int64"},"run_attempt":{"type":"integer","description":"From 1, a re-run of the same GitHub run has the next number"},"status":{"$ref":"#/components/schemas/CiRunStatus"},"head_sha":{"type":["string","null"],"description":"The commit that was tested"},"pg_major":{"type":["integer","null"]},"queued_at":{"type":["string","null"],"format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"build_seconds":{"type":["integer","null"]},"test_seconds":{"type":["integer","null"]},"tests_total":{"type":["integer","null"],"description":"Number of tests the run reported"},"failed_tests":{"type":"array","description":"Names of the tests that failed","items":{"type":"string"}},"image_ref":{"type":["string","null"],"description":"Docker image the run pushed, by tag. The tag is per thread and\nmoves: every later run of the thread overwrites it, also a run of\nanother patchset, so it may no longer be the image of this run.\n"},"image_pull_ref":{"type":["string","null"],"description":"The image of exactly this run, as `\u003crepository\u003e@\u003cdigest\u003e`. Pull\nthis one. Null when the run recorded no digest.\n"},"image_digest":{"type":["string","null"],"description":"Digest of the image this run built"},"created_at":{"type":"string","format":"date-time","description":"When hackorum first saw the run. The list of runs is ordered by it."},"github_url":{"type":"string","description":"The run on GitHub"},"branch":{"$ref":"#/components/schemas/BranchBrief"},"first_run":{"type":"boolean","description":"True when no run of the branch had finished before this one, as of when the event was recorded"},"previous_status":{"oneOf":[{"$ref":"#/components/schemas/CiRunStatus"},{"type":"null"}],"description":"The final status of the run before this one on the branch, as of\nwhen the event was recorded. Null for a first run. With\n`ci_runs=changed` it differs from `status`, except on a run that\nis reported again because its own verdict changed.\n"}}},"Branch":{"type":"object","additionalProperties":false,"description":"The record of hackorum trying to apply a patchset, and where it\nstands on CI. A git branch exists only when `pushed_at` is set.\n","required":["id","url","html_url","branch_name","topic","message_id","status","failure_stage","failure_reason","conflict_files","state","state_reason","superseded","base_sha","base_source","base_committed_at","on_master","pg_major","behind","attempted_at","pushed_at","pushed_head_sha","github_url","git_url","last_master_apply_at","master_apply_sha","master_apply_error","master_conflict_files","ci_status","ci_skip_reason","latest_run","created_at","updated_at"],"properties":{"id":{"type":"integer"},"url":{"type":"string"},"html_url":{"type":"string","description":"The CI page of the thread on the site"},"branch_name":{"type":"string","description":"`t\u003ctopic id\u003e_\u003cn\u003e`. n is the position the patch message had in\nits thread when the branch was first built and is not changed\nafter, so it can differ from the `number` of the message now.\nThe git branch of that name exists only when `pushed_at` is set.\n"},"topic":{"$ref":"#/components/schemas/TopicRef"},"message_id":{"type":"integer","description":"Numeric id of the patch message; use `/messages/{message_id}`"},"status":{"type":"string","enum":["applied","failed"],"description":"Whether the patches applied when the branch was built"},"failure_stage":{"type":["string","null"],"enum":["extract","base_detection","apply","error","empty",null],"description":"Where building the branch failed"},"failure_reason":{"type":["string","null"],"description":"Output of the failed step, the first 2000 characters"},"conflict_files":{"type":"array","items":{"type":"string"}},"state":{"$ref":"#/components/schemas/BranchState"},"state_reason":{"type":["string","null"],"description":"Why the state is `wont_retry`. `committed`: the patchset was\nmailed at or before the last commit linked to its thread.\n`merged thread`: the thread was merged into another.\n`base too old`: the base is too far behind master. When CI was\nskipped, the text of `ci_skip_reason` (`ci_none` when none was\nstored). Null for every other state.\n"},"superseded":{"type":"boolean","description":"True when the thread has a newer patchset. hackorum only works\non the newest patchset of a thread, so a superseded row is\nfrozen whatever `state` reads: it is not rebased or tested\nagain. Becoming superseded does not move `updated_at`.\n"},"base_sha":{"type":["string","null"],"description":"The commit the patches were applied on"},"base_source":{"type":["string","null"],"enum":["master","history","submission_head","base_line","master_head",null],"description":"How the base commit was chosen. `master` the master of that time.\nThe others are used when master did not work: `base_line` the\nbase commit named in the patch, `master_head` and `history` a\nmaster commit whose files match the ones the patches were made\nfrom, the newest or an older one, `submission_head` master as\nit was when the patch was sent.\n"},"base_committed_at":{"type":["string","null"],"format":"date-time"},"on_master":{"type":"boolean","description":"True when the base was the master of that time"},"pg_major":{"type":["integer","null"]},"behind":{"type":["object","null"],"additionalProperties":false,"description":"How far the base is behind the master hackorum last fetched, never\nnegative. Null when hackorum has no master yet or knows nothing\nabout the base. One of the two can be null alone.\n","required":["days","commits"],"properties":{"days":{"type":["integer","null"]},"commits":{"type":["integer","null"]}}},"attempted_at":{"type":["string","null"],"format":"date-time"},"pushed_at":{"type":["string","null"],"format":"date-time"},"pushed_head_sha":{"type":["string","null"],"description":"The commit at the tip of the pushed branch. It changes with every rebase."},"github_url":{"type":["string","null"],"description":"The branch on GitHub, null until it is pushed"},"git_url":{"type":["string","null"],"description":"Clone URL of the git repository the branch is pushed to, null\nuntil it is pushed. Fetch `branch_name` from it:\n`git fetch \u003cgit_url\u003e \u003cbranch_name\u003e`.\n"},"last_master_apply_at":{"type":["string","null"],"format":"date-time","description":"When the patches were last tried on master"},"master_apply_sha":{"type":["string","null"],"description":"The master commit of that try"},"master_apply_error":{"type":["string","null"],"description":"Why that try failed, the first 2000 characters. Null when it worked."},"master_conflict_files":{"type":"array","items":{"type":"string"}},"ci_status":{"oneOf":[{"$ref":"#/components/schemas/CiStatus"},{"type":"null"}],"description":"CI verdict for `pushed_head_sha`, null when CI never ran for this\nbranch. A new push sets it to `pushed_awaiting_ci` until a run\nof that commit is seen.\n"},"ci_skip_reason":{"type":["string","null"],"description":"Why CI was skipped or could not run"},"latest_run":{"oneOf":[{"$ref":"#/components/schemas/CiRun"},{"type":"null"}],"description":"The last run hackorum accepted for this branch. After a new push\nit is still the run of the previous commit until a run of the\nnew one is seen: it describes the pushed commit only when\n`latest_run.head_sha` equals `pushed_head_sha`, and its `status`\ncan differ from `ci_status`.\n"},"created_at":{"type":"string","format":"date-time","description":"When hackorum first recorded the patchset. It never changes, so it tells a new patchset from a rebase."},"updated_at":{"type":"string","format":"date-time","description":"When the row last changed: a try to apply, a push, a CI result.\nNot every change of what you read moves it. `state` is computed\nper request, and a branch being superseded, a commit getting\nlinked to its thread, the thread getting merged, or the base\ngrowing too old change `superseded`, `state` and `state_reason`\nwithout touching it.\n"}}},"Patchset":{"type":"object","additionalProperties":false,"description":"A message that carries patches","required":["message_id","number","url","html_url","created_at","subject","sender","topic","files","changed_paths","branch","download_url"],"properties":{"message_id":{"type":"integer","description":"Numeric id of the message; use `/messages/{message_id}`"},"number":{"type":"integer","description":"Current position of the message in its thread, from 1, by\n`created_at` and `id`. The site shows it as the version of the\npatchset. It can change when older mail arrives late, and may\ndiffer from the suffix of a branch name.\n"},"url":{"type":"string","description":"The message that carries the patchset in this API, `/messages/{message_id}`"},"html_url":{"type":"string","description":"The thread page of the site, at this message"},"created_at":{"type":"string","format":"date-time"},"subject":{"type":"string"},"sender":{"$ref":"#/components/schemas/PersonBrief"},"topic":{"$ref":"#/components/schemas/TopicRef"},"files":{"type":"array","description":"The patch files of the message, the same set the `download_url`\narchive contains. Each has `is_patch` true.\n","items":{"$ref":"#/components/schemas/Attachment"}},"changed_paths":{"type":"array","description":"Paths in the source tree the patches touch, sorted in database\ncollation order. An empty array can also mean the paths were not\nextracted for that message.\n","items":{"type":"string"}},"branch":{"oneOf":[{"$ref":"#/components/schemas/BranchBrief"},{"type":"null"}],"description":"Null when hackorum never tried to apply this message"},"download_url":{"type":"string","description":"The patch files of the message as one tar.gz. A URL of the\nsite, not under `/api/v1`: it takes no token and is not counted\nagainst the API rate limit.\n"},"lineage":{"oneOf":[{"$ref":"#/components/schemas/PatchsetStep"},{"type":"null"}],"description":"What a language model said this patchset derives from, in the\nlatest finished lineage run of its thread. Null when the thread\nhas no such run or the run has nothing for this message. Model\noutput with a confidence, not fact.\n"}}},"StepKind":{"type":"string","enum":["resend","rebase","minor_revision","major_rework","remainder","fix_on_top","new_series"],"description":"How a patchset relates to its parent, as a language model judged it.\n`resend`: the same content sent again. `rebase`: the same change on\na newer base. `minor_revision`: review feedback applied, the same\ndesign. `major_rework`: the same need, done differently.\n`remainder`: part of the series was committed, the rest sent again.\n`fix_on_top`: a delta against an earlier patchset, not a full\nversion. `new_series`: new work in the thread, without a parent.\n"},"PatchsetStep":{"type":"object","additionalProperties":false,"description":"One step of the lineage of a thread: the patchset a patchset derives\nfrom. Written by a language model, it can be wrong.\n","required":["parent_message_id","step_kind","confidence","reason"],"properties":{"parent_message_id":{"type":["integer","null"],"description":"The message that carries the earlier patchset this one derives\nfrom, as the model judged it. Null when it has none.\n"},"step_kind":{"$ref":"#/components/schemas/StepKind"},"confidence":{"type":"number","minimum":0,"maximum":1,"description":"How sure the model said it is, from 0 to 1"},"reason":{"type":["string","null"],"description":"The model's reason, in its own words. Can have `[msg:\u003cid\u003e]` and `[commit:\u003csha\u003e]` tokens."}}},"Lineage":{"type":"object","additionalProperties":false,"description":"The latest finished lineage run of a thread. All of it is written by\na language model and can be wrong.\n","required":["run","story","steps"],"properties":{"run":{"type":"object","additionalProperties":false,"required":["id","model","finished_at"],"properties":{"id":{"type":"integer","description":"Changes when the thread is processed again"},"model":{"type":["string","null"],"description":"Name of the language model, null when it was not recorded"},"finished_at":{"type":["string","null"],"format":"date-time"}}},"story":{"type":"array","description":"The story of the thread as the model told it, one entry per\nline, in order. Empty when the run wrote none.\n","items":{"type":"object","additionalProperties":false,"required":["text","message_ids","commit_shas"],"properties":{"text":{"type":"string","description":"Model-written text, as stored. A `[msg:\u003cid\u003e]` token names\na message (`/messages/{id}`), a `[commit:\u003csha\u003e]` token a\ncommit of the PostgreSQL repository by its full sha.\n"},"message_ids":{"type":"array","description":"The ids of the `[msg:\u003cid\u003e]` tokens of `text`, each once, in order of appearance. The model wrote them, a message may not exist.","items":{"type":"integer"}},"commit_shas":{"type":"array","description":"The shas of the `[commit:\u003csha\u003e]` tokens of `text`, each once, in order of appearance","items":{"type":"string"}}}}},"steps":{"type":"array","description":"The messages the run judged, in thread order. Model output with\na confidence each. A step's message is usually a patchset, but\nit can be a message that `/topics/{id}/patchsets` does not\nlist. A patchset newer than the run is not here.\n","items":{"type":"object","additionalProperties":false,"required":["message_id","parent_message_id","step_kind","confidence","reason"],"properties":{"message_id":{"type":"integer","description":"The message that carries the patchset"},"parent_message_id":{"type":["integer","null"],"description":"The message that carries the earlier patchset this one\nderives from, as the model judged it. Null when it has none.\n"},"step_kind":{"$ref":"#/components/schemas/StepKind"},"confidence":{"type":"number","minimum":0,"maximum":1,"description":"How sure the model said it is, from 0 to 1"},"reason":{"type":["string","null"],"description":"The model's reason, in its own words. Can have `[msg:\u003cid\u003e]` and `[commit:\u003csha\u003e]` tokens."}}}}}},"CommitVerdict":{"type":"object","additionalProperties":false,"description":"What a language model concluded about a commit and the patchsets of\nthe thread. Model output with a confidence, it can be wrong.\n","required":["verdict","confidence","change_level","origin","source_message_id","evidence","reviewers_final","reviewers_earlier","reviewers_none","reviews"],"properties":{"verdict":{"type":"string","enum":["as_is","modified","partial","from_discussion","other_thread","undecided"],"description":"The model's judgement. `as_is`: a posted patchset landed as\nposted. `modified`: a posted patchset was changed before the\ncommit. `partial`: the commit is part of a posted patchset.\n`from_discussion`: written from the discussion, no posted patch\nmatches. `other_thread`: the commit landed from a patch posted\non another thread. `undecided`: the model could not tell.\n"},"confidence":{"type":"number","minimum":0,"maximum":1,"description":"How sure the model said it is, from 0 to 1"},"change_level":{"type":["string","null"],"enum":["light","moderate","significant",null],"description":"How much the committed change differs from the posted patchset,\nas the model judged it. `light`: formatting, naming, comments,\ntests. `moderate`: local logic. `significant`: the approach\nchanged. Null when nothing was changed or it was not judged.\n"},"origin":{"type":"string","enum":["trailer","overlap","manual","previous","extra"],"description":"Why the commit was given to the model. `trailer`: its\n`Discussion:` trailer names the thread. `overlap`: it changes\nthe same files as a patchset. `manual`: given by hand.\n`previous`: linked by an earlier run. `extra`: the model found\nthe commit itself.\n"},"source_message_id":{"type":["integer","null"],"description":"The message whose patchset the model says the commit comes from, null when it named none"},"evidence":{"type":["string","null"],"description":"The model's reasoning, in its own words. Can have `[msg:\u003cid\u003e]` and `[commit:\u003csha\u003e]` tokens."},"reviewers_final":{"type":"integer","description":"Entries of `reviews` with coverage `final`"},"reviewers_earlier":{"type":"integer","description":"Entries of `reviews` with coverage `earlier`"},"reviewers_none":{"type":"integer","description":"Entries of `reviews` with coverage `none`"},"reviews":{"type":"array","description":"Per reviewer, which version of the patch the model says they\nlooked at. Model output.\n","items":{"type":"object","additionalProperties":false,"required":["reviewer","coverage","source","note"],"properties":{"reviewer":{"type":"string","description":"Name of the reviewer, as the commit message or the model has it"},"coverage":{"type":"string","enum":["final","earlier","none"],"description":"`final`: reviewed the version that was committed.\n`earlier`: reviewed an earlier version only. `none`: the\nmodel found no review by them in the thread.\n"},"source":{"type":["string","null"],"description":"Where the reviewer comes from. `trailer`: the commit\nmessage credits them. `committer`: they committed the\npatch, which counts as a review of the final version.\n`llm`: the model named them from the thread, the commit\nmessage does not. Null on old data.\n"},"note":{"type":["string","null"],"description":"The model's remark on this reviewer. Can have `[msg:\u003cid\u003e]` tokens."}}}}}},"CommitRole":{"type":"string","enum":["author","reviewer","tested_by","reported_by","co_author","committer"]},"CommitGroup":{"type":"object","additionalProperties":false,"description":"A change in the PostgreSQL repository together with its backports.\nThe fields describe the commit that landed the change, on master when\nthat one is linked to the thread. Commits are not a resource of this\nAPI: there is no `id` and `url` is the upstream page of the commit.\n","required":["sha","subject","committed_at","committer_name","url","branches","people"],"properties":{"link_source":{"type":"string","enum":["trailer","llm"],"description":"How the entry is linked to the thread. `trailer`: a commit of\nthe entry names the thread in a `Discussion:` trailer. `llm`: a\nlanguage model linked it, which can be wrong.\n"},"verdict":{"oneOf":[{"$ref":"#/components/schemas/CommitVerdict"},{"type":"null"}],"description":"What the latest finished lineage run of the thread concluded\nabout the entry. Null when there is no run or it has no verdict\nto show for the entry. Model output with a confidence.\n"},"sha":{"type":"string"},"subject":{"type":"string"},"committed_at":{"type":"string","format":"date-time"},"committer_name":{"type":["string","null"]},"url":{"type":"string","description":"The commit on the GitHub mirror of the repository"},"branches":{"type":"array","description":"The branches the change is on, master first, then the stable\nbranches from the newest. One row per branch.\n","items":{"type":"object","additionalProperties":false,"required":["branch","version","released_in"],"properties":{"branch":{"type":"string","description":"Branch name, `master` or like `REL_18_STABLE`"},"version":{"type":"string","description":"`devel` for master, else the version of the branch, like `18` or `9.6`"},"released_in":{"type":["string","null"],"description":"The first release with the change on this branch, null when not released yet"}}}},"people":{"type":"array","description":"The people the commit messages of the entry credit, each once per\nrole, in the order of the `CommitRole` values and by name inside\na role. A committer of a patch whose commit message names\nsomebody else as the author is also listed as a `reviewer`.\nA credit without a name is left out. The list also has the\ncredits a language model added, and the committer is listed as a\n`reviewer` also where only a model named the author.\n","items":{"type":"object","additionalProperties":false,"required":["role","name","person"],"properties":{"role":{"$ref":"#/components/schemas/CommitRole"},"name":{"type":"string","description":"The `name` of `person`, or the name as the commit message\nhas it when no person is known\n"},"person":{"oneOf":[{"$ref":"#/components/schemas/PersonBrief"},{"type":"null"}],"description":"Null when the credit could not be matched to a person"},"source":{"type":"string","enum":["parsed","committer","llm"],"description":"Where the credit comes from. `parsed`: the commit\nmessage. `committer`: the committer of somebody else's\npatch, counted as a reviewer. `llm`: a language model\nnamed the person from the thread, which can be wrong. A\ncredit several sources give has the first of these.\n"}}}}}},"SavedSearch":{"type":"object","additionalProperties":false,"description":"One entry of the saved searches offered to a user. A team template gives one entry per team, so `id` alone does not name an entry, `id` and `team` do.","required":["id","name","query","scope","team","default","topics_url"],"properties":{"id":{"type":"integer","description":"The `saved_search_id` of `/topics`"},"name":{"type":"string"},"query":{"type":"string","description":"The query in the search language of `/topics`, for a team entry with the team name filled in"},"scope":{"type":"string","enum":["global","user","team"],"description":"`global`: offered to everyone. `user`: the owner's own, or one\nevery signed-in user gets. `team`: of one team, or a template\nrun for a team.\n"},"team":{"description":"The team the entry is run for, null unless `scope` is `team`","oneOf":[{"type":"object","additionalProperties":false,"required":["id","name"],"properties":{"id":{"type":"integer","description":"The `team_id` of `/topics`"},"name":{"type":"string"}}},{"type":"null"}]},"default":{"type":"boolean","description":"True for the search the owner chose as the start page of the site. A template chosen as default is marked in each of its entries."},"topics_url":{"type":"string","description":"The `/topics` request that runs the entry"}}},"Activity":{"type":"object","additionalProperties":false,"required":["id","type","created_at","read_at","topic","message_id","note_id","title"],"properties":{"id":{"type":"integer"},"type":{"type":"string","enum":["topic_message_received","note_created","note_mentioned"],"description":"`topic_message_received`: a new message in a thread the owner\nstarred. `note_created`: the owner wrote a note.\n`note_mentioned`: a note mentions the owner or a team of the\nowner.\n"},"created_at":{"type":"string","format":"date-time"},"read_at":{"type":["string","null"],"format":"date-time","description":"When the owner opened the entry on the site, null while it is\nunread. An entry about a note the owner wrote is created\nalready read.\n"},"topic":{"description":"The thread the message or note is in now, so after a merge the\nthread it was merged into. When the note is gone or no longer\nvisible to the owner, or the message is gone, the thread\nrecorded when the entry was made; if that thread was merged\nsince, following its `url` redirects. Null when that thread is\ngone too.\n","oneOf":[{"$ref":"#/components/schemas/TopicRef"},{"type":"null"}]},"message_id":{"type":["integer","null"],"description":"The message the entry is about, or the message the note is on. Null for a note on the thread itself and when the message or note cannot be given."},"note_id":{"type":["integer","null"],"description":"The note the entry is about, as `/topics/{id}/notes` lists it. Null for a message entry, and when the note was deleted or is no longer visible to the owner."},"title":{"type":"string","description":"The label the site gives the entry, for example \"New message from Tom Lane\""}}},"DraftState":{"type":"string","enum":["in_progress","failed","sending","sent"],"description":"`in_progress`: not sent, can be changed. `failed`: a send on the\nsite failed, see `last_send_error`; it can be changed and sent\nagain there. `sending`: the site is sending it right now, it\ncannot be changed. `sent`: it was sent and stays as a record,\nit cannot be changed or deleted. Only the site moves a draft to\n`sending` and `sent`.\n"},"DraftToken":{"type":"object","additionalProperties":false,"required":["token_name"],"properties":{"token_name":{"type":"string","description":"The name the owner gave the token. A revoked token keeps it."}}},"DraftAttachment":{"type":"object","additionalProperties":false,"required":["id","file_name","content_type","byte_size"],"properties":{"id":{"type":"integer"},"file_name":{"type":"string","description":"The name as it is stored, which can differ from the one that was sent"},"content_type":{"type":["string","null"],"description":"The media type as it is stored, which can differ from the one that was sent"},"byte_size":{"type":"integer","description":"The size of the decoded content"}}},"DraftBrief":{"type":"object","additionalProperties":false,"description":"A draft as the list gives it, without the text and the recipients","required":["id","url","html_url","state","topic","reply_to_message_id","subject","sender","attachments","last_send_error","created_via","last_edited_via","sent_message_id","sent_at","created_at","updated_at"],"properties":{"id":{"type":"integer"},"url":{"type":"string"},"html_url":{"type":"string","description":"Where the owner finds the draft on the site, signed in: the\nthread, at the message it replies to, where the composer opens\nwith the draft and has the send button. For a sent draft, the\npage of the sent mail.\n"},"state":{"$ref":"#/components/schemas/DraftState"},"topic":{"$ref":"#/components/schemas/TopicRef"},"reply_to_message_id":{"type":"integer","description":"The message the draft replies to"},"subject":{"type":"string"},"sender":{"type":"object","additionalProperties":false,"description":"The address of the owner the mail is sent from","required":["name","email"],"properties":{"name":{"type":"string"},"email":{"type":"string"}}},"attachments":{"type":"array","description":"The files attached to the draft, without their content","items":{"$ref":"#/components/schemas/DraftAttachment"}},"last_send_error":{"type":["string","null"],"description":"Why the last send on the site failed, null when none did. Set in the state `failed`."},"created_via":{"description":"The token the draft was made with, null for a draft made on the site","oneOf":[{"$ref":"#/components/schemas/DraftToken"},{"type":"null"}]},"last_edited_via":{"description":"The token that changed the draft last, null when it was not changed through the API or was edited on the site since","oneOf":[{"$ref":"#/components/schemas/DraftToken"},{"type":"null"}]},"sent_message_id":{"type":["integer","null"],"description":"The message the sent draft became, null before"},"sent_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time","description":"Changes with every change of the draft. `PATCH` takes it back to detect a change in between."}}},"Draft":{"type":"object","additionalProperties":false,"required":["id","url","html_url","state","topic","reply_to_message_id","subject","body","sender","recipients","recipients_error","attachments","last_send_error","created_via","last_edited_via","sent_message_id","sent_at","created_at","updated_at"],"properties":{"id":{"type":"integer"},"url":{"type":"string"},"html_url":{"type":"string","description":"Where the owner finds the draft on the site, signed in: the\nthread, at the message it replies to, where the composer opens\nwith the draft and has the send button. For a sent draft, the\npage of the sent mail.\n"},"state":{"$ref":"#/components/schemas/DraftState"},"topic":{"$ref":"#/components/schemas/TopicRef"},"reply_to_message_id":{"type":"integer","description":"The message the draft replies to"},"subject":{"type":"string"},"body":{"type":"string","description":"The text of the mail, plain text"},"sender":{"type":"object","additionalProperties":false,"description":"The address of the owner the mail is sent from","required":["name","email"],"properties":{"name":{"type":"string"},"email":{"type":"string"}}},"recipients":{"type":["object","null"],"additionalProperties":false,"description":"Who a send would go to now, as mail addresses with or without\na display name. They follow from the message replied to and\nits mailing list and cannot be set. Null when they cannot be\nworked out, `recipients_error` then says why.\n","required":["to","cc"],"properties":{"to":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}}}},"recipients_error":{"type":["string","null"],"description":"Why `recipients` is null, in a few words for people. Null when there are recipients."},"attachments":{"type":"array","description":"The files attached to the draft, without their content","items":{"$ref":"#/components/schemas/DraftAttachment"}},"last_send_error":{"type":["string","null"],"description":"Why the last send on the site failed, null when none did. Set in the state `failed`."},"created_via":{"description":"The token the draft was made with, null for a draft made on the site","oneOf":[{"$ref":"#/components/schemas/DraftToken"},{"type":"null"}]},"last_edited_via":{"description":"The token that changed the draft last, null when it was not changed through the API or was edited on the site since","oneOf":[{"$ref":"#/components/schemas/DraftToken"},{"type":"null"}]},"sent_message_id":{"type":["integer","null"],"description":"The message the sent draft became, null before"},"sent_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time","description":"Changes with every change of the draft. `PATCH` takes it back to detect a change in between."}}},"DraftCreate":{"type":"object","additionalProperties":false,"required":["reply_to_message_id"],"properties":{"reply_to_message_id":{"type":"integer","minimum":1,"description":"The message to reply to. Required for now, drafts that start a thread are not supported yet."},"subject":{"type":"string","minLength":1,"maxLength":998,"description":"One line. Without it the subject of the message replied to,\nwith one leading `Re:`, `Aw:` or `Fwd:` taken off and `Re: `\nin front.\n"},"body":{"type":"string","description":"The text of the mail, plain text, at most 1 MB of UTF-8. Empty without it."},"quote":{"type":"string","description":"Text of the message replied to, at most 100 KB. It is put in\nfront of `body` as the composer of the site does it: an\nattribution line, the text with `\u003e ` before every line, an\nempty line. To place quotes yourself, leave it out and write\nthem into `body`.\n"}}},"DraftAttachmentCreate":{"type":"object","additionalProperties":false,"required":["file_name","content_base64"],"properties":{"file_name":{"type":"string","minLength":1,"maxLength":255,"description":"The name of the file, one line. Only the last part of a path\nis kept, a double quote, a backslash or a control character\nbecomes `_`, and invisible format characters and line or\nparagraph separators are taken out. A name of dots only, or\nwith nothing left, is stored as `attachment`.\n"},"content_type":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[A-Za-z0-9!#$\u0026^_.+-]+/[A-Za-z0-9!#$\u0026^_.+-]+( *; *[A-Za-z0-9!#$\u0026^_.+-]+=([A-Za-z0-9!#$\u0026^_.+-]+|\"[^\"\\\\]*\"))*$","description":"The media type the mail gives the file, such as `text/x-diff`.\n`application/octet-stream` without it. It is stored as\n`type/subtype` in lower case. Of the parameters only `charset`\nis kept, when it is `utf-8`, `us-ascii`, `iso-8859-1`,\n`iso-8859-15` or `windows-1252`. `multipart/*`, `message/*`\nand a type or subtype of more than 64 characters are stored as\n`application/octet-stream`. It is not checked against the\ncontent.\n"},"content_base64":{"type":"string","minLength":1,"description":"The content of the file in Base64 with padding, the standard\nalphabet. Line breaks and spaces in it are ignored, so the\noutput of the `base64` tool can be sent as it is. Not empty.\nThe files of a draft may have 2 MB together, in decoded bytes.\n"}}},"DraftUpdate":{"type":"object","additionalProperties":false,"properties":{"subject":{"type":"string","minLength":1,"maxLength":998,"description":"One line, not blank"},"body":{"type":"string","description":"The text of the mail, plain text, at most 1 MB of UTF-8. It replaces the whole text."},"updated_at":{"type":"string","format":"date-time","description":"The `updated_at` of the draft as the client saw it last. When\nthe draft has another one now, the request is refused with 409\n`conflict`. Compared to the millisecond, as it is printed.\n"}}},"Me":{"type":"object","additionalProperties":false,"required":["username","person","emails","features","send_authorized","token"],"properties":{"username":{"type":["string","null"]},"person":{"oneOf":[{"$ref":"#/components/schemas/PersonBrief"},{"type":"null"}]},"emails":{"type":"array","items":{"type":"string"},"description":"Verified addresses of the account"},"features":{"type":"array","items":{"type":"string"},"description":"Feature flags enabled for the account"},"send_authorized":{"type":"boolean","description":"True when the account has a Gmail identity authorized for sending mail from the site. This API cannot send."},"token":{"type":"object","additionalProperties":false,"required":["name","created_at","expires_at"],"properties":{"name":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time"}}}}}}}}