Skip to content

Latest commit

 

History

History
67 lines (47 loc) · 2.39 KB

ExamplesApi.md

File metadata and controls

67 lines (47 loc) · 2.39 KB

harness_python_sdk.ExamplesApi

All URIs are relative to https://app.harness.io

Method HTTP request Description
examples_list GET /pm/api/v1/examples

examples_list

list[PolicyExample] examples_list(account_identifier=account_identifier, org_identifier=org_identifier, project_identifier=project_identifier, x_api_key=x_api_key)

list examples

Example

from __future__ import print_function
import time
import harness_python_sdk
from harness_python_sdk.rest import ApiException
from pprint import pprint

# Configure API key authorization: x-api-key
configuration = harness_python_sdk.Configuration()
configuration.api_key['x-api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x-api-key'] = 'Bearer'

# create an instance of the API class
api_instance = harness_python_sdk.ExamplesApi(harness_python_sdk.ApiClient(configuration))
account_identifier = '' # str | Harness account ID (optional)
org_identifier = '' # str | Harness organization ID (optional)
project_identifier = '' # str | Harness project ID (optional)
x_api_key = 'x_api_key_example' # str | Harness PAT key used to perform authorization (optional)

try:
    api_response = api_instance.examples_list(account_identifier=account_identifier, org_identifier=org_identifier, project_identifier=project_identifier, x_api_key=x_api_key)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExamplesApi->examples_list: %s\n" % e)

Parameters

Name Type Description Notes
account_identifier str Harness account ID [optional]
org_identifier str Harness organization ID [optional]
project_identifier str Harness project ID [optional]
x_api_key str Harness PAT key used to perform authorization [optional]

Return type

list[PolicyExample]

Authorization

x-api-key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, application/vnd.goa.error

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