Notifications
Clear all

Pagination URL doesn't work


(@derek)
Eminent Member
Blev medlem: 4 månader sedan
Inlägg: 20
Topic starter  

Hi,
The pagination URL, in the sandbox at least, doesn't work since it converts the base url to presumably the equivalent IP address, but which then isn't navigable!

For example, when I retrieve a list of slots, with this query:-

 https://api.openservices.cambio.se/fhir/Slot?_count=10&healthcareFacility=SE162321000024-6901&healthcareService=1725&start=gt2024-01-11T00:00:00.000+01:00&start=lt2024-12-31T00:00:00.000+01:00 

then the 'next' link used by pagination and returned in the results looks like this:-

{
"relation": "next",
"url": "https://13.74.30.234:8080/fhir?_getpages=c81a2760-0ad8-473c-bf3c-dd92b2776b92&_getpagesoffset=10&_count=10&_bundletype=searchset"
}

Note that the base url 'https://api.openservices.cambio.se' has been changed to 'https://13.74.30.234:8080'. That URL gives the following error:-

Error: write EPROTO 4616946952:error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER:../../../../src/third_party/boringssl/src/ssl/tls_record.cc:242:

If I were to substitute the original base url into the next link then it will work fine and return the next page of results. e.g.


 https://api.openservices.cambio.se/fhir?_getpages=c81a2760-0ad8-473c-bf3c-dd92b2776b92&_getpagesoffset=10&_count=10&_bundletype=searchset 
 



However, I shouldn't have to do that. Why is it inserting the wrong link in the 'Next' relation? This makes it difficult to try out programmatically fetching paged results since the url needs unnecessary modification each time. Do the links in the live server behave this way? Ideally the sandbox and the live server ought to behave similarly so that we can safely try out and test code.

Is this behaviour by design or is it an oversight/bug ?

Also, on a minor note, I note that there is a very short time-out of only a few seconds on fetching subsequent pages, e.g. you can easily get this error if you delay any longer:-

{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Page not found, Either cache time out or cache server not available"
}
]
}

Thanks.

Derek

This topic was modified 2 veckor sedan by Derek

   
Citera
Topic Tags