HomeGuidesAPI Reference
GuidesAPI ReferenceGitHubAirheads Developer CommunityLog In

cURL is a free and open-source command line tool and library used to transfer data with URLs. Using cURL, users are able to send REST calls directly from a client to the AOS-CX device.

cURL can be downloaded on its webpage here.
Documentation for cURL can be found on its man page here.

To use cURL with the AOS-CX REST API, use the following format in the command line:

curl -X <method> --url <uri> --header  'content-type: application/json' -d <payload>

can be GET, POST, DELETE, or PUT, is the target URI, and is the body of data to be sent if necessary.

An example cURL command to add VLAN 3000 would be:

curl -X POST "https://192.168.1.1/rest/v10.04/system/vlans" --header  "Content-Type: application/json" -d "{\"id\":3000,\"name\":\"VLAN3000\"}

🚧

Note that for literal usage of double quotes (") within the body, you escape the double quotes with a preceding backslash (\) like so: "


What’s Next