Anyone have any experience uploading files to a BIG-IQ using the REST API? The API documentation for 4.2 details the /mgmt/shared/file-transfer/upload endpoint (also used by BIG-IPs) but while the endpoint still exists in 5.3, sending either a token or basic auth will result in a 401 (same code works for our BIG-IPs.) I did notice that the corresponding /download endpoint does not exist on our 5.3 BIG-IQ, so maybe file transferring is not implemented yet?
Greetings, I was able to upload, but haven’t found the download just yet:
On my linux host:
cat fileo
hey
curl -s -k -u admin:admin -H 'Content-Type: text/plain' -H 'Content-Range: 0-2/3' -d @fileo -X POST https://172.24.171.25/mgmt/shared/file-transfer/uploads/fileo
On BIG-IQ (5.3):
cat /var/config/rest/downloads/fileo
hey
Will let you know if I can find the download method.
Kevin
Looks like I had two issues going on: 1) Token auth is not accepted on this endpoint (confirmed on our LTM devices as well) and 2) BIG-IQ doesn’t accept basic auth by default (https://support.f5.com/csp/article/K43725273)
Once I enabled basic auth on BIG-IQ and switched my code to use basic auth, the uploads started to work.
Thanks!
Oh great, I had to do the same, should have mentioned that =(
Thanks for letting us know. I’m not sure the impact exactly, but I’ve been able to upload and download using the following. BIG-IQ doesn’t store backups here, so it seems innocuous:
curl -s -k -u admin:admin -H 'Content-Type: text/plain' -H 'Content-Range: 0-2/3' -d @fileo -X POST https://172.24.171.25/mgmt/shared/file-transfer/ucs-uploads/fileo
curl -s -k -u admin:admin -H 'Content-Type: text/plain' -H 'Content-Range: 0-2/3' -X GET https://172.24.171.25/mgmt/shared/file-transfer/ucs-downloads/fileo -o fileo
Kevin
Good to know! I’ll switch to those endpoints for our BIG-IQ devices but keep the standard upload/download endpoints for LTM/GTM devices.
Thanks again!
You’re welcome Matt!
Just a heads up for anyone in the future… if you use the /ucs-uploads endpoint and then try to import the certificate into BIG-IQ with the /certificate-management endpoint (using the ADD_CERT command) the API will throw this error:
“code”:400,“message”:“filePath must start with /var/config/rest/downloads”
Using the regular /uploads endpoint works great. ![]()