Skip to content

Latest commit

 

History

History
63 lines (44 loc) · 2.51 KB

LoginApi.md

File metadata and controls

63 lines (44 loc) · 2.51 KB

swagger_client.LoginApi

All URIs are relative to https://apitryout.qtestnet.com/

Method HTTP request Description
post_access_token POST /oauth/token Log in

post_access_token

OAuthResponse post_access_token(grant_type=grant_type, username=username, password=password, authorization=authorization)

Log in

To authenticate the API client against qTest Manager and acquire authorized access token

Example

from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.LoginApi()
grant_type = 'password' # str | always use <em>grant_type=password</em> (optional) (default to password)
username = 'username_example' # str | Your qTest Manager username (optional)
password = 'password_example' # str | Your qTest Manager password (optional)
authorization = 'authorization_example' # str | Basic + [base64 string of \"your qTest Manager site name:\"]  Example: qTest Manager site is: apitryout.qtestnet.com then site name is: apitryout, then Authorization is: Basic YXBpdHJ5b3V0Og== (optional)

try: 
    # Log in
    api_response = api_instance.post_access_token(grant_type=grant_type, username=username, password=password, authorization=authorization)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LoginApi->post_access_token: %s\n" % e)

Parameters

Name Type Description Notes
grant_type str always use <em>grant_type=password</em> [optional] [default to password]
username str Your qTest Manager username [optional]
password str Your qTest Manager password [optional]
authorization str Basic + [base64 string of &quot;your qTest Manager site name:&quot;] Example: qTest Manager site is: apitryout.qtestnet.com then site name is: apitryout, then Authorization is: Basic YXBpdHJ5b3V0Og== [optional]

Return type

OAuthResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]