In Cloud Stress Api Guide every api call need a authorization api key where can I get one.
<code>swagger_client.configuration.api_key['Authorization']='YOUR_API_KEY'
In Cloud Stress Api Guide every api call need a authorization api key where can I get one.
<code>swagger_client.configuration.api_key['Authorization']='YOUR_API_KEY'
The key is an OAuth2 token. You can obtain the token via the Temeva IAM service at https://my_domain.temeva.com/api/iam/oauth2/token using any standard OAuth2 library with the password grant workflow. The workflow requires a scope parameter which is the organization ID. The default organization ID can be retrieved via the "id" property of the response to a GET of https://my_domain.temeva.com/api/iam/organizations/default.
Example curl syntax for obtaining token:
curl -k -X POST \ -H "Accept:application/json" \ --data-urlencode "grant_type=password" \ --data-urlencode "username=my_email_addr" \ --data-urlencode "password=my_password" \ --data-urlencode "scope=my_org_id" \ https://mydomain.temeva.com/api/iam/oauth2/token Response: HTTP/1.1 200 OK { "access_token":"access_token_value", "token_type":"bearer", "expires_in":86400, "refresh_token":"refresh_token_value", "scope":"my_org_id" }
The Authorization header value format is "Bearer: access_token_value" where access_token_value is the access_token property from the response to the POST to the oauth2 endpoint.
54 People are following this question.