Remove the support to GET operations on Query API call

Oracle Health Insurance removes the support for GET operations on Query API calls.

The change applies to all Oracle Health Insurance components.
The change was initiated by the service request with SR Number 3-29768858921.
Date of deprecation: 2023-01-05

What is Deprecated?

The support to GET operations on Query API calls is deprecated. This means that during the deprecation period the GET operation on the Query API is still available.

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.

Actions for the Customer to Take

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.

Table 1. Retrieving a collection resource
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

{
    "resource": {
    }
}
Table 2. Searching for a person using two filters
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

{
    "resource": {
        "q": "dateOfBirth.eq('1900-01-01').and.name.eq('Doe')"
    }
}
Table 3. Searching for a person using two filters, specifying an order by criteria, limit and offset for pagination purposes
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

{
    "resource": {
        "q": "dateOfBirth.eq('1900-01-01').and.name.eq('Doe')",
        "orderBy": "code:desc",
        "limit": 10,
        "offset": 0
    }
}
Table 4. Searching via Dynamic Logic
With GET With POST
String response = initCallOut(WebTarget.class)
        .path("generic/messages")
        .queryParam("q","code.eq('OHI-DYLO-001')")
        .request("application/json")
        .buildGet()
        .invoke()
        .readEntity(String.class)
String response = initCallOut(WebTarget.class)
        .path("generic/messages/search")
        .request()
        .buildPost(Entity.json(jsonPayload))
        .invoke()
        .readEntity(String.class)

Where jsonPayload is a String representing:

{
    "resource": {
        "q": "code.eq('OHI-DYLO-001')"
    }
}

Please note that the Page Links associated to the query response will also have a structure change in a future release: the "searchResource" element will be renamed to "body". See an example below:

Table 5. Change in the Response
Currently In a future release
"searchResource": {
    "resource": {
        "offset": "50",
        "name": "activities"
    }
}
"body": {
    "resource": {
        "offset": "50",
        "name": "activities"
    }
}