Query Options | Config REST Web Service

Query options are query string parameters that control the amount and order of the configuration objects comming from a Config REST Web Service. They can be applied when requesting a list of configuration objects.

The options can be combined and their names are prefixed with a dollar $ character.

$count

With the option $count, clients can get the total number of configuration objects. If present, the @odata.count property is present in JSON string of HTTP response.

Example

Reading all configuration objects with the total number of configuration objects

Request
GET {config_rest_web_application_location}/ConfigBases?$count=true

$top

With the option $top, clients can specify the maximum number of configuration objects that should be returned, starting from the beginning.

The option does not affect the total number of configuration objects in the payload when selected by $count option.

Example

Reading the first 10 configuration objects

Request
GET {config_rest_web_application_location}/ConfigBases?$top=10

$skip

With the option $skip, clients can specify the number of configuration objects that should be ignored at the beginning of a collection.

The option does not affect the total number of configuration objects in the payload when selected by $count option.

Example

Reading and skipping the first 10 configuration objects

Request
GET {config_rest_web_application_location}/ConfigBases?$skip=10

$orderby

With the option $orderby, clients can specify the order of configuration objects. If the option is not specified, the order depends on the backend data source.

The order can be asc`ending (default) or `desc`ending and is based on names of properties with primitive values (in OpenApi specification as `"integer" or "string") only.

Multiple property names can be separated by a comma to create a chain of comparators. The next comparator in the sequence is applied when the previous one returns the same result.

If the selected property is not part of all configuration objects, configuration objects without the property comes first in the result.

Examples

Reading all configuration objects in ascending order by dp property and then in ascending order by key property

Request
GET {config_rest_web_application_location}/ConfigBases?$orderby=dp,key

Reading all configuration objects in descending order by dp property and then in ascending order by key property

Request

GET {config_rest_web_application_location}/ConfigBases?$orderby=dp desc,key

Reading all configuration objects - objects with the assuranceLevel property are in ascending order according to this property

GET {config_rest_web_application_location}/ConfigBases?$orderby=assuranceLevel

$filter

With the option $filter, clients can request a subset of all configuration objects. The subset can be specified by <BooleanExpression> (certain criteria) which each of the returned configuration objects have to fulfill. If the value returned for a given configuration object is true, the object is returned. Otherwise the configuration object is discarded.

The option affects the total number of configuration objects in the payload when selected by $count option.

The option is specified as follows:

$filter=<BooleanExpression>

Examples

Supported filtering operations can be divided between comparison and logical operations and functions.

Comparison and Logical Operations

Reading all configuration objects with dp property value not equal to net.atos.dirx.access.apprepo.api.config.XmlTemplate
Request
GET {config_rest_web_application_location}/ConfigBases?$filter=dp ne 'net.atos.dirx.access.apprepo.api.config.XmlTemplate'

Reading all configuration objects with dp property value equal to net.atos.dirx.access.apprepo.api.config.XmlTemplate

Request

GET {config_rest_web_application_location}/ConfigBases?$filter=dp eq 'net.atos.dirx.access.apprepo.api.config.XmlTemplate'

Reading all configuration objects with dp property value equal to net.atos.dirx.access.apprepo.api.config.client.web.saml.SamlMetadata or net.atos.dirx.access.apprepo.api.config.client.web.ws.WsFederationMetadata

Request
GET {config_rest_web_application_location}/ConfigBases?$filter=dp eq 'net.atos.dirx.access.apprepo.api.config.client.web.saml.SamlMetadata' or dp eq 'net.atos.dirx.access.apprepo.api.config.client.web.ws.WsFederationMetadata'
Reading all configuration objects with useSsl property value equal to false
Request
GET {config_rest_web_application_location}/ConfigBases?$filter=useSsl eq false

Reading all configuration objects with type enum property value equal to JwtToken

Request

GET {config_rest_web_application_location}/ConfigBases?$filter=type has RequestInjectionTemplate.RequestInjectionType'JwtToken'

Reading all configuration object with references to DirX Access PEP in webPepId or pepId properties

Request
GET {config_rest_web_application_location}/ConfigBases?$filter=(webPepId/key eq 'DirX Access PEP') or (pepId/key eq 'DirX Access PEP')

String Functions

Reading all configuration objects that contain Authn string in key property value

Request

GET {config_rest_web_application_location}/ConfigBases?$filter=contains(key,'Authn')
Reading all configuration objects that start with net.atos.dirx.access.apprepo.api.config.authn.method string in dp property value
Request
GET {config_rest_web_application_location}/ConfigBases?$filter=startswith(dp,'net.atos.dirx.access.apprepo.api.config.authn.method')

Reading all configuration objects that end with Template string in dp property value

Request

GET {config_rest_web_application_location}/ConfigBases?$filter=endswith(dp,'Template')

Reading all configuration objects with description property value string length less than or equal to 20 characters

Request
GET {config_rest_web_application_location}/ConfigBases?$filter=length(description) le 20
Reading all configuration objects than contain export string in description property value converted to lowercase characters
GET {config_rest_web_application_location}/ConfigBases?$filter=contains(tolower(description),'export')