This command creates a Configuration Auditing System (CAS) template item. A template, or template item is a specific file or file pattern, environment or registry variable, the output of an OS or SQL script, or a list of logged-in users.

This API is available in Guardium V9.5 and later.

REST API syntax

This API is available as a REST service with the POST method. Call this API as follows:
POST https://[Guardium hostname or IP address]:8443/restAPI/cas_template

GuardAPI syntax

create_cas_template parameter=value


Parameter Value type Description
auditType String Required. The type of item to monitor. Valid values:
  • ENV_VAR: Environment variable
  • FILE
  • FILE_PAT: File pattern
  • OS_SCRIPT: OS script
  • REG_VAR: Registry variable
  • REG_PAT: Registry variable pattern
  • SQL query
enabled Boolean Valid values:
  • 0 (false)
  • 1 (true): The template is enabled after you create it.
isEditable Boolean This template can be modified. Valid values:
  • 0 (false)
  • 1 (true): This template can be modified.
period Integer The number of minutes between tests.
saveData Boolean Valid values:
  • 0 (false)
  • 1 (true): Previous versions of the item can be compared with the current version.
template String Required. The name of this template.
templateSetLabel String Required. The name of the template set to associate with this template.
useMD5 Boolean Valid values:
  • 0 (false)
  • 1 (true): Guardium uses the MD5 algorithm to calculate a checksum and compare the latest value with the value calculated the last time that the item was checked.

Default = 0

REST API example

To add a CAS template to a CAS template set:

curl -k --header "Authorization:Bearer 8ad14246-8815-4043-ab19-074d6bfcaad3" -i -X 
POST -d '{"auditType":"File","template":"$DB2_HOME/sqllib/db2nodes.cfg","templateSetLabel":"cas_temp_set_001","saveData":"true"}'