Starting in the 0.9.5.x version, we are making some changes in how search parameters are passed to the API. If you currently use any search methods, then you will probably need to make changes to ensure your application works correctly.

We expect these changes to be available in the DEV environment by 12-AUG-22 and in PROD by 26-AUG-22.

Why are we making these changes?

These breaking changes are laying the groundwork for more sophisticated parameter options, including operators (is equal, is blank, etc.) and date expressions, which we will roll out in future versions.

What is changing?

Most String, Numeric, Date and Enum parameters are moving to the new extended parameter types. Certain parameters will remain as-is as simple parameter types (no changes needed).

Some string parameters that have a corresponding condition parameter will be consolidated into the new type via the compareCondition property. For these scenarios, the associated condition parameter is no longer available.

What changes do I need to make?

In most cases, the value side of the parameter needs to be changed from a literal value to an object that expresses the value and any additional operators or other parameters. The value itself is an array, so even if there’s only one value, you need to enclose with brackets in the json.

For example, if your profile search params look like this:

Old string parameter example

{
    "profileType": {
        "value": 1
    },
    "activestatus": true,
    "profileNameCond": 5, 
    "profileName": "Able", 
    "includeCols": [
        "recNo",
        "name"
  ]
}

You’ll need to change to this:

New string parameter example

{
    "profileType": {
        "value": 1
    },
    "activestatus": true,
    "profileName": {
        "value": ["Able"],
        "compareCondition": 5 
    }, 
    "includeCols": [
        "recNo",
        "name"
    ]
}

For date parameters, you specify the value as “date”.

Old date parameter example

{
    "targetDateFrom": "12/31/2001",
    "targetDateTo": "12/31/2001",
    "includeCols": ["recNo", "targetDate", "appUserId", "type", "subject"]
}

You’ll need to change to this:

New request example

{
    "targetDateFrom": {"date": "12/31/2001"},
    "targetDateTo": {"date": "12/31/2001"},
    "includeCols": ["recNo", "targetDate", "appUserId", "type", "subject"]
}

How do I know which parameters are updated?

Any parameter types of Date, DateTime and DateTimeUTC will need to use the new date parameter format.

Almost all other parameters will use the value format from the example above for string.

There are a handful of parameters that still use the old simpler parameter format. We’ll be identifying those via the search parameter table.

What happens if I don’t make any changes?

If the parameters are not in the correct format, you’ll get an error response back from the server with details about which parameter is incorrectly formatted.

Old invalid parameter example

{
    "targetDateFrom": "12/31/2001",
    "targetDateTo": "12/31/2001",
    "includeCols": ["recNo", "targetDate", "appUserId", "type", "subject"]
}

Error response

{
    "resultCode": 406,
    "resultDescription": "Error deserializing Json Error converting value \"12/31/2001\" to type 'AppServer.Shared.Models.DateSearchParamModel'. Path 'targetDateFrom', line 2, position 32.",
    "method": "Param"
}