APIO Configuration Parameters¶
The behaviour of some APIs is partially controlled configuration parameters allowing configuring a different behaviour for each APIO instance. These parameters are global for an APIO instance and can not be tailored for each user/group/tenant/… .
When it is needed to know this concept in order to understand how an API is working and what to expect as final result, then a section in the documentation of that end point will (as it is a new documentation section it is not yet available for all APIs) provide the main settings parameters used by this API.
Templates¶
The APIO offers a templating mechanism that allows to extended the basic scope of an API.
- This templating mechanism is composed of two concepts:
default_values that will be used to enrich the original input data if the same parameter si not present yet. It must be noted that it has been designed for optional parameters only therefore this is apply after the validation of the JSON structure.
actions that are commands played before or after the main command of the end point. The list of possible actions is extended regularly.
The templates are organised by template categories, each category being virtually linked to an end point. It allows, for example, to use the same template name (such as Basic) for different end points (such as Tenant and Group).
The APIs supporting template have (or will have for some of them as it is a new documentation section) a section that gives some information about the templating for that end point, at least the template category.
Default values¶
The default_values that will be used to enrich the original input data if the same parameter is not present yet. It must be noted that it has been designed for optional parameters only therefore this is apply after the validation of the JSON structure.
The default_values can be enriched with dynamic values taken from the url parameters (only if present), such as:
{{tenant_id}}: Tenant ID
{{group_id}}: Group ID
{{user_id}}: EndUser ID as it is
{{user_id_no_domain}}: EndUser ID without domain
{{user_id_with_domain}}: EndUser ID with domain
{{instance_name}}: instance name (e.g.: schedule name)
{{sub_instance_name}}: sub-instance name (e.g.: period name of a schedule)
Note that all the occurrences of a dynamic default value will be replaced with the corresponding value.
This mechanism is enabled by a configuration settingss:
"TEMPLATE_ENRICH_DEFAULT_VALUES": false
TEMPLATE_ENRICH_DEFAULT_VALUES: Enriches default values of a provisioning template with dynamic values. Default is False because this mechanism has a cost and therefore it has to be explicitly enabled.