Background
- I have an application which get list of runbooks jobs using REST API
- I would like to apply $filter on properties parameters(see JSON in the end). Parameters is of type
IDictionary<string,string>
Issue
- $filter works fine for most of the properties but fails for
IDictionary<string,string>
- This is what I am trying
https://management.azure.com/subscriptions/XXX/resourceGroups/XXX/providers/Microsoft.Automation/automationAccounts/XXX/jobs?$filter=properties/parameters/any(keyValue: keyValue/owner eq 'Adam@test.com')&api-version=2015-10-31
- Request fails with error
{ "code": "BadRequest", "message": "Could not find a property named 'owner' on type 'System.Collections.Generic.KeyValuePair_2OfString_String'." }
Question
- Is it possible to filter what I am trying?
- If yes, then what I am doing wrong?
JSON response on which I want to apply filter
"value": [
{
"id": "/subscriptions/XXX/resourceGroups/XXX/providers/Microsoft.Automation/automationAccounts/XXX/jobs/XXX",
"properties": {
"jobId": "XXX",
"runbook": {
"name": "HelloWorldRunbook"
},
"schedule": null,
"provisioningState": "Succeeded",
"status": "Completed",
"creationTime": "2018-06-17T05:44:12.197+00:00",
"startTime": "2018-06-17T05:44:21.227+00:00",
"lastModifiedTime": "2018-06-17T05:44:43.43+00:00",
"endTime": "2018-06-17T05:44:43.43+00:00",
"jobScheduleId": "7fc134ac-d8bd-464e-b041-6e6b50f83f0c",
"runOn": null,
"parameters": {
"Owner": "Adam@test.com",
"mailBox": "test_mailbox@test.com"
}
}
............removed for brevity