Search API
Search, and find and replace across pages
GET /orgs/{org}/search
Searches the org as the caller: pages, entries, comments, attachment text and actors, ranked by hybrid fusion, filtered by permission.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
q | query | string | The query (§9.1): words, "phrases", -exclusions and operators. |
type | query | string | Comma-separated types: page, entry, comment, attachment, actor (the same as type: in q). |
mode | query | string | hybrid (default), fts, fuzzy or semantic. |
limit | query | integer (int64) | Page size (default 50, at most 200). |
cursor | query | string | next_cursor from the previous page. |
Responses
200- OK. SearchResults
application/json 422- invalid_query
GET /orgs/{org}/search/replace
Every match of a text across the pages the caller can read.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
find required | query | string | The text to find. |
case_sensitive | query | boolean | Match case. |
whole_word | query | boolean | Whole words only. |
scope | query | string | A space slug or page reference to limit to. |
Responses
200- OK. Preview
application/json
POST /orgs/{org}/search/replace
Replaces the selected matches: one commit per page in one transaction, with an undo receipt.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
Request body
application/json, ApplySpec.
Responses
200- OK. Applied
application/json 409- revision_conflict
GET /search
Searches every hat under each org's own authorisation, merged by score.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
q | query | string | The query (§9.1): words, "phrases", -exclusions and operators. |
type | query | string | Comma-separated types: page, entry, comment, attachment, actor (the same as type: in q). |
mode | query | string | hybrid (default), fts, fuzzy or semantic. |
limit | query | integer (int64) | Page size (default 50, at most 200). |
cursor | query | string | next_cursor from the previous page. |
Responses
200- OK. SearchResults
application/json