Accessing the REST API using curl
When you use curl, you log in at the beginning of your session and log out at the end of the session. When you log in, you must save the cookie returned from the login request so that you can pass that same cookie value to the switch in subsequent curl commands.
Prerequisites
Access to the switch REST API must be enabled.
Procedure