This guide shall introduce you to using the Limes API directly via curl
.
If you are not familiar with the standard openstack
client, please refer to the OpenStack documentation for how to
install and use it. Assuming that you have provided your credentials to the openstack client
, get a token
with
export OS_AUTH_TOKEN="$(openstack token issue -f value -c id)"
This command will not print any output if it is successful.
Query the service catalog to find the Limes endpoint. It can be identified by looking for the resources
service type:
$ openstack catalog list
+---------------+---------------+--------------------------------------------------------------------------+
| Name | Type | Endpoints |
+---------------+---------------+--------------------------------------------------------------------------+
| keystone | identity | staging |
| | | public: https://identity.example.com:443/v3 |
| | | staging |
| | | internal: http://keystone.openstack.svc.kubernetes.example.com:5000/v3 |
| | | staging |
| | | admin: https://identity-admin.example.com:443/v3 |
| | | |
| ... | ... | ... |
| | | |
| limes | resources | staging |
| | | public: https://limes.example.com |
| | | |
| ... | ... | ... |
| | | |
+---------------+---------------+--------------------------------------------------------------------------+
In this case, the endpoint URL for Limes is https://limes.example.com
, so you can build a request URL by appending one
of the paths from the API specification. For example, to show quota and usage data for a project, use the
following command:
curl -H "X-Auth-Token: $OS_AUTH_TOKEN" https://limes.example.com/v1/domains/$DOMAIN_ID/projects/$PROJECT_ID
$OS_AUTH_TOKEN
is the token from the first step. $DOMAIN_ID
and $PROJECT_ID
need to be set by you to the project
ID in question and its domain ID. If you only have a project name, you can get these IDs by calling openstack project show $NAME
.