Mapping APIs to report results

Guardium® comes with a battery of predefined reports and many of them are already mapped to GuardAPI functions to ease configuration. You can define additional reports, including custom reports, and map them to GuardAPI functions for each report.

  1. Open any predefined report from the Reports section.
  2. From the Actions dropdown, select Add API mapping.
  3. From Add API mapping, the following information displays:
    • Any API functions that are already mapped to this report. From Existing mapped API function, click Invoke to open a window from which you can enter the parameters for the selected function. You can either invoke the function immediately or generate and download a script to use as needed.
    • A search and filter mechanism to find the appropriate API command.
    • All of theAPI functions that are available to add to this report.
  4. To add an API function, choose the function from the list, and then click Map Report Attributes to display the API-Report Parameter Mapping.
  5. From API-Report Parameter Mapping, map the parameter name to the Report field.
    Note: Sometimes you might want to include data that is not available in a Guardium report. In this case, you can create a constant to add to the report and use within the API parameter mappings. However, if you export a Guardium report that includes a constant, the constant is not exported.

To simplify the mapping between the GuardAPI parameters and Guardium attributes, the predefined report Query Entities & Attributes lists all of the Guardium attributes. This report provides a GUI interface and allows you to easily drill down from that report and create the linkages.

Existing Guardium attributes or user-defined constants can be mapped to the GuardAPI parameters of Existing Attributes or Constants.

Note: If a report has more than one GuardAPI attribute that is mapped to the same parameter, the API call picks the value in the first attribute (determined by the display order in the report).
Mapping Existing Attributes
  1. Go to the Query Entities & Attributes report to add the API parameter mappings. (Guardium Monitor > Query Entities & Attributes)
  2. The Query Entities & Attributes report lists all of the Guardium attributes. Narrow down the records you are interested in by using Customize.
  3. To create the mapping, double-click the attribute row to which to assign a parameter name.
  4. Click Invoke.
  5. Select the create_api_parameter_mapping API function.
  6. Enter the functionName and parameterName in the API Call Form.
  7. Click Invoke now to create the API to Report Parameter Mapping.

For more information, see How to use API calls from custom reports, which includes an example that maps GuardAPI parameters through the GUI.

Mapping Constants
Sometimes you might want to include data that is not supplied within a Guardium report. For these instances, create a constant add it to the report, and then use it within the API parameter mappings.
  1. Go to the Query Entities & Attributes report to add the API parameter mappings. (Guardium Monitor > Query Entities & Attributes).
  2. The Query Entities & Attributes report is long because it lists all of the Guardium attributes. Narrow down the records you are interested in by using Customize.
  3. To create a constant attribute, double-click any row for the entity for which you want to create a constant attribute.
  4. Click Invoke.
  5. Select the create_constant_attribute API.
  6. Enter the constant value to use and specify the name (attributeLabel)
  7. Click Invoke now to create the constant.
  8. To create the mapping, double-click the newly created attribute row.
  9. Click Invoke.
  10. Select the create_api_parameter_mapping API function.
  11. Enter the functionName and parameterName in the API Call Form.
  12. Click Invoke now to create the API to Report Parameter Mapping.
  13. You must add the newly created attribute to the report. Modify the Query through the Query-Report Builder and add the field.

For more information, see How to use Constants within API Calls, which includes an example to create and map a constant attribute through the GUI.

Note: If the Guardium report, with a constant added, is exported, the constant is not exported.
Note: When you use API mapping, table columns in a report appear in the report field whenever the table column is an attribute of an entity. Some of the columns, such as count column, are never displayed in the report field because it cannot be mapped.