Executing Public API Methods with cURL Utility
This section describes how to execute Operations Public API methods using the curl
utility.
Note: The curl
utility for Windows-based hosts can be obtained from the http://curl.haxx.se web site. For Linux-based hosts the curl
utility is available in the OS distribution.
- Log in to the host where the
curl
utility is installed. - Create a file and insert the required XML-RPC request into it. Signatures of Operations Public API methods are provided in the Public API Reference section.
- Execute the following command:
# curl -k -d@FILE PROTOCOL://LOGIN:PASSWORD@IP_ADDRESS:PORT
Where:
- FILE – Path to the file that contains the XML-RPC request.
- PROTOCOL – Protocol used to connect to the Operations XML-RPC server (http or https).
- PASSWORD and LOGIN – Credentials of a Staff Member belonging to the Operations Provider's/Reseller's Account.
- IP_ADDRESS – The IP Address of the Operations XML-RPC server.
- PORT – Port number of the Operations XML-RPC server (8440 is default port).
Examples:
# curl -k -d@/root/pem.addAccount.xml https://login:password@1.1.1.1:8440 # curl -k -d@/root/pem.addAccount.xml https://1.1.1.1:8440 # curl -k -d@/root/pem.addAccount.xml http://1.1.1.1:8440