•  
      request #6400 REST route /tracker_reports/:id/artifacts has problems with pagination
    Infos
    #6400
    Laurent Delaigue (ldelaigue)
    2014-03-07 18:48
    2014-03-06 10:59
    6475
    Details
    REST route /tracker_reports/:id/artifacts has problems with pagination
    OPTIONS /tracker_reports/:id/artifacts does not return pagination info in the HTTP headers.
    => This prevents correct preparation of paginated calls

    GET /tracker_reports/:id/artifacts?offset=10&limit=10 returns wrong pagination info: HTTP header X-PAGINATION-OFFSET is always 0, it should be if called with the given query string.
    => This forces clients to not take this offset header into account, which is dangerous.

    I haven't checked if the same occurs for other paginated routes, I think it'd be interesting to check such other routes though.
    API
    6.10
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Manuel Vacelet (vaceletm)
    Closed
    Empty
    Attachments
    Empty
    References

    Follow-ups

    User avatar
    Merged in 6.11.99.2

    • Status changed from Under review to Closed
    • Reported in version set to 6.10
    User avatar
    I cannot introduce SIZE in OPTIONS without perf penalty.

    I fixed the headers on GET in gerrit #2046

    • Status changed from Verified to Under review
    • Assigned to changed from None to Manuel Vacelet (vaceletm)
    User avatar
    Sorry, I should have been more accurate.
    I expected the X-PAGINATION-SIZE in the header, to know how many elements there are without calling GET.
    Now if it's not possible, for example for performance reasons, I'd understand and be able to live without.
    User avatar
    For the first one, I do have the headers on tuleap.net:
    
    curl -v -XOPTIONS https://tuleap.net/api/v1/tracker_reports/242/artifacts
    
    < HTTP/1.1 200 OK
    < Date: Thu, 06 Mar 2014 17:30:23 GMT
    < Server: Apache/2.2.3 (CentOS)
    < X-Powered-By: Luracast Restler v3.0.0rc4
    < Vary: Accept,User-Agent
    < Allow: OPTIONS, GET
    < Access-Control-Allow-Methods: OPTIONS, GET
    < X-PAGINATION-LIMIT: 10
    < X-PAGINATION-OFFSET: 0
    < X-PAGINATION-LIMIT-MAX: 50
    < Cache-Control: no-cache, must-revalidate
    < Expires: 0
    < Content-Language: en
    < Content-Length: 0
    < Content-Type: application/json; charset=utf-8

    For the second one I confirm the bug (the other routes are not impacted).

     

     


    • Status changed from New to Verified