ACI API 25.3
ACI API Programming Guide

# Create a Connection

You must create a connection object (type `ACI_CONNECTION`) to establish a connection with the server. You must set the server host details in this object before making a request. You can specify other connection settings, such as the number of times a connection to the server is attempted and fails before the request is abandoned. For an example of how to create connections, see Create a Connection Using the C-language Knowledge Discovery SDK.

## Create a Connection Using the C-language Knowledge Discovery SDK

The following example shows how to create a connection object.

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

    // Create the connection object
    t_aciObject* pConnection = NULL;
    aciObjectCreate(&pConnection, ACI_CONNECTION);

    // Set host details
    aciObjectParamSetString(pConnection, ACI_HOSTNAME, "12.3.4.56");
    aciObjectParamSetInt(pConnection, ACI_PORTNUMBER, 4001);
    aciObjectParamSetInt(pConnection, ACI_CONN_RETRIES, 1);

Copyright 2025 Open Text
Version 25.3 | Last updated July 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.3

Topic Title: Create a Connection