# ノートの検索

`GET /api/search/note`

URL: https://repsona.com/ja/api/get-search-note

条件に合うノートを、参加しているプロジェクトの中から検索します。

## パラメーター

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `projectId` | query | "@all" \| integer | 必須 | プロジェクト ID。`@all` を渡すと、参加中の終了していないプロジェクトすべてが対象になります。 |
| `q` | query | string |  | ノートのタイトルと本文から探すキーワード (200 文字まで)。スペースで区切ると、すべてに一致するノートだけが対象です。 |
| `tagIds` | query | string |  | カンマ区切りのタグ ID (100 件まで)。`none` を渡すとタグのないノートに一致します。 |
| `tagMode` | query | and \| exclude |  | `tagIds` の使い方。`and` はそのタグのいずれかが付いたノート、`exclude` は付いていないノートを返します。省略すると `and` です。 |
| `includeWip` | query | 0 \| 1 \| true \| false |  | 作業中 (WIP) のノートを含めるかどうか (`true`、`false`、`1`、`0`)。省略すると `true` です。 |
| `result` | query | ids \| items |  | レスポンスの形。`ids` は一致したノートの ID、`items` はノートの概要を 1 ページ 30 件で返します。省略すると `ids` です。 |
| `page` | query | integer |  | ページ番号 (1 から)。`result` が `items` のときだけ使われます。 |

## リクエスト

```sh
curl -X GET "https://<space>.repsona.com/api/search/note" \
  -H "Authorization: Bearer $REPSONA_API_KEY"
```

## レスポンス

- 200: Matching notes ({ noteIds, truncated } or { items, hasMore })
- 400: Invalid query
- 401: Authentication is required

## レスポンスの例

```json
{
  "items": [
    {
      "id": 187,
      "name": "Release checklist (v1)",
      "excerpt": "## Before launch - Run the full regression suite - Confirm the redirect map with marketing - Announce the maintenance wi",
      "isWip": false,
      "projectFullName": "Website renewal",
      "updatedAt": 1793662619295
    }
  ],
  "hasMore": false
}
```
