# Search

Search across the records that you can see.

1 operation(s) for tokens, 2 app-only. The full schemas are in [openapi.json](https://docs.youniton.com/openapi.json) (search the operation ID).

## Global search — at most 20 grouped, permission-filtered hits (scope workspace for ⌘K, admin for administration search)

`GET /search`

- Operation ID: `searchGlobal`
- Call with: Personal access token, ability `search:read`
- Feature: F-SRC-01

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | no | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `q` | query | string | yes |  |
| `scope` | query | string | no |  |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | Grouped hits. | application/json | `object` |
| 400 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 503 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## Member and client-guest typeahead for pickers, limited to the caller's scope

`GET /search/members`

- Operation ID: `searchMembers`
- Call with: Session of the Youniton apps (app only)
- Feature: F-SRC-05

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `q` | query | string | yes |  |
| `projectKey` | query | string | no |  |
| `audience` | query | string | no |  |
| `capability` | query | string | no |  |
| `limit` | query | integer | no |  |
| `place` | query | string | no | F-SRC-05.R07 (XM-938): the place of a mention — only the people whom that place's write accepts as a mention. Not with projectKey or capability. An unknown, hidden or unwritable place answers like a place where nobody matches. |
| `notInProject` | query | string | no | XM-1023 (R08) — the active internal members WITHOUT an active membership of this project ("Add member" on Project › People); not with projectKey, capability, place or a non-internal audience. |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | Candidates. | application/json | `object` |
| 400 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 403 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |

## The project finder (⌘P) and project typeahead — recent projects when q is empty

`GET /search/projects`

- Operation ID: `findProjects`
- Call with: Session of the Youniton apps (app only)
- Feature: F-SRC-02

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Kanso-Tenant` | header | string (uuid) | yes | The tenant id of the call (05-api §8.3); unknown, foreign or inactive answers 404 tenant.not_found. |
| `q` | query | string | no |  |
| `capability` | query | string | no |  |

| Status | Description | Content type | Type |
|---|---|---|---|
| 200 | Up to 20 projects. | application/json | `object` |
| 404 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 422 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
| 429 | A problem (application/problem+json); the code names the reason. | application/problem+json | `Problem` |
