list_cas_templates
This command returns a list of the templates within a specified Configuration Auditing System (CAS) template set.
This API is available in Guardium V9.5 and later.
REST API syntax
This API is available as a REST service with the
GET
method. Call this API as follows:
GET https://[Guardium hostname or IP address]:8443/restAPI/cas_template
GuardAPI syntax
list_cas_templates parameter=value
Parameters
Parameter | Value type | Description |
---|---|---|
templateSetLabel | String | Required. The name of the template set. |
api_target_host | String |
Specifies the target hosts where the API executes. Valid values:
IP addresses must conform to the IP mode of your network. For dual IP mode, use the same IP protocol with which the managed unit is registered with the central manager. For example, if the registration uses IPv6, specify an IPv6 address. The hostname is independent of IP mode and can be used with any mode. |
GuardAPI example
To request a list of all templates in the template set named tempSet:
grdapi list_cas_templates templateSetLabel=tempSet
Example output:
ID=20001 Id, auditType, template, enabled, period, useMD5, saveData, isEditable 20000, FILE, templateTest, true, 3600, false, false, true ok
REST API example
To list CAS templates by template set name:
curl -k -i --header "Authorization: Bearer 8ad14246-8815-4043-ab19-074d6bfcaad3"
https://localhost:8443/restAPI/cas_template?templateSetLabel=cas_temp_set_001
Example
output:
[ { "audit_config_template_id": 20002, "audit_type": "FILE", "template": "$DB2_HOME/sqllib/db2nodes.cfg", "enabled": "true", "period": 3600, "use_md5": "false", "save_data": "true", "is_editable": "true" }, { "audit_config_template_id": 20001, "audit_type": "FILE", "template": "test.txt", "enabled": "true", "period": 3600, "use_md5": "false", "save_data": "true", "is_editable": "true" } ]