Closed dburriss closed 2 years ago
@Grepsy some design questions. What do you think?
All the link actions and naming make sense to me, no proposed changes. I like the more RESTful proposal better/feels more natural. The api/event-feed/page/tail
also makes sense.
I'm not sure the /pages
would require paging, it feels a bit awkward to me, I'm wondering if we can come up with some sort of threshold in response size where this would be necessary. Now that I'm thinking about it, does it make sense to list all pages in a list, or can we get away with just a single metadata-block describing the pages?
Edit: Ah wait, upon reading this again, I realize why you want the /pages
to list all pages, to make it more RESTful. In that case I like the first proposal better :-)
Closed by PR #9
I am updating the schema of responses. I wanted to highlight the changes and get some feedback.
HAL like naming
Impact:
_link
, underscores have been removed{ href = "" }
object is used. This is inline with HAL and allows for other features in the future.tail
overlast
as we are really tailing the last page, since it will change as event come in.Optional features of HAL like CURIE (compact URI), templated, type, are not currently used.
Errors
ProblemDetails
to return more helpful messages_linlk actions
Additional endpoints
I propose that an endpoint along the default route
api/event-feed/page/{pageNumber}
is valid.api/event-feed
: meta dataapi/event-feed/page
: redirect to first pageapi/event-feed/page/{valid page}
: return page with 200The above is very much geared toward "what would an event processing consumer need". An alternative is a more RESTful API.
api/event-feed/pages
: list pages (probably needs to be paged itself which could get weird from a naming point of view)api/event-feed/pages/{valid page}
: return page with 200An open question is whether we want some aliases, then main one for me would be:
api/event-feed/page/tail
(or last :P ) It gives an easy way to get the last without getting another page first.