Swagger (Orchestrator APIs) filter syntax

Hello everyone,

I used Swagger to get Orchestrator Users.
I used https://cloud.uipath.com /…/odata/Users request to take all users and it gives me the below body;
From this body, I want to filter specific domain\username. (“UnattendedRobot”: {“UserName”: “domain\username”})

How to add UnattendedRobot/Username filter to take specific domain\username in Swagger?
What is the correct syntax?
{

@odata.context”: “https://cloud.uipath.com /…/odata/Users” ,
@odata.count”: 1,
“value”: [
{
“Name”: “xxx” ,
“Surname”: “” ,
“UserName”: “xxx” ,
“Domain”: null ,
“DirectoryIdentifier”: null ,
“FullName”: “xxx” ,
“EmailAddress”: “” ,
“IsEmailConfirmed”: false ,
“LastLoginTime”: “2023-04-25T20:35:23.863Z” ,
“IsActive”: true ,
“CreationTime”: “2023-04-25T20:35:23.787Z” ,
“AuthenticationSource”: “local” ,
“Password”: null ,
“IsExternalLicensed”: false ,
“RolesList”: [
“Robot”
],
“LoginProviders”: ,
“TenantId”: xxx ,
“TenancyName”: null ,
“TenantDisplayName”: null ,
“TenantKey”: null ,
“Type”: “DirectoryRobot” ,
“ProvisionType”: “Manual” ,
“LicenseType”: null ,
“Key”: “xxx” ,
“MayHaveUserSession”: false ,
“MayHaveRobotSession”: false ,
“MayHaveUnattendedSession”: true ,
“BypassBasicAuthRestriction”: false ,
“MayHavePersonalWorkspace”: false ,
“RestrictToPersonalWorkspace”: false ,
“AccountId”: null ,
“LastModificationTime”: “2023-04-26T08:28:03.13Z” ,
“LastModifierUserId”: xxx ,
“CreatorUserId”: xxx ,
“Id”: xxx ,
“RobotProvision”: null ,
“UnattendedRobot”: {
“UserName”: “domain\username” ,
“Password”: “••••••••••••••••••••” ,
“CredentialStoreId”: xxx ,
“CredentialType”: “Default” ,
“CredentialExternalName”: null ,
“LimitConcurrentExecution”: false ,
“RobotId”: xxx ,
“MachineMappingsCount”: 0 ,
“ExecutionSettings”: {}
},
“NotificationSubscription”: {
“Queues”: true ,
“Robots”: true ,
“Jobs”: true ,
“Schedules”: true ,
“Tasks”: true ,
“QueueItems”: true ,
“Insights”: false ,
“CloudRobots”: true ,
“Serverless”: false ,
“Export”: true
},
“UpdatePolicy”: null
}
]
}

@isil.boyuk

Please try this

UnattendedRobot/UserName eq 'Usernametosearch'

Cheers

@Anil_G
I have tried this syntax many times.
Also, I tried UnattendedRobot/UserName contains ‘domain’ but both give the same error that is
“message”: “Invalid OData query options.”,
“errorCode”: 1000,
Unfortunately, It doesn’t work.

@isil.boyuk

Upon further investigation could see that nested queries are not getting executed

Other way would be to get the data and then filter the response as needed

We can deserialize and filter using iterating through each set or using linq

cheers

@Anil_G
I will go with linq but there should be query syntax for filtering.
Thank you for your opinion and help.