Forum Discussion

Arindam_Majumd1's avatar
Arindam_Majumd1
Icon for Nimbostratus rankNimbostratus
Apr 17, 2019

what is the rest api details to load the entire configuration from a bigip device

I am looking for a rest api to read the entire configuration out of a big ip device.

 

1 Reply

  • You can generate a UCS file and download.

    Generate

    curl -sku admin: https:///mgmt/tm/sys/ucs \
      -X POST -H "Content-Type: application/json" \
      -d '{"command":"save", "name":"/shared/images/sat.ucs"}'
    

    By default, ucs files are saved under

    /var/local/ucs
    . Here,
    /shared/images
    is specified because it is the location where you can download files via iControl REST.

    Get the size of the file

    curl -sku admin: https:///mgmt/tm/util/unix-ls \
      -X POST -H "Content-Type: application/json" \
      -d '{"command":"run", "utilCmdArgs":"-l /shared/images"}'
    

    Download the file

    curl -sku admin: https:///mgmt/cm/autodeploy/software-image-downloads/sat.ucs \
      -H "Content-Type: application/octet-stream" \
      -H "Content-Range: 0-41609/41610" -o sat.ucs
    

    Specify the size of the file in

    Content-Range
    header: Start (0) - Last (size -1) / Total size.

    See Demystifying iControl REST Part 5: Transferring Files for more on iControl REST file transfer methods.