)]}'
{"guidelines/pagination_filter_sort.rst":[{"author":{"_account_id":8246,"name":"Qiming Teng","email":"tengqm@outlook.com","username":"tengqm"},"change_message_id":"1823a4d6c4c1cf410640dae2b29a68298fdc43db","unresolved":false,"context_lines":[{"line_number":47,"context_line":"``08ec231f6d9a43dda97d4b950c3393df``."},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"The ability to page through results implies that the items are sorted in a"},{"line_number":50,"context_line":"consistent fashion in each request, even if that order is nothing more than the"},{"line_number":51,"context_line":"order the items were added to the dataset. If the order of the results changes"},{"line_number":52,"context_line":"between requests, the returned pages will not have a meaningful relation to"},{"line_number":53,"context_line":"each other."},{"line_number":54,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a1ced50_3b5c3d25","line":51,"range":{"start_line":50,"start_character":36,"end_line":51,"end_character":42},"updated":"2017-03-17 01:57:08.000000000","message":"This is where the problems often arise. If items are not sorted by ID and the API is trying to mark an item as \"last seen\" by its ID, the design is flawed.\n\nAnother way to ensure the pagination thing always work would be a requirement that items SHOULD always be sorted by ID, even if ID is the very last sorting field.","commit_id":"6e27e062af8650e0576d63e114ee061ee6915d21"},{"author":{"_account_id":8246,"name":"Qiming Teng","email":"tengqm@outlook.com","username":"tengqm"},"change_message_id":"3f86ee4e722857d6626a3da6e09ca98dd54c01e5","unresolved":false,"context_lines":[{"line_number":47,"context_line":"``08ec231f6d9a43dda97d4b950c3393df``."},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"The ability to page through results implies that the items are sorted in a"},{"line_number":50,"context_line":"consistent fashion in each request, even if that order is nothing more than the"},{"line_number":51,"context_line":"order the items were added to the dataset. If the order of the results changes"},{"line_number":52,"context_line":"between requests, the returned pages will not have a meaningful relation to"},{"line_number":53,"context_line":"each other."},{"line_number":54,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a1ced50_68a7fb0a","line":51,"range":{"start_line":50,"start_character":36,"end_line":51,"end_character":42},"in_reply_to":"1a1ced50_291fdc08","updated":"2017-03-23 02:31:11.000000000","message":"My suggestion is that we should ensure that \n\n1. Items always have a column to sort, and the sort result is stable. This is where the ID comes in. \n\n2. Dataset can be sorted by other columns when required (and supported), but the result should still be predictable.\n\nIn your example, if I\u0027m examining the data by the \u0027name\u0027 column, I\u0027d hope the items with the SAME name always show up in the same order. If you are sorting them by \u0027date\u0027, the data shown on page 3 should be predictable. \n\nImplementation side, the dataset are sorted by \u0027date,id\u0027 for you (your session) and \u0027name,id\u0027 for me (my session).\n\nThere must be an ID on a dataset, or else how are you setting the \u0027marker\u0027?","commit_id":"6e27e062af8650e0576d63e114ee061ee6915d21"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"1a5c5d079647506975eccba27ea1373dc6baa029","unresolved":false,"context_lines":[{"line_number":47,"context_line":"``08ec231f6d9a43dda97d4b950c3393df``."},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"The ability to page through results implies that the items are sorted in a"},{"line_number":50,"context_line":"consistent fashion in each request, even if that order is nothing more than the"},{"line_number":51,"context_line":"order the items were added to the dataset. If the order of the results changes"},{"line_number":52,"context_line":"between requests, the returned pages will not have a meaningful relation to"},{"line_number":53,"context_line":"each other."},{"line_number":54,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a1ced50_291fdc08","line":51,"range":{"start_line":50,"start_character":36,"end_line":51,"end_character":42},"in_reply_to":"1a1ced50_3b5c3d25","updated":"2017-03-22 16:42:00.000000000","message":"I can be looking at a dataset that is ordered by date, and you could be looking at the same dataset, ordered by name. When I want to see the next page of data, I expect to see the same ordering by date, and you would expect to see the data still ordered by name. Adding a restriction that data that may be paginated can only ever be ordered by ID (which is typically a random UUID) is not something we would ever want to enforce.","commit_id":"6e27e062af8650e0576d63e114ee061ee6915d21"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"0f6b537475a43115eff466eba266fa69cc792bcf","unresolved":false,"context_lines":[{"line_number":47,"context_line":"``08ec231f6d9a43dda97d4b950c3393df``."},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"The ability to page through results implies that the items are sorted in a"},{"line_number":50,"context_line":"consistent fashion in each request, even if that order is nothing more than the"},{"line_number":51,"context_line":"order the items were added to the dataset. If the order of the results changes"},{"line_number":52,"context_line":"between requests, the returned pages will not have a meaningful relation to"},{"line_number":53,"context_line":"each other."},{"line_number":54,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a1ced50_4e115051","line":51,"range":{"start_line":50,"start_character":36,"end_line":51,"end_character":42},"in_reply_to":"1a1ced50_68a7fb0a","updated":"2017-03-23 13:49:29.000000000","message":"That is too much of an implementation detail for a guideline such as this. We do not tell people how they should design databases and queries; instead, we are trying to provide guidance as to how the end result should function.","commit_id":"6e27e062af8650e0576d63e114ee061ee6915d21"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"9bd98da0ac57076322e097c86cacebb3777764f9","unresolved":false,"context_lines":[{"line_number":62,"context_line":"   it may be simpler to..."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":" * return a 404 Not Found, with a clear explanation that the pagination marker"},{"line_number":65,"context_line":"   no longer exists."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"It\u0027s also helpful to users if services generate pagination links and include"},{"line_number":68,"context_line":"them in the :ref:`links` portion of the response body. Providing the following"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a1ced50_81951634","line":65,"updated":"2017-03-22 13:06:38.000000000","message":"I think instead of ambiguously presenting two strategies we should just recommend one, the first one.","commit_id":"6e27e062af8650e0576d63e114ee061ee6915d21"},{"author":{"_account_id":8246,"name":"Qiming Teng","email":"tengqm@outlook.com","username":"tengqm"},"change_message_id":"1823a4d6c4c1cf410640dae2b29a68298fdc43db","unresolved":false,"context_lines":[{"line_number":61,"context_line":"   critical a precise listing is. This can be unpredictable, so in many cases"},{"line_number":62,"context_line":"   it may be simpler to..."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":" * return a 404 Not Found, with a clear explanation that the pagination marker"},{"line_number":65,"context_line":"   no longer exists."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"It\u0027s also helpful to users if services generate pagination links and include"},{"line_number":68,"context_line":"them in the :ref:`links` portion of the response body. Providing the following"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a1ced50_1b09412d","line":65,"range":{"start_line":64,"start_character":0,"end_line":65,"end_character":20},"updated":"2017-03-17 01:57:08.000000000","message":"Looks to me like an abuse of 404. Pagination can \"fail\", but 404 means something totally different. I believe many clients simply checks the status code if it is 404, so the chance of having the \"explanation\" extracted is not big.","commit_id":"6e27e062af8650e0576d63e114ee061ee6915d21"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"1a5c5d079647506975eccba27ea1373dc6baa029","unresolved":false,"context_lines":[{"line_number":62,"context_line":"   it may be simpler to..."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":" * return a 404 Not Found, with a clear explanation that the pagination marker"},{"line_number":65,"context_line":"   no longer exists."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"It\u0027s also helpful to users if services generate pagination links and include"},{"line_number":68,"context_line":"them in the :ref:`links` portion of the response body. Providing the following"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a1ced50_c9f2c805","line":65,"in_reply_to":"1a1ced50_81951634","updated":"2017-03-22 16:42:00.000000000","message":"OK, let\u0027s say that the data is in the order the records were added, and is keyed by a UUID. A \u0027next\u0027 link with a particular UUID is returned. Before that link is requested, that record is deleted. How do you determine what is the next logical item? In that case, a 404 is appropriate, IMO. I can add language to explain the options better.","commit_id":"6e27e062af8650e0576d63e114ee061ee6915d21"},{"author":{"_account_id":8246,"name":"Qiming Teng","email":"tengqm@outlook.com","username":"tengqm"},"change_message_id":"1823a4d6c4c1cf410640dae2b29a68298fdc43db","unresolved":false,"context_lines":[{"line_number":64,"context_line":" * return a 404 Not Found, with a clear explanation that the pagination marker"},{"line_number":65,"context_line":"   no longer exists."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"It\u0027s also helpful to users if services generate pagination links and include"},{"line_number":68,"context_line":"them in the :ref:`links` portion of the response body. Providing the following"},{"line_number":69,"context_line":"link types will make pagination navigation easier:"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a1ced50_bb5f4d0d","line":67,"range":{"start_line":67,"start_character":48,"end_line":67,"end_character":64},"updated":"2017-03-17 01:57:08.000000000","message":"Don\u0027t think this should be a server side job. Instead, we may want a service to return an optional \u0027count\u0027 value in a response and let the client side do the maths.","commit_id":"6e27e062af8650e0576d63e114ee061ee6915d21"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"1a5c5d079647506975eccba27ea1373dc6baa029","unresolved":false,"context_lines":[{"line_number":64,"context_line":" * return a 404 Not Found, with a clear explanation that the pagination marker"},{"line_number":65,"context_line":"   no longer exists."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"It\u0027s also helpful to users if services generate pagination links and include"},{"line_number":68,"context_line":"them in the :ref:`links` portion of the response body. Providing the following"},{"line_number":69,"context_line":"link types will make pagination navigation easier:"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a1ced50_29a27c99","line":67,"range":{"start_line":67,"start_character":48,"end_line":67,"end_character":64},"in_reply_to":"1a1ced50_bb5f4d0d","updated":"2017-03-22 16:42:00.000000000","message":"I don\u0027t see how that could ever work. If the data is ordered by its UUID field, how would a client be able to calculate the appropriate links with math?","commit_id":"6e27e062af8650e0576d63e114ee061ee6915d21"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"9bd98da0ac57076322e097c86cacebb3777764f9","unresolved":false,"context_lines":[{"line_number":64,"context_line":" * return a 404 Not Found, with a clear explanation that the pagination marker"},{"line_number":65,"context_line":"   no longer exists."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"It\u0027s also helpful to users if services generate pagination links and include"},{"line_number":68,"context_line":"them in the :ref:`links` portion of the response body. Providing the following"},{"line_number":69,"context_line":"link types will make pagination navigation easier:"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a1ced50_2158e255","line":67,"in_reply_to":"1a1ced50_bb5f4d0d","updated":"2017-03-22 13:06:38.000000000","message":"Some (many?) clients don\u0027t do computation. Providing the links is a common thing in api representations and something we want to encourage.","commit_id":"6e27e062af8650e0576d63e114ee061ee6915d21"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"9bd98da0ac57076322e097c86cacebb3777764f9","unresolved":false,"context_lines":[{"line_number":257,"context_line":""},{"line_number":258,"context_line":"To support filtering based on time intervals such as mentioned in the `ISO8601"},{"line_number":259,"context_line":"intervals wikipedia page`_, it should be possible to express the following"},{"line_number":260,"context_line":"usecases through API queries:"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"* a two-ISO8601-date timestamp interval"},{"line_number":263,"context_line":"* an open-ended, single-ISO8601-date interval"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a1ced50_a18212c6","line":260,"updated":"2017-03-22 13:06:38.000000000","message":"rebase clobber?","commit_id":"6e27e062af8650e0576d63e114ee061ee6915d21"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"1a5c5d079647506975eccba27ea1373dc6baa029","unresolved":false,"context_lines":[{"line_number":257,"context_line":""},{"line_number":258,"context_line":"To support filtering based on time intervals such as mentioned in the `ISO8601"},{"line_number":259,"context_line":"intervals wikipedia page`_, it should be possible to express the following"},{"line_number":260,"context_line":"usecases through API queries:"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"* a two-ISO8601-date timestamp interval"},{"line_number":263,"context_line":"* an open-ended, single-ISO8601-date interval"}],"source_content_type":"text/x-rst","patch_set":1,"id":"1a1ced50_8907f080","line":260,"in_reply_to":"1a1ced50_a18212c6","updated":"2017-03-22 16:42:00.000000000","message":"Done","commit_id":"6e27e062af8650e0576d63e114ee061ee6915d21"},{"author":{"_account_id":7350,"name":"Jordan Pittier","email":"jordan.pittier@gmail.com","username":"JordanP"},"change_message_id":"30bfcec103e180578964309aedf66a7e895ac277","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"- ``limit`` to define the number of items returned in the response, and"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"- ``marker`` to specify the ID of the last seen item"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"For example::"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"ffe62b97_17bcb503","line":15,"updated":"2017-03-24 09:32:33.000000000","message":"Just to be sure, marker can\u0027t ever be something else than an ID/UUID ?","commit_id":"60638478596e07c22108e25e8f0453865919c4ee"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"45a301a5c33c15a40440aa3b27ca8edf05732ddc","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"- ``limit`` to define the number of items returned in the response, and"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"- ``marker`` to specify the ID of the last seen item"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"For example::"},{"line_number":18,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"ffe62b97_64e6a247","line":15,"in_reply_to":"ffe62b97_17bcb503","updated":"2017-03-24 13:18:40.000000000","message":"Yeah, that\u0027s tricky. In most cases it is the only way to uniquely identify a record, so that\u0027s why it is written that way. But really it could be any field (or group of fields) in the data set that would also identify that record. For example, if you are listing people, and your data is sorted by last name, first name, you could have a marker that is \u0027Pittier,Jordan\u0027, and that should work fine. Assuming, of course, that you are the only person with that name. :) I can add wording to clarify that point.","commit_id":"60638478596e07c22108e25e8f0453865919c4ee"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"54101aa44e30954ae2c979ba5982fdde27a44d6a","unresolved":false,"context_lines":[{"line_number":64,"context_line":"There may be some cases, however, where it is not reasonable to try to"},{"line_number":65,"context_line":"determine what the next logical item would be. In those cases, a 404 Not Found"},{"line_number":66,"context_line":"response should be returned, with the explanation that the requested marker"},{"line_number":67,"context_line":"value does not exist."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"It is also helpful to users if services generate pagination links and include"},{"line_number":70,"context_line":"them in the :ref:`links` portion of the response body. Providing the following"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bff0334d_5894b344","line":67,"updated":"2017-04-05 19:27:45.000000000","message":"I\u0027m still not sure that 404 is right here. It could very well be, but I\u0027m not confident.\n\nIf I  GET /collection and there is such a thing as collection, even if it is empty, I should not get a 404.\n\nIf GET /collection returns a list of 100 items and GET /collections?filter\u003dsomething returns 0, the response code in both cases is 200.\n\nIf I paginate the collection as GET /collection?limit\u003d20\u0026marker\u003d987daf and that marker does not exist and there is no logical next, sending a 404 implies that /collection does not exist, yet is does.\n\nI\u0027d perhaps be inclined to 400","commit_id":"687ad4c61eb4185c8d87d3816ea4608ff7f6d4f7"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"32d8a18a001e940eea51ce39d636d5cc55d3a493","unresolved":false,"context_lines":[{"line_number":64,"context_line":"There may be some cases, however, where it is not reasonable to try to"},{"line_number":65,"context_line":"determine what the next logical item would be. In those cases, a 404 Not Found"},{"line_number":66,"context_line":"response should be returned, with the explanation that the requested marker"},{"line_number":67,"context_line":"value does not exist."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"It is also helpful to users if services generate pagination links and include"},{"line_number":70,"context_line":"them in the :ref:`links` portion of the response body. Providing the following"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bff0334d_5a1b3980","line":67,"in_reply_to":"bff0334d_1bd01a1f","updated":"2017-04-07 12:11:29.000000000","message":"I also vote for 400, although I agree, intelligent error message is important.\n\nI agree, fwiw, with cdent that 404 to me, as a consumer of the API, means that /collection can\u0027t be found, not that there was a problem with one of the parameters. I think if instead of params we did GET /collection/marker/{uuid} then 404 would make more sense, since the URL in question would not exist. But I don\u0027t think that would be a good idea.","commit_id":"687ad4c61eb4185c8d87d3816ea4608ff7f6d4f7"},{"author":{"_account_id":10670,"name":"Michael McCune","email":"elmiko@redhat.com","username":"mimccune"},"change_message_id":"a5bd18479c46d2cee5cdc3c14cb743350ccb5fe5","unresolved":false,"context_lines":[{"line_number":64,"context_line":"There may be some cases, however, where it is not reasonable to try to"},{"line_number":65,"context_line":"determine what the next logical item would be. In those cases, a 404 Not Found"},{"line_number":66,"context_line":"response should be returned, with the explanation that the requested marker"},{"line_number":67,"context_line":"value does not exist."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"It is also helpful to users if services generate pagination links and include"},{"line_number":70,"context_line":"them in the :ref:`links` portion of the response body. Providing the following"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bff0334d_84218dfe","line":67,"in_reply_to":"bff0334d_5894b344","updated":"2017-04-06 17:02:10.000000000","message":"after today\u0027s api-wg meeting, i think i\u0027m inclined to fall on the 400 side as well.","commit_id":"687ad4c61eb4185c8d87d3816ea4608ff7f6d4f7"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"53740fd998bc0b99dada80da643ddd6331118d70","unresolved":false,"context_lines":[{"line_number":64,"context_line":"There may be some cases, however, where it is not reasonable to try to"},{"line_number":65,"context_line":"determine what the next logical item would be. In those cases, a 404 Not Found"},{"line_number":66,"context_line":"response should be returned, with the explanation that the requested marker"},{"line_number":67,"context_line":"value does not exist."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"It is also helpful to users if services generate pagination links and include"},{"line_number":70,"context_line":"them in the :ref:`links` portion of the response body. Providing the following"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bff0334d_295dd179","line":67,"in_reply_to":"bff0334d_5a1b3980","updated":"2017-04-07 14:32:15.000000000","message":"OK, the votes are in. 400 it is.","commit_id":"687ad4c61eb4185c8d87d3816ea4608ff7f6d4f7"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"e1ac672220676a3c7082d86b03912a8cf27f0b6e","unresolved":false,"context_lines":[{"line_number":64,"context_line":"There may be some cases, however, where it is not reasonable to try to"},{"line_number":65,"context_line":"determine what the next logical item would be. In those cases, a 404 Not Found"},{"line_number":66,"context_line":"response should be returned, with the explanation that the requested marker"},{"line_number":67,"context_line":"value does not exist."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"It is also helpful to users if services generate pagination links and include"},{"line_number":70,"context_line":"them in the :ref:`links` portion of the response body. Providing the following"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bff0334d_1bd01a1f","line":67,"in_reply_to":"bff0334d_7846297f","updated":"2017-04-07 10:23:14.000000000","message":"I would err on the side of 400 personally. 400 means this request is unsatisfiable.","commit_id":"687ad4c61eb4185c8d87d3816ea4608ff7f6d4f7"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"37edd05cc38c46467cff08f8cf41c9a4ab4419c0","unresolved":false,"context_lines":[{"line_number":64,"context_line":"There may be some cases, however, where it is not reasonable to try to"},{"line_number":65,"context_line":"determine what the next logical item would be. In those cases, a 404 Not Found"},{"line_number":66,"context_line":"response should be returned, with the explanation that the requested marker"},{"line_number":67,"context_line":"value does not exist."},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"It is also helpful to users if services generate pagination links and include"},{"line_number":70,"context_line":"them in the :ref:`links` portion of the response body. Providing the following"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bff0334d_7846297f","line":67,"in_reply_to":"bff0334d_84218dfe","updated":"2017-04-06 18:27:34.000000000","message":"While that\u0027s all well and good, I think that you\u0027re missing the point that the only time this is a consideration is when the marker has a meaning that can\u0027t be approximated. The request is not just GET /collection; it\u0027s GET /collection, but starting at *this particular item*. When that item can\u0027t be found, because it has been deleted (or never existed), the two options are to determine an acceptable substitute is possible, or return an error.\n\nSo your statement that \"a 404 implies that /collection does not exist\" is not entirely accurate. It\u0027s more accurate to say that returning a 404 implies that /collection starting at marker \u0027foo\u0027 doesn\u0027t exist.\n\nThat said, I\u0027m not super-adamant about this. I see it as asking for a particular starting point, and if that starting point can\u0027t be found, and there is no way to figure out an acceptable alternative, Not Found is appropriate. But as you pointed out in the meeting, 400 is a sort of fallback position, so that would be OK, too. IMO, the important thing is that an intelligent error message is returned.","commit_id":"687ad4c61eb4185c8d87d3816ea4608ff7f6d4f7"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"e1ac672220676a3c7082d86b03912a8cf27f0b6e","unresolved":false,"context_lines":[{"line_number":137,"context_line":"not ``prev``. Likewise if it is the last page, then including ``next`` is"},{"line_number":138,"context_line":"optional but the rest (``first``, ``prev``, ``self``, ``last``) is sensible."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"It should also be emphasized that calculating the ``last`` link can be costly."},{"line_number":141,"context_line":"In many cases, such link calculation would require querying the entire dataset."},{"line_number":142,"context_line":"Therefore implementing the ``last`` link is optional."},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"Filtering"},{"line_number":145,"context_line":"---------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bff0334d_5b99026c","line":142,"range":{"start_line":140,"start_character":0,"end_line":142,"end_character":53},"updated":"2017-04-07 10:23:14.000000000","message":"I would honestly drop last entirely. Not only is it super costly, but if this data is changing at all, it\u0027s going to be the most impacted by changes, and be non accurate quite quickly.\n\nPaging exists so that people can iterate through the results and not overload either the server or the client in the process.","commit_id":"687ad4c61eb4185c8d87d3816ea4608ff7f6d4f7"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"53740fd998bc0b99dada80da643ddd6331118d70","unresolved":false,"context_lines":[{"line_number":137,"context_line":"not ``prev``. Likewise if it is the last page, then including ``next`` is"},{"line_number":138,"context_line":"optional but the rest (``first``, ``prev``, ``self``, ``last``) is sensible."},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"It should also be emphasized that calculating the ``last`` link can be costly."},{"line_number":141,"context_line":"In many cases, such link calculation would require querying the entire dataset."},{"line_number":142,"context_line":"Therefore implementing the ``last`` link is optional."},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"Filtering"},{"line_number":145,"context_line":"---------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bff0334d_1b03700f","line":142,"range":{"start_line":140,"start_character":0,"end_line":142,"end_character":53},"in_reply_to":"bff0334d_5b99026c","updated":"2017-04-07 14:32:15.000000000","message":"It doesn\u0027t have to be super-costly; that\u0027s dependent on the data design, sort order, etc. The previous incarnation of this spec had gotten stuck on the tone of the wording of this paragraph, but not the content itself.\n\nhttps://review.openstack.org/#/c/390973/5/guidelines/pagination_filter_sort.rst@119\n\nIt also seems incomplete to have \u0027prev\u0027 and \u0027next\u0027, and have \u0027first\u0027 but not \u0027last\u0027. I think it\u0027s better to include it, but clearly point out that it is entirely optional due to the potential for loading the server.","commit_id":"687ad4c61eb4185c8d87d3816ea4608ff7f6d4f7"}]}
