load

Code

BIGIQ.load(path: str) list[RESTObject] | RESTObject

Loads one object or a list of objects from the device. If you call with a specific object name, it returns a single object. If you call without an object name, it returns a list of objects.

Sends an HTTP GET request to the iControl REST API.

Parameters:

path – HTTP path used in the HTTP request sent to the device.

Exceptions:

RESTAPIError: Raised when iControl REST API returns an error.

Example

path = (
    "/mgmt/cm/adc-core/working-config/ltm/virtual"
    "?$filter=name eq 'bigrest_vs'"
)
virtual_id = device.id(path)
virtual = device.load(f"/mgmt/cm/adc-core/working-config/ltm/virtual/{virtual_id}")
virtuals = device.load("/mgmt/cm/adc-core/working-config/ltm/virtual")

Explanation

This will load one or multiple objects from the device.
If called with an object name, it will just return a single object.
If called without an object name, it will return a list with all object of that type.
The first lines load a single virtual server.
As the name of the virtual server was provided, we know it will only return a single object.
The last line will load all virtual servers from the device.
You can then use a “for” to loop thought the virtual servers one by one.