Hello,
I am trying to add a network to my OSPF configuration using the API. I’m doing this with curl in a bash script, and for some reason I’m being told that the configuration path is invalid.
The script collects input (x.x.x.x/yy), and puts it in a variable, then attempts to connect and configure, but it fails.
Here’s the script:
echo “Enter the network to be advertised:”
read network
curl --insecure --location --request POST ‘https://10.0.0.2/configure’ --form data=‘{“op”: “set”, “path”: [“protocols”,“ospf”,“area 0”,“network ‘$network’”]}’ --form key=‘apikey’
The response is a failure, and the included text says:
Configuration path: [protocols ospf area 0 network x.x.x.x/yy] is not valid\n\nSet failed\n", “data”: null}
Can someone tell me the right way to format this?
Thank you