Forum Discussion

Joshua_Beam_129's avatar
Joshua_Beam_129
Icon for Nimbostratus rankNimbostratus
Jan 12, 2015

Extremely New iControlREST Question

I am extremely new to iControlREST and after reading through the user guide and some wikis here I am still having an issue running a simple post to build a pool with one member inside.

 

Ex: curl -sk -u xxxx:xxxx -H "Content-Type: application/json" -X POST https://10.1.35.254/mgmt/tm/ltm/pool -d "{"name":"test-pool","members":{"name":"tunes1:80","address":"10.1.42.65"}}"

 

After trying to post this with my Windows machine (double quotes were used). I receive an error of : {"code":400,"message":"Found invalid JSON body in the request.","errorStack":[]}

 

Looking for a little guidance here to set me sailing on my way with iCR.

 

1 Reply

  • Looks like your json string contains

    "
    and is wrapped in
    "
    s as well. Will this work:

    curl -sk -u xxxx:xxxx -H "Content-Type: application/json" -X POST https://10.1.35.254/mgmt/tm/ltm/pool -d '{"name":"test-pool","members":{"name":"tunes1:80","address":"10.1.42.65"}}'