Rest API changes for organization level activity page
Support building the organization level activity page.
The frontend will need all the information in app/serializers/profile/event_entity.rb. If needed, it can be in a slightly different format as long as it is all there.
Requirements (could change while we build this out):
- It returns data in a JSON structure (not serialized HTML like app/controllers/users_controller.rb#L86)
- The response has all the information that is exposed in app/serializers/profile/event_entity.rb. It's okay if it isn't in the exact same format as long as it is all there. We can update the data structure in the frontend to work with the Vue components
- URL: api/:version/organizations/:organization_id/events
- Auth requirements: Currently we only have policy setup for the instance administrator. Until we have members
in organizations, I think we would have to continue using this policy, at least to start with. So, access to org events API will be available only to instance admins.
- Experiment/Beta/GA - I think we could start as Beta
We will be building an internal API via the controller for the time being. A public API isn't needed at this time and will be built later as per the discussion in #415300 (comment 1485083399)