All URIs are relative to https://app.harness.io
Method | HTTP request | Description |
---|---|---|
get_setting_value | GET /ng/api/settings/{identifier} | Get a setting value by identifier |
get_settings_list | GET /ng/api/settings | Get list of settings under the specified category |
update_setting_value | PUT /ng/api/settings | Update settings |
ResponseDTOSettingValueResponseDTO get_setting_value(identifier, account_identifier, org_identifier=org_identifier, project_identifier=project_identifier)
Get a setting value by identifier
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.SettingApi(harness_python_sdk.ApiClient(configuration))
identifier = 'identifier_example' # str | This is the Identifier of the Entity
account_identifier = 'account_identifier_example' # str | Account Identifier for the Entity.
org_identifier = 'org_identifier_example' # str | Organization Identifier for the Entity. (optional)
project_identifier = 'project_identifier_example' # str | Project Identifier for the Entity. (optional)
try:
# Get a setting value by identifier
api_response = api_instance.get_setting_value(identifier, account_identifier, org_identifier=org_identifier, project_identifier=project_identifier)
pprint(api_response)
except ApiException as e:
print("Exception when calling SettingApi->get_setting_value: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
identifier | str | This is the Identifier of the Entity | |
account_identifier | str | Account Identifier for the Entity. | |
org_identifier | str | Organization Identifier for the Entity. | [optional] |
project_identifier | str | Project Identifier for the Entity. | [optional] |
ResponseDTOSettingValueResponseDTO
- Content-Type: Not defined
- Accept: application/json, application/yaml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseDTOListSettingResponseDTO get_settings_list(account_identifier, category, org_identifier=org_identifier, project_identifier=project_identifier, group=group, include_parent_scopes=include_parent_scopes)
Get list of settings under the specified category
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.SettingApi(harness_python_sdk.ApiClient(configuration))
account_identifier = 'account_identifier_example' # str | Account Identifier for the Entity.
category = 'category_example' # str | Category of the Setting.
org_identifier = 'org_identifier_example' # str | Organization Identifier for the Entity. (optional)
project_identifier = 'project_identifier_example' # str | Project Identifier for the Entity. (optional)
group = 'group_example' # str | Group Id of the setting (optional)
include_parent_scopes = true # bool | Flag to include the settings which only exist at the parent scopes (optional)
try:
# Get list of settings under the specified category
api_response = api_instance.get_settings_list(account_identifier, category, org_identifier=org_identifier, project_identifier=project_identifier, group=group, include_parent_scopes=include_parent_scopes)
pprint(api_response)
except ApiException as e:
print("Exception when calling SettingApi->get_settings_list: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
account_identifier | str | Account Identifier for the Entity. | |
category | str | Category of the Setting. | |
org_identifier | str | Organization Identifier for the Entity. | [optional] |
project_identifier | str | Project Identifier for the Entity. | [optional] |
group | str | Group Id of the setting | [optional] |
include_parent_scopes | bool | Flag to include the settings which only exist at the parent scopes | [optional] |
ResponseDTOListSettingResponseDTO
- Content-Type: Not defined
- Accept: application/json, application/yaml
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseDTOListSettingUpdateResponseDTO update_setting_value(account_identifier, body=body, org_identifier=org_identifier, project_identifier=project_identifier)
Update settings
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.SettingApi(harness_python_sdk.ApiClient(configuration))
account_identifier = 'account_identifier_example' # str | Account Identifier for the Entity.
body = [harness_python_sdk.SettingRequestDTO()] # list[SettingRequestDTO] | List of update requests for settings (optional)
org_identifier = 'org_identifier_example' # str | Organization Identifier for the Entity. (optional)
project_identifier = 'project_identifier_example' # str | Project Identifier for the Entity. (optional)
try:
# Update settings
api_response = api_instance.update_setting_value(account_identifier, body=body, org_identifier=org_identifier, project_identifier=project_identifier)
pprint(api_response)
except ApiException as e:
print("Exception when calling SettingApi->update_setting_value: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
account_identifier | str | Account Identifier for the Entity. | |
body | list[SettingRequestDTO] | List of update requests for settings | [optional] |
org_identifier | str | Organization Identifier for the Entity. | [optional] |
project_identifier | str | Project Identifier for the Entity. | [optional] |
ResponseDTOListSettingUpdateResponseDTO
- Content-Type: application/json, application/yaml
- Accept: application/json, application/yaml
[Back to top] [Back to API list] [Back to Model list] [Back to README]