works well, but instead or in addition to the userId I want the username only possible through expanding another level, so:
(Invoke-RestMethod "https://api-us.cloud.com/monitorodata/Connections?`$expand=Session(`$expand=User)&`$top=1" -Headers $headers -Method Get).value # -> no error but empty output for 'User='
other tests like this are not working:
(Invoke-RestMethod "https://api-us.cloud.com/monitorodata/Connections?`$expand=Session(`$expand=Session/User)&`$top=1" -Headers $headers -Method Get).value ### -> error with URI
Question
David E.
hi there,
trying to output the username (e.g) from a connection with odata and powershell:
(Invoke-RestMethod "https://api-us.cloud.com/monitorodata/Connections?`$expand=Session&`$top=1" -Headers $headers -Method Get).value
works well, but instead or in addition to the userId I want the username only possible through expanding another level, so:
(Invoke-RestMethod "https://api-us.cloud.com/monitorodata/Connections?`$expand=Session(`$expand=User)&`$top=1" -Headers $headers -Method Get).value # -> no error but empty output for 'User='
other tests like this are not working:
(Invoke-RestMethod "https://api-us.cloud.com/monitorodata/Connections?`$expand=Session(`$expand=Session/User)&`$top=1" -Headers $headers -Method Get).value ### -> error with URI
(Invoke-RestMethod "https://api-us.cloud.com/monitorodata/Connections?`$expand=Session(`$expand=Users)&`$top=1" -Headers $headers -Method Get).value # -> Users won't work
MS has different examples but I found nothing with Citrix. connections are only one example, I can reproduce it with other tables.
Someone successfully did a multi-expand in powershell and could post his code here? thanks
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now