Skip to content

Add includeDetails option to recent user activity endpoint - #1290

Closed
CollinBeczak wants to merge 3 commits into
mainfrom
rest-activity-details
Closed

CollinBeczak wants to merge 3 commits into
mainfrom
rest-activity-details

Conversation

@CollinBeczak

Copy link
Copy Markdown
Contributor

GET /data/user/activity returns bare action rows (osmUserId, itemId, parentId), so the activity feeds have relied on GraphQL's recentActions query to resolve each entry's user, task and challenge. Before GraphQL can be dropped, REST needs to serve the same data.

With includeDetails=true, each entry also carries:

  • user: id plus osmProfile (id, displayName, avatarURL)
  • task: id and location, for task actions
  • challenge: id, name and general.parent (id, name, displayName)

Related records are loaded in four batched queries per page (users by OSM id, tasks, challenges, projects), the same service calls the GraphQL fetchers made. With the flag set, created is serialized as an ISO string to match what GraphQL returned and what the frontends parse.

The flag defaults to false, so existing callers are unaffected.

GET /data/user/activity returns bare action rows (osmUserId, itemId,
parentId), so the activity feeds have relied on GraphQL's recentActions
query to resolve each entry's user, task and challenge. Before GraphQL
can be dropped, REST needs to serve the same data.

With includeDetails=true, each entry also carries:
- user: id plus osmProfile (id, displayName, avatarURL)
- task: id and location, for task actions
- challenge: id, name and general.parent (id, name, displayName)

Related records are loaded in four batched queries per page (users by
OSM id, tasks, challenges, projects), the same service calls the
GraphQL fetchers made. With the flag set, created is serialized as an
ISO string to match what GraphQL returned and what the frontends parse.

The flag defaults to false, so existing callers are unaffected.
@jake-low

jake-low commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Thanks, but this isn't actually necessary; I'm planning to deprecate and remove this endpoint along with the GraphQL endpoint. Its only purpose right now is to power a global activity feed that I think should be removed from the app to reduce the user data that the app exposes.

@CollinBeczak

Copy link
Copy Markdown
Contributor Author

Sounds good, lemme know if there are more endpoints i should keep in mind

@CollinBeczak CollinBeczak reopened this Oct 10, 2026
@sonarqubecloud

Copy link
Copy Markdown

@CollinBeczak

Copy link
Copy Markdown
Contributor Author

This is actually also used for the contributions widget
Screenshot 2026-10-09 at 7 51 14 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants