
Example
curl -ksS -H "X-Auth-Token:3d61f0d3e61349359e6dbd82ec02c113" \
-X POST https://10.0.1.42:8443/sdn/v2.0/apps/com.geewiz/action \
-d cancel
Deleting an application
This curl request is used to shutdown and completely remove all application versions. It has no
output.
Form
curl [options] -H "X-Auth-Token:
token
" \
-X DELETE https://
controller_ip
:8443/sdn/v2.0/apps/
app_id
Example
curl -ksS -H "X-Auth-Token:3d61f0d3e61349359e6dbd82ec02c113" \
-X DELETE https://10.0.1.42:8443/sdn/v2.0/apps/com.geewiz
Viewing metric data using curl commands
You can use curl commands view the metric data persisted by the controller components and
installed applications. For more information, see
.
Managing SNMP keys
Network management systems can use SNMP (Simple Network Management Protocol) to monitor
network-attached devices for conditions that require administrative attention.
As part of the switch identification process, the controller might use SNMP to obtain more specific
information about the switch. SNMP-enabled switches can be configured with community names
to provide more secure access.
The Key Service component of the controller allows network administrators to configure SNMP
security keys so that the controller can communicate with those switches using the secure key.
Getting the SNMP keys
To get the SNMP keys known to the controller, enter the following curl command:
curl --header "X-Auth-Token:
token
" -sX GET http://
controller_ip
:8080/sdn/v2.0/net/keys/SNMP
Sample command
curl --header "X-Auth-Token: 131eaa225ece4293bcebfd7f8e3cffd0" -sX GET http://localhost:8080/sdn/v2.0/net/keys/SNMP
Sample Response
{
"SNMP": [
"Default SNMP key",
"Test Key1",
"Test Key2",
"Test Key3"
]
}
Adding SNMP keys
To add one or more SNMP keys to the controller, enter the following curl command:
curl --header "Content-Type: application/json" --header "X-Auth-Token:
token
" -sX POST -d @
inputfile
http://
controller_ip
/sdn/v2.0/net/keys
Where
inputfile
is a file in the local directory that contains the key information in JSON format.
Sample command
curl --header "Content-Type: application/json" --header "X-Auth-Token:18433683aaea4e0782fa632ee9f04953" -sX
POST -d @inputfile http://localhost:8080/sdn/v2.0/net/keys
Viewing metric data using curl commands
179