"offset" does not behave according to documentation for /consortia/<consortiaId>/tenants

Description

When calling /consortia/<consortiaId>/tenants, the “offset” query parameter behaves like a page of limit rather than an actual offset. In addition, no tenants array is included in the response if offset pages past totalRecords.

Steps to reproduce:

  1. On a folio tenant configured as the central tenant in an ECS deployment

  2. Using a tool like Postman or cURL, make a call to /consortia/<consortiaId>/tenants without an offset and a limit of however many total tenants there are

  3. Make another call with limit=2 and offset=2

Expected results:

{"tenants": [{<tenant2>}, {<tenant3>}], "totalRecords": <totalRecords>}

Actual results:

{"tenants": [{<tenant4>}, {<tenant5>}], "totalRecords": <totalRecords>}

 

Additional Information:

This API is behaving very inconsistently to other offset/limit supporting APIs in FOLIO.

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Attachments

2
  • 08 Apr 2024, 07:52 AM
  • 08 Apr 2024, 07:52 AM

Checklist

hide

Activity

Show:

Serhii_NoskoApril 9, 2024 at 5:04 AM

Looks good, karate tests also passed, going to close this story.

Pagination approach changes for all endpoints in mod-consortia.

Default serialization including changed from NOT_EMPTY to NOT_NULL

Azizbek KhushvakovApril 8, 2024 at 7:52 AM

Tested on rancher
limit=2&offset=2
it is skipping first two record

image-20240408-075146.png

limit=2&offset=3
It is showing empty tenants

image-20240408-075223.png

Brooks TravisApril 1, 2024 at 4:33 PM

FYI. This will break any tools that rely on FOLIO returning an empty array for a final offset increment to indicate that all records have been retrieved. I’d say it’s a P3, but the response should follow FOLIO’s conventions and the documentation, which is to include the array in the response, even if it’s empty.

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Thunderjet

Fix versions

Release

Ramsons (R2 2024)

RCA Group

Implementation coding issue

Affected releases

Quesnelia (R1 2024)
Poppy (R2 2023)

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created April 1, 2024 at 4:30 PM
Updated May 13, 2024 at 5:51 PM
Resolved April 9, 2024 at 5:04 AM
TestRail: Cases
TestRail: Runs

Flag notifications