Filter Values Wildcards
From Hostway API Documentation
Revision as of 11:56, 11 March 2014 by Mike.robski (Talk | contribs)
Filter Values Wildcards allow particular request's fields to be filtered by pattern. The symbol asterisk (*) replace any characters. If no wildcard is used, a exact match will be performed.
Contents |
Examples
Not Filtered Request
A request includes no filtering
GET http://{server_name}/accounts/popescu300021/exchange/ng-test-hwus-petre-120120b.com/mailingLists
{
"list" : [ {
"billingStatus" : "open",
"name" : "test_list",
"details" : "http://{server_name}/accounts/popescu300021/exchange/ng-test-hwus-petre-120120b.com/mailingLists/test_list"
}, {
"billingStatus" : "open",
"name" : "sample",
"details" : "http://{server_name}/accounts/popescu300021/exchange/ng-test-hwus-petre-120120b.com/mailingLists/sample"
}, {
"billingStatus" : "pending",
"name" : "end_with_test",
"details" : "http://{server_name}/accounts/popescu300021/exchange/ng-test-hwus-petre-120120b.com/mailingLists/end_with_test"
} ],
"links" : [ {
"href" : "http://{server_name}/accounts/popescu300021/exchange/ng-test-hwus-petre-120120b.com/mailingLists/",
"rel" : "self"
} ]
}
Filter by field prefix
Filter the 'name' field prefix
GET http://{server_name}/accounts/popescu300021/exchange/ng-test-hwus-petre-120120b.com/mailingLists?filterName=test*
{
"list" : [ {
"billingStatus" : "open",
"name" : "test_list",
"details" : "http://{server_name}/accounts/popescu300021/exchange/ng-test-hwus-petre-120120b.com/mailingLists/test_list"
} ],
"links" : [ {
"href" : "http://{server_name}/accounts/popescu300021/exchange/ng-test-hwus-petre-120120b.com/mailingLists?filterName=test*",
"rel" : "self"
} ]
}
Filter by field suffix
Filter the 'name' field suffix
GET http://{server_name}/accounts/popescu300021/exchange/ng-test-hwus-petre-120120b.com/mailingLists?filterName=*test
{
"list" : [ {
"billingStatus" : "open",
"name" : "end_with_test",
"details" : "http://{server_name}/accounts/popescu300021/exchange/ng-test-hwus-petre-120120b.com/mailingLists/end_with_test"
} ],
"links" : [ {
"href" : "http://{server_name}/accounts/popescu300021/exchange/ng-test-hwus-petre-120120b.com/mailingLists?filterName=*test",
"rel" : "self"
} ]
}
More text wildcards
Filter by 'name' field, where 'name' contains 'test' string
GET http://{server_name}/accounts/popescu300021/exchange/ng-test-hwus-petre-120120b.com/mailingLists?filterName=*test*
{
"list" : [ {
"billingStatus" : "open",
"name" : "test_list",
"details" : "http://{server_name}/accounts/popescu300021/exchange/ng-test-hwus-petre-120120b.com/mailingLists/test_list"
}, {
"billingStatus" : "open",
"name" : "end_with_test",
"details" : "http://{server_name}/accounts/popescu300021/exchange/ng-test-hwus-petre-120120b.com/mailingLists/end_with_test"
} ],
"links" : [ {
"href" : "http://{server_name}/accounts/popescu300021/exchange/ng-test-hwus-petre-120120b.com/mailingLists?filterName=*test*",
"rel" : "self"
} ]
}
Exact Match
GET http://{server_name}/accounts/popescu300021/exchange/ng-test-hwus-petre-120120b.com/mailingLists?filterName=test_list
{
"list" : [ {
"billingStatus" : "open",
"name" : "test_list",
"details" : "http://{server_name}/accounts/popescu300021/exchange/ng-test-hwus-petre-120120b.com/mailingLists/test_list"
} ],
"links" : [ {
"href" : "http://{server_name}/accounts/popescu300021/exchange/ng-test-hwus-petre-120120b.com/mailingLists?filterName=test_list",
"rel" : "self"
} ]
}
See also