system_variable[] method

Returns the value of an HCL system variable.

Syntax

hcl.system_variable["variable_name"]

Parameters

Name Description
variable_name

The name of the HCL system variable.

Currently, three HCL system variables are available for use in Python/HCL scripts:

Variable name Description
environment The variable is automatically assigned to the mode (environment) in which the script runs. The variable value can be either development or production.
organization_id The variable is automatically assigned to the ID of the Diligent One organization in which the script runs.
hb_api_host The variable is automatically assigned to the HighBond API base URL for the Diligent One organization in which the script runs.

Returns

String.

Examples

Return the value of an HCL system variable

Returns development, which is the value of the environment HCL system variable.

hcl.system_variable["environment"]

Returns 11594, which is the value of the organization_id HCL system variable.

hcl.system_variable["organization_id"]

Returns https://apis-us.highbond.com, which is the value of the hb_api_host HCL system variable.

hcl.system_variable["hb_api_host"]

Remarks

For more information, see Using variables in a Python/HCL script.