Get region details by using search criteria
The get region by search text method enables you to fetch details of all regions that match the search criteria.
URL
Use the following URL for the get region by search text method:
&startIndex=<<any valid number as startIndex>>
&propertySelection=<<comma separated fieldIds or fieldNames>>
&sortBy=<<comma separated fieldIds>>
&queryExpression=<<any valid query expression>>
Parameters
The following table provides information about the parameters of the get region by search text method:
Parameter | Description | Example |
---|---|---|
pageSize | Specifies how many records should be returned in this page. If you do not specify this parameter, then the method fetches 50 records by default. | /location/region?pageSize=35 |
startIndex | Specifies the first record's index of the page. | /location/region?startIndex=50 |
propertySelection | Specifies the list of comma-separated properties which should appear in the response object. The propertySelection parameter accepts numeric fieldIds or string fieldNames or a combination of both. | /location/region?propertySelection=locationName |
sortBy | Specifies the list of comma-separated properties by which data should get sorted. The sortBy parameter accepts numeric fieldIds or string fieldNames or a combination of both. To indicate a descending sort, prefix the value with hyphen (-). | /region/rootcause?sortBy=regionName |
queryExpression | Specifies the search criteria to fetch the regions. | /location/region?queryExpression='status' like "Enabled" |
Example
To get all the region names with the status Enabled, use the following URL:
In the example, locationName and status are region fields.
Related topic