Hello,
I am attempting to create a filter for an OData call to the odata/Machines endpoint. I need to be able to filter by RobotUsers → RobotId to return a single result as I would like to avoid having to iterate through the results on the client side. The only documentation I have found states that in order to access the property of a property, the proper formatting is to use / in between each property. The below data is the sample output structure that I am working with in the Swagger: {
“value”: [
{
“LicenseKey”: “string”,
“Name”: “string”,
“Description”: “string”,
“Type”: “Standard”,
“Scope”: “Default”,
“NonProductionSlots”: 0,
“UnattendedSlots”: 0,
“HeadlessSlots”: 0,
“TestAutomationSlots”: 0,
“AutomationCloudSlots”: 0,
“AutomationCloudTestAutomationSlots”: 0,
“Key”: “3fa85f64-5717-4562-b3fc-2c963f66afa6”,
“EndpointDetectionStatus”: “NotAvailable”,
“RobotVersions”: [
{
“Count”: 0,
“Version”: “string”,
“MachineId”: 0
}
],
“RobotUsers”: [
{
“UserName”: “string”,
“RobotId”: 0,
“HasTriggers”: true
}
],
“AutomationType”: “Any”,
“TargetFramework”: “Any”,
“UpdatePolicy”: {
“Type”: “None”,
“SpecificVersion”: “string”
},
“ClientSecret”: “string”,
“Tags”: [
{
“Name”: “string”,
“DisplayName”: “string”,
“Value”: “string”,
“DisplayValue”: “string”
}
],
“MaintenanceWindow”: {
“enabled”: true,
“jobStopStrategy”: “None”,
“cronExpression”: “string”,
“timezoneId”: “string”,
“duration”: 0,
“nextExecutionTime”: “2024-12-19T19:17:25.434Z”
},
“VpnSettings”: {
“cidr”: “string”
},
“Id”: 0,
“UpdateInfo”: {
“updateStatus”: “None”,
“reason”: “NonCompliantWithDifferentVersion”,
“targetUpdateVersion”: “string”,
“isCommunity”: true,
“statusInfo”: “string”
}
}
]
}
If I were to follow the formatting in the documentation, it would appear that the correct filter to access the RobotId would be as follows: RobotUsers/RobotId eq ‘##’, but when I try this in the Swagger, I get a 1000 error. I have also tried RobotUsers/any(u: u/RobotId eq ##) and received the same error.
Can anyone please assist me in setting up this filter in the correct format needed to access the nested values?
Additional information:
Version of Studio: 2023.10.8 Standalone
Activity Used: HTTP Request (do not want to use the Orchestrator Request activity)
Project Type: Windows-Legacy