You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, the format seems inconsistent when compared to similar endpoints for other objects. The results are embedded in a list under the '"_embedded" top level key, but there are no other top level keys i.e. "page" and "_links".
The outcome JSON for an endpoint such as:
https://www.gentar.org/tracker-api/api/plans/PIN:0000006277/outcomes
is missing top level properties i.e. "page" and "_links"
==========================================================
Context: email from 2020-03-08
Hi Gentar Staff,
Alba pointed me towards this endpoint when I was trying to browse outcomes:
https://www.gentar.org/tracker-api/api/plans/PIN:0000006277/outcomes
However, the format seems inconsistent when compared to similar endpoints for other objects. The results are embedded in a list under the '"_embedded" top level key, but there are no other top level keys i.e. "page" and "_links".
When I look at e.g. plans, I know not to expect any embedding/pagination when fetching a single item by primary key:
https://www.gentar.org/tracker-api/api/plans/PIN:0000006277
And I know to expect the results to be embedded, and for the pagination and links data to be present when fetching all results, or searching on field values i.e. anything which could return multiple results and therefore multiple pages:
https://www.gentar.org/tracker-api/api/plans
https://www.gentar.org/tracker-api/api/plans?phenotypingExternalRef=ORIOB
This logic holds true when fetching a single specific outcome by primary key:
https://www.gentar.org/tracker-api/api/plans/PIN:0000006277/outcomes/TPO:000000002050
but not when getting all outcomes for a plan.
https://www.gentar.org/tracker-api/api/plans/PIN:0000006277/outcomes
There could be multiple outcomes, and therefore (although not likely) multiple pages. Even if we could guarantee that there would never be multiple pages on this endpoint, having an embedded results list without the pagination data means it's hard to write universal code that can be used across all endpoints.
Is the lack of "pages" and "_links" an omission, or was there a reason for this?
Thanks very much,
Ruairidh
The text was updated successfully, but these errors were encountered: