Remove the support to GET operations on Query API call
Oracle Health Insurance plans to remove the support for GET operations on Query API calls.
This change applies to all Oracle Health Insurance components.
Date of deprecation: 2023-01-05
What is Deprecated?
The ability to call the Query API GET operation is deprecated.
This is replaced by the ability to call the Query API POST operation.
This deprecation affects the Collection Resource API, meaning that a GET call on http://[hostName]:[portNumber]/[api-context-root]/generic/{resource name} is also deprecated. |
Release 4.23.1
In release 4.23.1 the GET operation on Query API calls is only available when the system property ohi.service.queryapi.get.support
has value true
.
This property has value false
on installation.
When property ohi.service.queryapi.get.support
has value false
, a GET operation on Query API calls returns HTTP code 405.
Suggestion actions
Replace the use of the GET operation on the Query API calls with a POST operation and send the parameters (e.g. q, order by) as part of the request’s body. Below there are some examples of searches comparing the use of GET and POST.
With GET | With POST | |
---|---|---|
HTTP Method |
GET |
POST |
URI |
http://[hostName]:[portNumber]/[api-context-root]/generic/persons |
http://[hostName]:[portNumber]/[api-context-root]/generic/persons/search |
JSON Body |
N/A |
|
With GET | With POST | |
---|---|---|
HTTP Method |
GET |
POST |
URI |
http://[hostName]:[portNumber]/[api-context-root]/generic/persons?q=dateOfBirth.eq('1900-01-01').and.name.eq('Doe') |
http://[hostName]:[portNumber]/[api-context-root]/generic/persons/search |
JSON Body |
N/A |
|
With GET | With POST | |
---|---|---|
HTTP Method |
GET |
POST |
URI |
http://[hostName]:[portNumber]/[api-context-root]/generic/persons?q=dateOfBirth.eq('1900-01-01').and.name.eq('Doe')&orderBy=code:desc&limit=10&offset=0 |
http://[hostName]:[portNumber]/[api-context-root]/generic/persons/search |
JSON Body |
N/A |
|
With GET | With POST |
---|---|
|
Where jsonPayload is a String representing: { "resource": { "q": "code.eq('OHI-DYLO-001')" } } |
The page links associated to the query response also have a structure change in a future release: the "searchResource" element will be renamed to "body". See an example below:
Currently | In a future release |
---|---|
|
|