GetPublicApiClientUsingApiKey

Description

Method 2, To get the client object of QDC Api using api key.

Arguments

  • app_name_header: Name of the Client.
  • on_behalf_of_header: Name of the user who is initiating the request.
  • client_type_header: Client code type connecting to QDC Api.
  • api_key_header: Get the api key from the QDC UI -> Users -> settings -> API Keys

Returns

  • object: Authenticated client object.
  • None: In case of an failure.

Usages

  • qdc_api is the name of the module
  • Please get the api key from the QDC UI -> Users -> settings -> API Keys
app_name = "ai hub"
client_type = "Python"
on_behalf_of_header = "user"
api_key = ""
public_api_client = qdc_api.get_public_api_client_using_api_key(app_name, on_behalf_of_header, client_type, api_key)