-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As a user, I want the x-total-count header returned by API responses #565
Comments
According to this discussion, it would make sense to have the x-total-count header when the response format cannot carry an equivalent attribute (e.g. CSV), see zalando/restful-api-guidelines#116 |
From: "Niessner, Albert F (US 398F)" albert.f.niessner@jpl.nasa.gov Just to be absolutely clear, I do not care if we keep or pitch x-total-count (or whatever). All I can do is advise.
-- | dS | >= 0From: Karpenko, Yevgen (US 398F-Affiliate) Rfc2616 is deprecated. The latest is It describes range requests (pagination) -Eugene From: Karpenko, Yevgen (US 398F-Affiliate) There are many RFCs and discussions about using headers for pagination / total number of records J Seems like “X-“ prefix is deprecated (see https://www.rfc-editor.org/rfc/rfc6648) There is a “Content-Range” header (see https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.16 and https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.12) Also for partial content (a page) it is recommended to return code 206 instead of 200. (See https://www.rfc-editor.org/rfc/rfc7233#page-10) For example, 206 Partial Content 200 OK -Eugene From: Loubrieu, Thomas G (US 398F) +1 for x-total-count: that will be useful to store the total count when the response format can not as in the case of the CSV response format. See discussion zalando/restful-api-guidelines#116 From: "Loubrieu, Thomas G (US 398F)" thomas.g.loubrieu@jpl.nasa.gov Hi Al, I was not able to find our previous discussion (on slack ? email ? github ?) on x-total-count header, but quickly looking on the web, it sounds like it is a standard way of having the total count of results matching the user requests independently from the pagination constraints. So my question for you is, what do you think is the easiest to do:
Of course the schedule proposed is only just to give an idea of the timescale, there is no hard commitment on that (unless Jordan give us one 😉) I feel like we are not far from being able to do option 2 since you already implement that for the hits attribute, but I would like you opinion on that. Thanks, Thomas |
💪 Motivation
...so that users who like this standard way of having the total of results matching their requests independantly from the pagination constraint.
📖 Additional Details
⚖️ Acceptance Criteria
Given
When I perform
Then I expect
⚙️ Engineering Details
The text was updated successfully, but these errors were encountered: