# Admin Feeds Administrative endpoints for managing user feeds and cache ## Clear user feed cache - [POST /api/v1/admin/feed/clear-user-feed](https://docs.wellesley.social/openapi/admin-feeds/paths/~1api~1v1~1admin~1feed~1clear-user-feed/post.md): Removes cached feed data from Redis for specified user(s). If no user is specified, clears all cached feeds. Use with caution as this will force feed regeneration on next access. Returns the number of Redis keys deleted. RBAC: requires Jobs.Manage ## Diagnose user feed cache - [GET /api/v1/admin/feed/diagnose](https://docs.wellesley.social/openapi/admin-feeds/paths/~1api~1v1~1admin~1feed~1diagnose/get.md): RBAC: requires Jobs.Manage ## Get metrics across all operations - [GET /api/v1/admin/feed/metrics/global-all-operation](https://docs.wellesley.social/openapi/admin-feeds/paths/~1api~1v1~1admin~1feed~1metrics~1global-all-operation/get.md): Retrieves global aggregated metrics for a specific owner type across all feed operations within a time window. RBAC: - requires ANY of Jobs.Read, Jobs.Manage ## Get metrics across all owner types - [GET /api/v1/admin/feed/metrics/global-all-owners](https://docs.wellesley.social/openapi/admin-feeds/paths/~1api~1v1~1admin~1feed~1metrics~1global-all-owners/get.md): Retrieves global aggregated metrics for a specific operation across all owner types (USER, GROUP, EVENT, CATEGORY) within a time window. RBAC: - requires ANY of Jobs.Read, Jobs.Manage ## Get global aggregated metrics - [GET /api/v1/admin/feed/metrics/global-single](https://docs.wellesley.social/openapi/admin-feeds/paths/~1api~1v1~1admin~1feed~1metrics~1global-single/get.md): Retrieves global aggregated feed performance metrics for a specific operation and owner type combination within a time window. Includes average times, total measurements, and user counts. RBAC: - requires ANY of Jobs.Read, Jobs.Manage ## Get feed metrics history - [GET /api/v1/admin/feed/metrics/history](https://docs.wellesley.social/openapi/admin-feeds/paths/~1api~1v1~1admin~1feed~1metrics~1history/get.md): Retrieves historical feed performance metrics for a specific operation, user, and owner type combination. Returns a list of feed metrics ordered by timestamp. RBAC: - requires ANY of Jobs.Read, Jobs.Manage ## Get comprehensive feed metrics - [GET /api/v1/admin/feed/metrics/history/all](https://docs.wellesley.social/openapi/admin-feeds/paths/~1api~1v1~1admin~1feed~1metrics~1history~1all/get.md): Retrieves complete feed metrics history for a user across all operations and all owner types. Returns a nested map structure where the outer keys are owner types, inner keys are operation types, and values are lists of feed metrics. RBAC: - requires ANY of Jobs.Read, Jobs.Manage ## Get feed metrics for all operations - [GET /api/v1/admin/feed/metrics/history/all-single-owner](https://docs.wellesley.social/openapi/admin-feeds/paths/~1api~1v1~1admin~1feed~1metrics~1history~1all-single-owner/get.md): Retrieves comprehensive feed metrics history for a user across all operation types (populate, merge, unmerge, redis, cache, etc.) for a specific owner type. Returns a map where keys are operation types and values are lists of metrics. RBAC: - requires ANY of Jobs.Read, Jobs.Manage ## Get feed metrics grouped by owner type - [GET /api/v1/admin/feed/metrics/history/by-owner-type](https://docs.wellesley.social/openapi/admin-feeds/paths/~1api~1v1~1admin~1feed~1metrics~1history~1by-owner-type/get.md): Retrieves feed metrics history for a specific operation and user, grouped by all owner types (USER, GROUP, EVENT, CATEGORY). Returns a map where keys are owner types and values are lists of feed metrics. RBAC: - requires ANY of Jobs.Read, Jobs.Manage ## Get user running average - [GET /api/v1/admin/feed/metrics/running-average-single](https://docs.wellesley.social/openapi/admin-feeds/paths/~1api~1v1~1admin~1feed~1metrics~1running-average-single/get.md): Retrieves the running average performance metrics for a specific user, operation, and owner type within a sliding time window. RBAC: - requires ANY of Jobs.Read, Jobs.Manage ## Get all user running averages - [GET /api/v1/admin/feed/metrics/running-averages-all](https://docs.wellesley.social/openapi/admin-feeds/paths/~1api~1v1~1admin~1feed~1metrics~1running-averages-all/get.md): Retrieves running average performance metrics for a specific user across all feed operations for a given owner type. RBAC: - requires ANY of Jobs.Read, Jobs.Manage ## Identify slowest feed operations - [GET /api/v1/admin/feed/metrics/slowest-operations](https://docs.wellesley.social/openapi/admin-feeds/paths/~1api~1v1~1admin~1feed~1metrics~1slowest-operations/get.md): Analyzes and ranks feed operations by their average execution time across all users. Helps identify performance bottlenecks. RBAC: - requires ANY of Jobs.Read, Jobs.Manage ## Identify users with performance issues - [GET /api/v1/admin/feed/metrics/slowest-users](https://docs.wellesley.social/openapi/admin-feeds/paths/~1api~1v1~1admin~1feed~1metrics~1slowest-users/get.md): Analyzes and identifies users experiencing the slowest feed operation times. Can analyze a specific operation or aggregate across all operations. RBAC: - requires ANY of Jobs.Read, Jobs.Manage ## Get performance leaderboards for all operations - [GET /api/v1/admin/feed/metrics/slowest-users-all](https://docs.wellesley.social/openapi/admin-feeds/paths/~1api~1v1~1admin~1feed~1metrics~1slowest-users-all/get.md): Retrieves performance leaderboards for all feed operations for a specific owner type. Returns a map of operations to ranked user lists. RBAC: - requires ANY of Jobs.Read, Jobs.Manage ## Get performance leaderboard - [GET /api/v1/admin/feed/metrics/slowest-users-single](https://docs.wellesley.social/openapi/admin-feeds/paths/~1api~1v1~1admin~1feed~1metrics~1slowest-users-single/get.md): Retrieves a ranked list of users by their feed operation performance for a specific operation and owner type. Can show either slowest or fastest users based on sort order. RBAC: - requires ANY of Jobs.Read, Jobs.Manage ## Get comprehensive metrics summary - [GET /api/v1/admin/feed/metrics/summary](https://docs.wellesley.social/openapi/admin-feeds/paths/~1api~1v1~1admin~1feed~1metrics~1summary/get.md): Generates a complete summary of feed performance metrics across all operations and owner types, including totals and averages. RBAC: - requires ANY of Jobs.Read, Jobs.Manage ## Get comprehensive user counts - [GET /api/v1/admin/feed/metrics/user-count-all](https://docs.wellesley.social/openapi/admin-feeds/paths/~1api~1v1~1admin~1feed~1metrics~1user-count-all/get.md): Returns user counts for all feed operations and owner types within the time window. Returns a nested map structure for comprehensive analysis. RBAC: - requires ANY of Jobs.Read, Jobs.Manage ## Get active user count - [GET /api/v1/admin/feed/metrics/user-count-single](https://docs.wellesley.social/openapi/admin-feeds/paths/~1api~1v1~1admin~1feed~1metrics~1user-count-single/get.md): Returns the count of unique users who performed a specific feed operation within the time window, optionally filtered by owner type. RBAC: - requires ANY of Jobs.Read, Jobs.Manage ## Regenerate user feed cache - [POST /api/v1/admin/feed/regenerate-user-feed](https://docs.wellesley.social/openapi/admin-feeds/paths/~1api~1v1~1admin~1feed~1regenerate-user-feed/post.md): Forces regeneration of cached feed data for specified user(s). If no user is specified, regenerates feeds for all recently active users (signed in within the last period). Returns the number of feeds queued for regeneration. RBAC: requires Jobs.Manage