Open APIs

 View Only
  • 1.  Paging offset out of range

    Posted Apr 11, 2022 09:19

    I would like to make clear, how the service should respond, when client sends request for partial content with offset out of range.

    Lets have collection with 100 items

    How the service should respond?
    1) 206 Partial Content, empty list (as should be for query parameters, where values doesn't match with resource data)
    2) 400 Bad Request, as the offset is out of range ?
    3) other?

    Thank you for clarification.

    Martin Cieslar
    Automation Tester
    Telia Norge AS

  • 2.  RE: Paging offset out of range

    TM Forum Member
    Posted Apr 11, 2022 09:37

    The ranging and partial content delivery is based on RFC7233. TM Forum extended this standard by defining the 'items' as range-unit.

    According to this standard the service should respond with

    416 Range Not Satisfiable
    Content-Range: items */100

    The Content-Range header provides sufficient information of the acceptable values for offset.

    Koen Peeters