Open topic with navigation

# 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.

    // 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");

© 2018 Micro Focus or one of its affiliates | Send documentation feedback to Micro Focus Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm