I send a POST
command against an API with Invoke-RestMethod
. I expect the return value to be a download link that I want to process further. However, this URL is stored in a property whose name changes with each retrieval (in my Example 0bab6b8c-9f30-xxxx-xxxx-ad99957aeae0
).
Example:
$query = Invoke-RestMethod @Params
Response:
$query.result.'0bab6b8c-9f30-xxxx-xxxx-ad99957aeae0' | fl *
status : success
name : myfile.wav
size : 508312
source_url : https://xxxxxxxx/0bab6b8c-9f30-xxxx-xxxx-ad99957aeae0
duration : 2
How do I get to the next property of $query.result
with Powershell when I don’t even know the ResponseID?