Forum Discussion

A_J_'s avatar
Icon for Altostratus rankAltostratus
Mar 09, 2022

Creating a wideip using Python f5-sdk


 I am trying to create a wideip using the 'payload' method in python, drawing all the attributes from a JSON file but I keep getting the following error:

{ "code":400,"message":"one or more configuration identifiers must be provided","errorStack":[],"apiError":26214401}

I'm not sure what I'm missing. If anyone has a sample code or could take a look, it would be greatly appreciated!


"": {
        "wideipkind": "tm:gtm:wideip:a:astate",
        "lbmode": "",
        "ttl": 3600,
        "pools": [
                "p1": {
                    "kind": "tm:gtm:pool:a:astate",
                    "name": "p1,
                    "partition": "Common",
                    "order": 0
    with open(filename, 'r') as fh:
        content = json.load(fh)
    wideip = ""
    name = wideip
    wideipkind = content[wideip]["wideipkind"]
    lbmode = content[wideip]["lbmode"]
    ttl = content[wideip]["ttl"]
    pools = content[wideip]["pools"]
    payload = {}

    payload['name'] = name
    payload['kind'] = wideipkind
    if lbmode:
        payload['poolLbMode'] = lbmode
    payload['pools'] = pools
    payload['ttlPersistence'] = ttl**payload)