Authentication

To authenticate an internal API request, you'll need to pass an X-CYCLE-TOKEN header, where the value of the header is an automatically injected token accessible via the CYCLE_API_TOKEN environment variable from within an instance running on Cycle. Basically, copy the value of the CYCLE_API_TOKEN environment variable provided by Cycle and pass it as an X-CYCLE-TOKEN header with every request.

If you're using an officially supported client library, authentication is handled for you automatically and no additional steps are necessary.

Authentication Example
$ curl --unix-socket /var/run/cycle/api/api.sock http://internal.cycle/v1/container \
-H "x-cycle-token: $CYCLE_API_TOKEN"