# ノートの更新履歴

`GET /api/note/{noteId}/history`

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

そのノートに関するアクティビティを返します。

## パラメーター

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `noteId` | path | integer | 必須 | ノートの ID |
| `beforeId` | query | integer |  | ページ送り用のカーソルです。この ID より小さい ID の履歴だけを返します。前回のレスポンスの `nextBeforeId` を渡してください。 |
| `limit` | query | integer |  | 返す件数 (1〜50)。省略すると 20 件です。 |

## リクエスト

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

## レスポンス

- 200: Activity history
- 400: Invalid query parameters
- 401: Authentication is required
- 403: Not a project member
- 404: Note not found

## レスポンスの例

```json
{
  "activities": [
    {
      "id": 22395,
      "createdAt": 1793662619438,
      "model": "Note",
      "modelId": 187,
      "property": "description",
      "isMultiple": false,
      "action": "update",
      "message": "ノートの詳細を更新しました",
      "user": {
        "id": 1101,
        "name": "aiko",
        "fullName": "Aiko Tanaka",
        "avatarUrl": null,
        "state": "active",
        "extra": {
          "color": null
        }
      },
      "project": {
        "id": 288,
        "name": "Website renewal",
        "fullName": "Website renewal"
      },
      "ref": {
        "link": {
          "text": null,
          "path": null
        },
        "fromContent": null,
        "toContent": null,
        "content": null
      }
    },
    {
      "id": 22390,
      "createdAt": 1793662619333,
      "model": "Note",
      "modelId": 187,
      "property": "staredUsers",
      "isMultiple": false,
      "action": "update",
      "message": "ノートのスターを更新しました",
      "user": {
        "id": 1101,
        "name": "aiko",
        "fullName": "Aiko Tanaka",
        "avatarUrl": null,
        "state": "active",
        "extra": {
          "color": null
        }
      },
      "project": {
        "id": 288,
        "name": "Website renewal",
        "fullName": "Website renewal"
      },
      "ref": {
        "link": {
          "text": "Release checklist (v1)",
          "path": "/p/288/note/187"
        },
        "fromContent": null,
        "toContent": null,
        "content": null
      }
    }
  ]
}
```
