Configure API-Access
Goal
- Authenticating to use the firstcolo Cloud API
Prerequisites
- You need to have the login data for the firstcolo Cloud API (user name and passphrase).
- The OpenStack CLI-Tools are installed in an up-to-date version.
- Knowledge how to utilise a terminal/SSH and SSH-keys.
Accessing the firstcolo Cloud API
To work with the firstcolo Cloud API you need to set environment variables used by the command line tools to authenticate and authorize your API calls. Users logged into the Dashboard can download a file that helps setting these variables under API Access. There you can click on Download OpenStack RC File --> Openstack RC File (Identity API v3) to download the corresponding file.
Setting up the environment variables
To provide the clients with the parameters for authentication and authorization use (Username/Password/Project-Scope) for the corresponding session we have to source the downloaded file and type our OpenStack password:
source Downloads/demo-openrc.sh
Sourcing this file to set up environment variables does not return output.
Test API Access
We can now use the OpenStack command line client to check whether our access works:
firstcolo:~ firstcolo$ openstack network list
+--------------------------------------+---------+--------------------------------------+
| ID | Name | Subnets |
+--------------------------------------+---------+--------------------------------------+
| caf8de33-1059-4473-a2c1-2a62d12294fa | Extern | 51a64106-3eb2-4172-9343-404a9f6b9993 |
+--------------------------------------+---------+--------------------------------------+
In this example you see a network pool which provides us with Floating IP addresses. This shows that you successfully used the firstcolo Cloud API.