Hello everyone.
In 2.5.1, we did a bunch of work on existing APIv3 endpoints. There were 2 main goals we wanted to achieve:
1) introduce both enum and string values to endpoints which used enums
2) unify search handling, and introduce ability to use both AND or OR search functions in the AP
For point 1, this is rather simple. We are adding both enum and string value representations to all enum-type objects in the API. This will give you the option to use string representations of enums in the API.
For search (point 2), we added the option to specify AND or OR search functions in the API between fields properties. There were inconsistencies in the API as to what searches would be ORed and what would be ANDed. We decided to unify this to the following:
- search will use OR between multiple properties
- within a property with multiple provided values, OR will be used by default, but you now have an option to specify AND
If you want to do AND between properties, you can fire multiple API requests, each with its own property filters, and AND the resulting data yourself.
This might be best shown using an example. Let's say you do an APIv3 LIST request to the "zone" endpoint. You specify as search criteria "names" and also "numbers". So you provided 2 properties to search with. By default, within properties, OR will be used. But OR will also be used between properties. In effect, you will get a hit if any of the provided criteria match. BUT, you can now also specify AND within properties. As mentioned above, between properties, OR will always be used.
All in all, here are the APIv3 changes coming in 2.5.1:
For search, added option to specify if AND or OR should be used within properties if multiple property values are provided (OR by default)
For search, OR logic is used between properties if multiple search properties are provided
All enum type fields now have 2 values - Enum and String, adding option to use string representation in the API
Added object descriptions to multiple endpoints that were missing them
All in all, here is a full list of changes to existing endpoints in APIv3 in 2.5.1:
Code: Select all
credential - create - request -> rename type to typeEnum
list - request -> rename credentialsTypes to typeEnums
- response -> rename credentialsType to typeEnum
job status - list - request -> rename jobType to jobTypeEnum
- response -> rename jobType to jobTypeEnum
push - run - request -> advanced settings -> rename promptMatchingMode to promptMatchingModeEnum
tag - create - request -> rename backupStrippingPolicy to backupStrippingPolicyEnum
- list - request -> rename strippingPolicies to backupStrippingPolicyEnums
- response -> rename backupStrippingPolicy to backupStrippingPolicyEnum
zone - create - request -> rename proxyType to proxyTypeEnum
- list - request -> rename proxyTypes to proxyTypeEnums
- response -> rename proxyType to proxyTypeEnum
zone default searching between properties was AND, fixed to OR
And here is what was added to the APIv3 in 2.5.1:
Code: Select all
credential - create - description -> enhancement
- list - request -> added searching by typeStrings
-> added valueOperand (AND/OR- by default)
- response -> added typeString
- description -> enhancement
job status - list - request -> added jobTypeStrings
- response -> added jobTypeString
-> added taskStateString
- description -> enhancement
push - run - description -> enhancement
tag - create - description -> enhancement
- list - request -> added backupStrippingPolicyStrings
-> added valueOperand (AND/OR- by default)
- response -> added backupStrippingPolicyString
- description -> enhancement
zone - create - description -> enahncement
- list - request -> added proxyTypeStrings
-> added valueOperand (AND/OR- by default)
- response -> added proxyTypeString
- description -> enhancement