Download files via API

Download files via API

I'm not having much luck with the following API option:


Using PowerShell I cannot submit the request using invoke-webrequest/restmethod as they don't allow -body with -Method 'Get'
"Cannot send a content-body with this verb-type."

I've tried it as 'Post' (just out of curiosity) though I know it shouldn't work anyway, and it doesn't, I get:
"The remote server returned an error: (400) Bad Request."

It also fails if I try to submit the -Body as a hashtable rather than the usual json conversion as PowerShell adds the body to the uri as '?operation=...'.

Also, the API options seems a little odd to me.  It states that the URL should have 'resources/<Resource ID>/accounts/<Account ID>'.  But if the body has the option '"CUSTOMFIELDTYPE":"RESOURCE"' (because I want the resource's files) shouldn't '/accounts/<Account ID>' be optional too?
Or am I misunderstanding the functionality?

                New to ADManager Plus?

                  New to ADSelfService Plus?