ACI API 25.4
ACI API Programming Guide

# Perform an Action

A command object (type `ACI_COMMAND`) stores information about the action that you want to run, as well as all the parameters that this action requires, such as:

- the type of HTTP request (GET/POST) that is made when the action runs.

- security details for a data repository.

There is no limit to the number of parameters that can be stored, but there can only be one action.

## Create an Action

The following example shows how to create a command object.

    // Always need to call aciInit at start of any program using ACI client lib
    aciInit();

    // Create the command object
    t_aciObject* pCommand = NULL;
    aciObjectCreate(&pCommand, ACI_COMMAND);

    // Set command to execute
    aciObjectParamSetString(pCommand, ACI_COM_COMMAND, "QUERY");

    // Set http method
    aciObjectParamSetBool(pCommand, ACI_COM_USE_POST,TRUE);

    // Set action parameters
    aciObjectParamSetString(
      pCommand, "Text", "Reducing heart attack risk");
    aciObjectParamSetString(pCommand, "LanguageType", "English");
    aciObjectParamSetBool(pCommand, "TotalResults", TRUE);

    // Create security string
    aciObjectSetUserSecurityInfo(pCommand, "notes", ACI_SECURITY_USERNAME, "jbloggs");
    aciObjectSetUserSecurityInfo(
      pCommand, "notes", ACI_SECURITY_GROUP, "techusers");

Copyright 2025 Open Text
Version 25.4 | Last updated October 2025

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery ACI API 25.4

Topic Title: Perform an Action