Forum Discussion
Powershell: Invoke-RESTmethod on /mgmt/tm/sys/ucs (403) Forbidden error
thanks JRahm. I wanted to download UCS files which look to reside in /var/local/ucs/* so I should have been all good to go, but when I downloaded a UCS it was only 1MB. Then I read in an F5 doc that the iControl REST API is limited to 1MB downloads.
Re-reading the F5 Python SDK I see they managed to build a little loop that gets the file size and somehow manages to download it in little 1MB chunks. But, according to one of the "issues" posted in Github, it's incredibly slow. So, I've decided to just give up on scripting this with Powershell.
I can create a UCS archive via Powershell, and I can list the current ones, but it looks like downloading is a no go. Save for doing something like SCP or something.
yeah, you have to track the content-range header and grab chunks at a time. That's what we do with the python sdks. we have download/upload methods that manage that for us.
- KeyClackerMar 02, 2022Altocumulus
that's what I was seeing looking through the SDK on github. While I can kind of make sense of it, I don't know Invoke-RestMethod and the Content-Range header well enough to begin to tackle this.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com