# List activity feed

`GET /api/feed`

URL: https://repsona.com/api/get-feed

Returns a simple activity feed for the current user and joined projects.

## Parameters

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `beforeId` | query | integer |  | Cursor for paging. Returns only activities with an ID lower than this; use the smallest `id` of the previous page. |
| `limit` | query | integer |  | Number of activities to return (1 to 50). Defaults to 20. |
| `projectId` | query | integer |  | Return only activities in this project. Omit to include every project you can access. |
| `userId` | query | integer |  | Return only activities by this user. Omit to include everyone. |

## Request

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

## Responses

- 200: Activity feed
- 400: Invalid query parameters
- 401: Authentication is required
- 404: Project not found

## Example response

```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": 22392,
      "createdAt": 1793662619383,
      "model": "NoteComment",
      "modelId": 36,
      "property": "comment",
      "isMultiple": false,
      "action": "update",
      "message": "コメントのcommentを更新しました",
      "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#comment-36"
        },
        "fromContent": "Looks good. Can we also add a rollback step?",
        "toContent": "Looks good. Can we also add a rollback step before the launch?",
        "content": "Looks good. Can we also add a rollback step? → Looks good. Can we also add a rollback step before the launch?"
      }
    }
  ]
}
```
