How to use Constants within API Calls

Create a new entity attribute to be used during an API function call.

Value-added: Through a GUI, create a user-defined constant that can be used for filling in a parameter in an API function call .

  1. From our report, we can modify it to have a field that we could use for parameter mappings.

    Detailed Session List 05
  2. Go to the Query Entities & Attributes report for the Client/Server entity within the ACCESS RULES VIOLATIONS domain. Double-click on a row and select the Invoke... option.

    Query entities and attributes 04
  3. Invoke the API function create_constant_attribute.

    Query entities and attributes 05
  4. Fill in the constant value to use ('SCOTT'), fill in the attributeLabel you like to name it ('OracleTopParent'), and then click on the Invoke now button to create the constant.

    API call form - create constant attribute 01
  5. Clicking on the Invoke now button will produce a API Call Output status showing the constant was created.

    API call output- create constant attribute 01
  6. A re-display of the Query Entities & Attributes report will show the new attribute created.

    Query entities and attributes 06
  7. The newly create constant can now be mapped for the report. Double-click on the new row and select the Invoke... option.

    Query entities and attributes 07
  8. Select the create_api_parameter_mapping option.  

    Query entities and attributes 03

  9. Fill in the functionName and the parameterName and click on the Invoke now button.

  10. The newly created attribute must be added to the report. Edit the query through Query Builder and add the field.

    Query builder 01
    Query builder 02
  11. Now when the report is displayed the new attribute is displayed.

    Detailed session list 06
  12. To validate the new constant's usage, double-click on a row and select the Invoke... option.

    Detailed session list 07
  13. Select the API function

    Detailed session list 08
  14. Now the parentUserName is populated from the newly added constant. Click the Invoke now button.

    API call form - create user hierarchy 04
  15. Validate the new Data Security User Hierarchy.

    Data Security User hierarchy 06