No tenant name in response - cURL

asked 2017-02-21 07:13:14 -0500

Oron gravatar image

Hi all

I'm trying to get a token using username and password so I can continue using REST API to fetch data
I did cURL to the controller WITHOUT the tenant name (left it empty), and according to docs I should get it in the response

Request (have escaping - ignore them)

"export OS_USERNAME='$$username$$'; export OS_PASSWORD='$$password$$'; export OS_AUTH_URL='CONTROLLER_URL:35357/v2.0/'; curl -s -X POST $OS_AUTH_URL/tokens -H \"Content-Type: application/json\" -d '{\"auth\": {\"tenantName\":\"\", \"passwordCredentials\": {\"username\": \"'\"$OS_USERNAME\"'\", \"password\": \"'\"$OS_PASSWORD\"'\"}}}'"


{"access": {"token": {"issued_at": "2017-02-21T12:49:29.152262", "expires": "2017-02-21T15:49:29Z", "id": "TOKEN_ID", "audit_ids": ["AUDIT_ID"]}, "serviceCatalog": [], "user": {"username": "USERNAME", "roles_links": [], "id": "USER_ID", "roles": [], "name": "USERNAME"}, "metadata": {"is_admin": 0, "roles": []}}}

As you can see - There is no tenant id, and as far as I understand it should be used in order to get data Is there other use the REST API?

Thanks : )

edit retag flag offensive close merge delete