# プロジェクトのノート一覧

`GET /api/project/{projectId}/note`

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

プロジェクトのノートをページ送りで返します。parent_id にノート ID を指定すると子ノート一覧、root を指定すると最上位のノートだけになります。parent_id 指定時は木の並び順 (sortOrder)、省略時は ID 順です。

## パラメーター

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `projectId` | path | integer | 必須 | プロジェクトの ID |
| `page` | query | integer |  | ページ番号 (1 から) |
| `limit` | query | integer |  | 1 ページの件数 (500 件まで) |
| `parent_id` | query | "root" \| integer |  | ID を渡すとその子だけ、`root` を渡すと最上位だけを返します。省略するとすべて返します。 |
| `tag_ids` | query | string |  | カンマ区切りのタグ ID (100 件まで)。これらのタグのいずれかが付いたノートだけを返します。 |

## リクエスト

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

## レスポンス

- 200: { notes, page, limit, hasMore }
- 400: Invalid query parameters
- 401: Authentication is required
- 403: Not a project member
- 404: Project not found

## レスポンスの例

```json
{
  "notes": [
    {
      "id": 187,
      "parentId": null,
      "projectId": 288,
      "spaceId": 603,
      "name": "Release checklist (v1)",
      "sortOrder": null,
      "isWip": false,
      "createdAt": 1793662619233,
      "updatedAt": 1793662619295,
      "deletedAt": null,
      "tags": [
        {
          "id": 86,
          "name": "launch",
          "color": "#3b82f6"
        },
        {
          "id": 87,
          "name": "checklist",
          "color": "#3b82f6"
        }
      ],
      "description": "## Before launch\n\n- Run the full regression suite\n- Confirm the redirect map with marketing\n- Announce the maintenance window\n- Back up the old site"
    }
  ],
  "page": 1,
  "limit": 20,
  "hasMore": false
}
```
