Skip to content

Add /api/v1/tags/:name endpoint#293

Merged
akirk merged 1 commit intomainfrom
add/tags-endpoint
Apr 8, 2026
Merged

Add /api/v1/tags/:name endpoint#293
akirk merged 1 commit intomainfrom
add/tags-endpoint

Conversation

@akirk
Copy link
Copy Markdown
Owner

@akirk akirk commented Apr 7, 2026

Summary

  • Adds the Mastodon API GET /api/v1/tags/:name endpoint returning a Tag entity with data from WordPress taxonomy
  • Ensures numeric ID remapping on mastodon_api_tag_timeline responses (fixes URL-based account IDs being returned to clients like Tusky)
  • Defaults the tag timeline limit to 5 with a comment noting the tags.pub integration ignores client-requested limits due to HTTP round-trip costs

Context

This is the EMA side of tags.pub integration. The ActivityPub plugin side (fetching the tags.pub outbox and converting Announces to statuses) is in Automattic/wordpress-activitypub#3151.

Test plan

  • Verify GET /api/v1/tags/wordpress returns a valid Tag entity
  • Verify tag timeline statuses have numeric IDs for status and account
  • Verify clicking an avatar in a tag timeline in Tusky loads the account profile

- Add Tag handler with basic tag lookup from WordPress taxonomy
- Register GET /api/v1/tags/:name route with rewrite rule
- Add mastodon_api_tag filter for extensibility
- Ensure numeric ID remapping on mastodon_api_tag_timeline responses
- Default tag timeline limit to 5 (currently ignored by tags.pub integration
  due to HTTP round-trip costs per item)
@akirk akirk merged commit 258b649 into main Apr 8, 2026
18 checks passed
@akirk akirk deleted the add/tags-endpoint branch April 8, 2026 11:44
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.

1 participant