The documentation you're currently reading is for version 2.4.1. Click here to view documentation for the latest stable version.

REST API access

To see the REST endpoints used by the BWC CLI, add the --debug flag to your CLI command. This will display the equivalent curl commands.

For example, to see the endpoint for listing actions, invoke

st2 --debug action list

You’ll see the list of endpoints we hit as well as a curl command for you to try them manually.

If you are trying to access the API from outside the server, note that the URL will look like: https://${EXTERNAL_IP}/api/v1/${REST_ENDPOINT}.

For example:

curl -X GET -H  'Connection: keep-alive' -H  'User-Agent: python-requests/2.9.1' -H  'Accept-Encoding: gzip, deflate' -H  'Accept: */*' -H  'X-Auth-Token: <YOUR_TOKEN>'

Similarly, you can connect to the auth REST endpoints using: https://${EXTERNAL_IP}/auth/v1/${AUTH_ENDPOINT}.

From the server itself, you can use localhost instead of ${EXTERNAL_IP}.

You can see a full API reference at

Unable to access REST APIs

If you are unable to access the API, please go through the following steps:

  1. Verify nginx is installed on the BWC box. Based on the OS, commands will be sudo apt-cache policy nginx or sudo yum list installed nginx.
  2. Verify nginx process is up and running. Based on the OS, it might just be sudo service nginx status or sudo systemctl nginx status.
  3. Verify if you have BWC-specific nginx configuration. This is usually in /etc/nginx/conf.d/.
  4. Verify that no firewall is blocking is ports on the box. It’s usually ufw for ubuntu or firewall-cmd in RHEL/CentOS.
  5. Verify nginx is listening on port 443. You can use netstat -tupln | grep 443.

If none of these steps work, please have the curl command and info you collected for the above steps before engaging support.