Global search across initiatives, projects, tasks, issues, feedback, and comments
GET/api/search
Global search across initiatives, projects, tasks, issues, feedback, and comments. Results are relevance-ranked per group (websearch_to_tsquery + ts_rank, multi-term AND semantics with the last term prefix-matched for type-ahead), capped at 10 rows per group. A query that is exactly a task or issue key (e.g. PT-24, case-insensitive) pins that record to the top of its group. A bare number (e.g. 250) pins the tasks and issues whose key ends in that number (PT-250, and zero-padded keys like TSA-0250; leading zeros in the query are ignored) to the top of its group, subject to the same 10-row cap, most recently updated first; the number must be the whole key number, so 25 and 2500 do not match or pin PT-250 (they may still surface it as an unpinned trigram similarity hit). A bare pull-request reference (1360, #1360, PR 1360, or PR#1360) pins the task whose pr_link points at that PR to the top of the tasks group; a bare number is ambiguous, so it runs both lookups and lists key-number matches ahead of pr_link matches. A group with no ranked match falls back to trigram (pg_trgm) word similarity, so typos and partial tokens still match (comments are ranked-stage only). A blank query returns the empty grouped shape. The comments group merges task and issue comments as plain-text snippets and applies the comment-feed visibility rules: soft-deleted bodies are never returned, task comments require full tasks.read, and internal issue comments require projects.issues.manage.
Request
Responses
- 200
- 401
- 403
Successful response
Unauthorized — authentication credentials are missing or invalid
Forbidden — the x-act-as-org selector named an organisation the caller is not an ACTIVE member of (or the caller lacks the required permission).