REST APIcURL
cURL
Sample code using cURL
Token-Based HTTPS Request
This is the most basic example of accessing a REST API endpoint using an API token.
It assumes the API token has already been generated, replacing <token>
in the
examples below. It also uses the -k
option for cURL to bypass unknown certificate authority
errors, so it should be used with caution.
Token-Based HTTPS Request with CA
This sample code is similar to the previous, however this specifies a local
root CA (my-cert.pem
) to avoid TLS certificate errors.
Session-Based HTTPS Request with CA
This sample code shows how to make an HTTPS request using a
using a custom PEM file (my-certs.pem
) for the TLS certificate chain
and by using an HTTP session instead of a token.
Next