Description
ApplySolution instructs Adaptive Learning to apply a description specified by pszDescription to the solution identified by nSolutionID.
Note: ApplySolution is used to increase the accuracy of ADL matches, not to close a problem.
Syntax
int ApplySolution(long nAPIHandle, long nSolutionID, const char* pszDescription, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
nSolutionID - The ID of the ADL solution to which the update is applied.
pszDescription - The description added to the ADL solution.
pnError - If an error occurred, this variable contains the SQL error number.
pUserDefinedData - Lists optional parameters passed to the C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
AttachProblemHistory attaches a record to an existing problem.
Syntax
int AttachProblemHistory(long nAPIHandle, const char* pszProblemID, const HISTORY_ATTACHMENT* pNewHistoryRecord, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL)
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pszProblemID - The ID of the problem to with which problem history information is attached.
pNewHistoryRecord - The HISTORY_ATTACHMENT record that describes the problem history to attach.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters passed to the C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
AttachWorkHistory attaches a record to an existing problem.
Syntax
int AttachWorkHistory(long nAPIHandle, const char* pszProblemID, const HISTORY_ATTACHMENT* pNewHistoryRecord, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pszProblemID - The ID of the problem to with which call history information is attached.
pNewHistoryRecord - The HISTORY_ATTACHMENT record describing the work history to attach.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters passed to the C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
CloseRequest closes a specified request.
Syntax
int CloseRequest(long nAPIHandle, char* pszRequestID, PROBLEM_CLOSURE* pProblem, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pszRequestID - The ID of the request to close.
pProblem - The PROBLEM_CLOSURE record describing information required for a request closure.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
Connect initializes the C API and attempts to log on using the ID and password provided. If the log on is successful, pAPIHandle is initialized.
Note: No C API functions can be called without a valid pAPIHandle.
Syntax
int Connect(long* pAPIHandle, const char* pszHostName, unsigned int nHostPort, const char* pszUserID, const char* pszPassword, long* pnError, int nUserType = 1 )
Arguments
pAPIHandle - Pointer to a variable that, on return, contains the handle to pass to C API functions.
pszHostName - The name or IP Address of the machine that hosts the application server with which the C API communicates.
nHostPort - The port number that the ES DISPATCHER SERVICE listens to on the application server.
pszUserID - The name of the user connecting to the application server.
pszPassword - The password that matches the user specified by pszUserID.
pnError - If an error occurred during processing, this variable contains the SQL error number.
nUserType - Optional parameter that specifies the type of user logged in. By default, the user type is 1, which indicates an Expert Advisor user. Type 2 specifies an Expert Web user.
Returns
int - Status of the request, either SAI_OK, SAI_SQL_ERROR, or SAI_ERROR indicating an error occurred. If an SQL error occurred, use pnError and refer to your database manual.
Description
CreateRequest creates a new request and leaves it in an open state on the application server. If the call is successful, the ID of the new request is returned in szRequestID.
Note: szRequestID should be set to NULL before calling CreateRequest.
Syntax
int CreateRequest(long nAPIHandle, PROBLEM_CLOSURE* pProblem, char** ppszRequestID, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pProblem - The PROBLEM_CLOSURE record describing the request to create.
ppszRequestID - The ID of the created request.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
CustomMessage provides a mechanism for user-defined C API calls that enables a user to submit a list of name-value pairs to the application server. CustomMessage submits the data using the message number specified in nActionMessageID. It ensures that the application server responds with the message specified in nResponseMessageID. If the call is successful, ppResponseData contains the response from the application server. To make use of CustomMessage, you must modify the application server source code and add message numbers and the capability to process the specified Action and Response messages.
Syntax
int CustomMessage(long nAPIHandle, int nActionMessageID, int nResponseMessageID, const EXTENDED_DATA* pMessageData, EXTENDED_DATA** ppResponseData, long* pnError )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
nActionMessageID - The message number used to submit the pMessageData.
nResponseMessageID - The message ID with which the application server responds.
pMessageData - A list of EXTENDED_DATA to pass to the application server as parameters to nActionMessageID.
ppResponseData - The response returned from the application server after processing nActionMessageID.
pnError - This variable contains the SQL error number if an error occurred.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
Disconnect clears memory allocated by the C API and terminates the connection with the application server.
Note: After calling Disconnect, nAPIHandle is no longer valid and no C API functions can be called until Connect is called again.
Syntax
int Disconnect( long nAPIHandle )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
Returns
int - Status of the request, either SAI_OK, SAI_SQL_ERROR, or SAI_ERROR indicating an error occurred. If an SQL error occurred, use pnError and refer to your database manual.
Description
ExecuteSQL will execute any SQL statement (except select statements). Make sure to object names with the qualifier where applicable.
Syntax
int ExecuteSQL( long nAPIHandle, const char* pszSQLStatement, long* pnError )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pszSQLStatement - The SQL statement to execute on the server.
pnError - This variable contains the SQL error number if an error occurred.
Returns
Int - Request status, either SAI_OK to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If an SQL error occurred, use pnError and refer to your database manual.
Description
FreeCallList clears the memory used by a CALL_SESSION list. Because memory must be freed by the application âœowningâ it, this function releases the memory allocated by the DLL.
Syntax
void FreeCallList( long nAPIHandle, CALL_SESSION** ppCallList )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
ppCallList - Points to the head of the list of calls to discard.
Description
FreeContactList clears the memory used by a CONTACT_RECORD list. Because memory must be freed by the application âœowningâ it, this function releases the memory allocated by the DLL.
Syntax
void FreeContactList(long nAPIHandle, CONTACT_RECORD** ppContactList )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
ppContactList - Points to the head of the list of contacts to discard.
Description
FreeExtendedDataList clears the memory used by an EXTENDED_DATA list. Because memory must be freed by the application âœowningâ it, this function is provided to release the memory allocated by the DLL.
Note: This function should not be used to free lists allocated by the C API user. Any list created by a user to pass an extended data parameter to a C API call must be cleared another way.
Syntax
void FreeExtendedDataList(long nAPIHandle, EXTENDED_DATA** ppExtendedDataList )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
ppExtendedDataList - Points to the head of the list of extended data items to discard.
Description
FreeHierarchyList clears the memory used by a HIERARCHY_RECORD list. Because memory must be freed by the application owning it, this function releases the memory allocated by the DLL.
Note: In addition to lists, memory used by a single HIERARCHY_RECORD obtained by a call to GetLocationTree or GetOrganizationTree can also be freed.
Syntax
void FreeHierarchyList( long nAPIHandle, HIERARCHY_RECORD** ppHierarchyList )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
ppHierarchyList - Points to the head of the list of HIERARCHY_RECORD to discard.
Description
FreeHistoryList clears the memory used by a HISTORY_RECORD list. Because memory must be freed by the application âœowningâ it, this function releases the memory allocated by the DLL.
Syntax
void FreeHistoryList(long nAPIHandle, HISTORY_RECORD** ppHistoryList )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
ppHistoryList - Points to the head of the list of history records to discard.
Description
FreeHypernodeList clears the memory used by a HYPERTREE_NODE list. Because memory must be freed by the application âœowningâ it, this function releases the memory allocated by the DLL.
Note: In addition to lists, the memory used by a single HYPERTREE_NODE obtained from a call to GetHypernode can also be freed.
Syntax
void FreeHypernodeList( long nAPIHandle, HYPERTREE_NODE** ppHypernodeList )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
ppHypernodeList - Points to the head of the list of hypernodes to discard.
Description
FreeLocationList clears the memory used by a LOCATION_RECORD list. Because memory must be freed by the application owning it, this function releases the memory allocated by the DLL.
Note: In addition to lists, memory used by a single LOCATION_RECORD obtained from a call to GetLocation can also be freed.
Syntax
void FreeLocationList(long nAPIHandle, LOCATION_RECORD** ppLocationList )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
ppLocationList -Points to the head of the list of locations to discard.
Description
FreeProblemViewList clears the memory used by a PROBVIEW_RECORD list. Because memory must be freed by the application âœowningâ it, this function releases the memory allocated by the DLL.
Note: In addition to lists, memory used by a single PROBVIEW_RECORD obtained from a call to GetProblemView can also be free.
Syntax
void FreeProblemViewList (long nAPIHandle, PROBVIEW_RECORD** ppProbViewList)
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
ppProbViewList - Points to the head of the list of problem views to discard.
Description
FreeRequestList clears the memory used by a PROBLEM_RECORD list. Because memory must be freed by the application âœowningâ it, this function releases the memory allocated by the DLL.
Note: In addition to lists, memory used by a single PROBLEM_RECORD obtained from a call to GetRequest can also be freed.
Syntax
void FreeRequestList(long nAPIHandle, PROBLEM_RECORD** ppProblemList )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
ppProblemList - Points to the head of the list of problems to discard.
Description
FreeResponseList clears the memory used by a HYPERTREE_RESPONSE list. Because memory must be freed by the application âœowningâ it, this function releases the memory allocated by the DLL.
Syntax
void FreeResponseList(long nAPIHandle, HYPERTREE_RESPONSE** ppResponseList )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
ppResponseList - Points to the head of the list of Hypertree responses to discard.
Description
FreeSolutionList clears the memory used by a SOLUTION_RECORD list. Because memory must be freed by the application âœowningâ it, this function is provided to release the memory allocated by the DLL.
Syntax
void FreeSolutionList(long nAPIHandle, SOLUTION_RECORD** ppSolutionList )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
ppSolutionList - Points to the head of the list of solutions to discard.
Description
Given a problem description, GetAdapativeLearning fetches a list of Adaptive Learning solutions from the database.
Note: The database does not retrieve more than the specified maximum.
Syntax
int GetAdaptiveLearning(long nAPIHandle, const REQUEST_CONTEXT* pRequest, SOLUTION_RECORD** ppSolutionList, long*pnMaxRequested, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pRequest - The structure describing the problem where a list of solutions is required.
ppSolutionList - On return, lists solutions to the specified request.
pnMaxRequested - On initial call, specifies the maximum number of solutions to retrieve. On return, specifies the actual number of solutions in ppSolutionList.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
GetCallCodes fetches a list of all known call codes.
Syntax
int GetCallCodes(long nAPIHandle, STRING_ARRAY* pszCallCodeList, long* nReturnCount, long* pnError )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pszCallCodeList - On return, lists every call code in the system.
nReturnCount - On return, specifies the number of strings in pszCallCodeList.
pnError - This variable contains the SQL error number if an error occurred.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
GetCalls fetches a list of call and session records for a specified problem.
Syntax
int GetCalls(long nAPIHandle, const char* pszProblemID, CALL_SESSION** ppCallList, long* pnMaxRequested, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pszProblemID - The ID of the problem for which detailed information is retrieved.
ppCallList - On return, lists call and session records belonging to the specified problem
pnMaxRequested - On initial call, specifies the maximum number of records to retrieve. On return, specifies the actual number of records in ppCallList.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
Given a problem description, GetCommonProblems fetches a list of Common Problem solutions from the database.
Note: The database does not retrieve more than the specified maximum.
Syntax
int GetCommonProblems(long nAPIHandle, const REQUEST_CONTEXT* pRequest, SOLUTION_RECORD**ppSolutionList, long* pnMaxRequested, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pRequest - The structure that describes a problem where a list of solutions is required.
ppSolutionList - On return, lists solutions to the specified request.
pnMaxRequested - On initial call, specifies the maximum number of solutions to retrieve. On return, specifies the actual number of solutions in ppSolutionList.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
GetContact fetches information about a specific contact.
Note: Contacts must be associated with a location.
Syntax
int GetContact(long nAPIHandle, const char* contact_id, const char* pszContactID, const char* pszLocationID, CONTACT_RECORD** ppContact, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pszContactID - The contact ID to retrieve.
pszLocationID - The ID of the location where the contact is valid.
ppContact - On return, contains information about the contact with an ID of pszContactID at pszLocationID.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
Given a problem description, GetErrorMessages fetches a list of Error Message solutions from the database.
Note: The database does not retrieve more than the specified maximum.
Syntax
int GetErrorMessages(long nAPIHandle, const REQUEST_CONTEXT* pRequest, SOLUTION_RECORD** ppSolutionList, long* pnMaxRequested, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pRequest - The structure that describes the problem where a list of solutions is required.
ppSolutionList - On return, lists solutions to the specified request.
pnMaxRequested - On initial call, specifies the maximum number of solutions to retrieve. On return, specifies the actual number of solutions in ppSolutionList.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
GetGroups fetches a list of groups.
Note: The database does not retrieve more than the specified maximum.
Syntax
int GetGroups(long nAPIHandle, GROUP_RECORD** ppGroupList, long* pnMaxRequested, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
ppGroupList - On return, lists every group up to a maximum specified in pnMaxRequested.
pnMaxRequested - On initial call, specifies the maximum number of groups to retrieve. On return, specifies the actual number of groups in ppGroupList.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
Given a problem description, GetHotNews fetches a list of Hot News solutions from the database.
Note: The database does not retrieve more than the specified maximum.
Syntax
int GetHotNews(long nAPIHandle, const REQUEST_CONTEXT* pRequest, SOLUTION_RECORD** ppSolutionList, long* pnMaxRequested, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pRequest - The structure that describes the problem where a list of solutions is required.
ppSolutionList - On return, lists solutions to the specified request.
pnMaxRequested - On initial call, specifies the maximum number of solutions to retrieve. On return, specifies the actual number of solutions in ppSolutionList.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
GetHypernode fetches information about the hypernode record that corresponds to the specified ID.
Syntax
int GetHypernode(long nAPIHandle, long nHypernodeID, HYPERTREE_NODE** ppHypernode, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
nHypernodeID - The hypernode ID to retrieve.
ppHypernode - Points to the record containing the hypernode information for the specified ID.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
GetHypernodeResponses fetches response records associated with the specified hypernode ID.
Note: The database does not retrieve more than the specified maximum.
Syntax
int GetHypernodeResponses(long nAPIHandle, long nHypernodeID, HYPE RTREE_RESPONSE** ppResponseList, long* pnMaxRequested, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
nHypernodeID - The hypernode ID with which to retrieve responses.
ppResponseList - On return, lists response records belonging to the specified hypernode.
pnMaxRequested - On initial call, specifies the maximum number of solutions to retrieve. On return, specifies the actual number of solutions in ppResponseList.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
Given a problem description, GetHyperTrees fetches a list of HyperTree entry level nodes from the database.
Note: The database does not retrieve more than the specified maximum.
Syntax
int GetHyperTrees(long nAPIHandle, const REQUEST_CONTEXT* pRequest, HYPERTREE_NODE** ppHyperTreeList, long* pnMaxRequested, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pRequest - The structure that describes the problem where a list of Hypernodes is required.
ppHyperTreeList - On return, lists HyperTree nodes satisfying the request.
pnMaxRequested - On initial call, specifies the maximum number of hypernodes to retrieve. On return, specifies the actual number of hypernodes in ppHyperTreeList.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
GetLocation fetches information about a specific location.
Syntax
int GetLocation(long nAPIHandle, const char* pszLocationID, LOCATION_RECORD** ppLocation, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pszLocationID - The location ID.
ppLocation - On return, contains information about the location with an ID of pszLocationID.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
GetLocationTree fetches Location Hierarchy information that matches the filter criteria.
Syntax
int GetLocationTree( long nAPIHandle, const HIERARCHY_FILTER* pLocationFilter, HIERARCHY_RECORD** ppLocationList, long* nReturnCount, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pLocationFilter - The HIERARCHY_FILTER record describing the search criteria for retrieving a list of locations.
ppLocationList - On return, lists the locations matching the filter criteria.nReturnCount - On return, specifies the number of locations in ppLocationList.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and the application server.
Returns
Int - Request status, either SAI_OK to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If an SQL error occurred, use pnError and refer to your database manual.
Description
GetOrganizationTree fetches Organization Hierarchy information that matches the filter criteria.
Syntax
int GetOrganizationTree( long nAPIHandle, const HIERARCHY_FILTER* pOrganizationFilter, HIERARCHY_RECORD** ppOrganizationList, long* nReturnCount, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pOrganizationFilter - The HIERARCHY_FILTER record describing the search criteria for retrieving a list of organizations.
ppOrganizationList - On return, lists the organizations matching the filter criteria.
nReturnCount - On return, specifies the number of organizations in ppOrganizationList.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and the application server.
Returns
Int - Request status, either SAI_OK to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If an SQL error occurred, use pnError and refer to your database manual.
Description
GetProblemHistory fetches the problem history for the specified problem.
Syntax
int GetProblemHistory(long nAPIHandle, const char* pszProblemID, HISTORY_RECORD** ppHistoryList, long* pnMaxRequested, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pszProblemID - The ID of the problem for which problem history information is retrieved.
ppHistoryList - On return, lists the problem history records of the specified problem.
pnMaxRequested - On initial call, specifies the maximum number of records to retrieve. On return, specifies the actual number of records in ppHistoryList.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
GetProblemView fetches a problem view record that is associated with a specific problem.
Syntax
int GetProblemView (long nAPIHandle, const char* pszProblemID, PROBVIEW_RECORD** ppProbView, long* pnError, const EXTENDED_DATA* pUserDefinedData /*=NULL*/)
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pszProblemID - The ID of the problem for which problem view information is retrieved.
ppProbView - Points to a record containing problem view information.
pnError - This variable contains the error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call.
Returns
int - Request status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR or SAI_ERROR to indicate that an error occurred. If an SQL error occurred, use pnError and refer to your database manual.
Description
GetRequest fetches summary information about a specified request.
Syntax
int GetRequest(long nAPIHandle, const char* pszProblemID, PROBLEM_RECORD** ppProblem, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pszProblemID - The ID of the problem for which summary information is retrieved.
ppProblem - Points to a record containing the request summary information.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
GetRequestDetails fetches detailed information about a specified request.
Syntax
int GetRequestDetails(long nAPIHandle, const char*pszProblemID, PROBLEM_RECORD** ppProblem, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pszProblemID - The ID of the problem for which detailed information is retrieved.
ppProblem - Points to a record having request detail information.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
GetRequestTypes fetches a list of all known request types.
Syntax
int GetRequestTypes(long nAPIHandle, STRING_ARRAY* pszRequestTypeList, long* nReturnCount, long* pnError )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pszRequestTypeList - On return, lists every request type in the system.
nReturnCount - On return, specifies the actual number of strings in pszRequestTypeList.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
GetSCIMLevelList retrieves a list of items at the next SCIM level from the one specified. For example, if a System is specified, all Components for the system are returned.
Note: The database does not retrieve more than pnMaxRequested items.
Syntax
int GetSCIMLevelList(long nAPIHandle, const SCIM_KEY* pSCIMKey, STRING_ARRAY* pszSCIMLevelList, long* pnMaxRequested, long* pnError )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pSCIMKey - The structure that describes the current level of SCIM based on the next level.
pszSCIMLevelList - On return, lists each string in the requested SCIM level.
pnMaxRequested - On initial call, specifies the maximum number of SCIM strings to retrieve. On return, specifies the actual number of strings in pszSCIMLevelList.
pnError - This variable contains the SQL error number if the error occurred.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_E RROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
GetSeverities fetches a list of all known severities. The results are presented in the form âœ#:Description,â where # is the numeric level designation of the severity.
Syntax
int GetSeverities(long nAPIHandle, STRING_ARRAY* pszSeverityList, long* nReturnCount, long* pnError )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pszSeverityList - On return, lists every severity in the system.
nReturnCount - On return, specifies the number of strings in pszSeverityList.
pnError - This variable contains the SQL error number if an error occurred.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
GetSupportingOrganizationIDs fetches a list of organizations that are currently considered to be supportable based on the object that is being viewed and the specified organization.
Syntax
int GetSupportedOrganizationIDs( long nAPIHandle, const char* pszOrganizationID, const char* pszTableName, STRING_ARRAY* pszOrgIDList, long* nReturnCount, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pszOrganizationID - The organization that is considered to be currently supported. This organization will be the origin for the search method that will determine the support domain.
pszTableName - The table that holds the data that is being viewed.
pszOrgIDList - On return, specifies the organizations that make up the support domain.
nReturnCount - On initial call, specifies the maximum number of organizations to retrieve. On return, specifies the number of organizations returned.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and the application server.
Returns
Int - Request status, either SAI_OK to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If an SQL error occurred, use pnError and refer to your database manual.
Description
GetUsers fetches a list of users.
Note: The database does not retrieve more than the specified maximum.
Syntax
int GetUsers(long nAPIHandle, USER_RECORD** ppUserList, long* pnMaxRequested, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
ppUserList - On return, lists each user in the system to a maximum specified by pnMaxRequested.
pnMaxRequested - On initial call, specifies the maximum number of users to retrieve. On return, specifies the actual number of users in ppUserList.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
GetUserOrganizationIDs fetches a list of organizations that the specified user is affiliated with. If the user type indicates a TSD user, the supported organizations will be returned. If a web user is supplied, the organization to which the user is a member is returned.
Syntax
int GetUserOrganizationIDs( long nAPIHandle, const char* pszUserID, int nUserType, STRING_ARRAY* pszOrgIDList, long* nReturnCount, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pszUserID - The user id to fetch organizations based on.
pszOrgIDList - On return, specifies the organizations that pszUserID is affiliated with.
nReturnCount - On initial call, specifies the maximum number of organizations to retrieve. On return, specifies the number of organizations returned.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and the application server.
Returns
Int - Request status, either SAI_OK to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If an SQL error occurred, use pnError and refer to your database manual.
Description
GetWorkHistory fetches the work history for the specified problem.
Syntax
int GetWorkHistory(long nAPIHandle, const char* pszProblemID, HISTORY_RECORD** ppHistoryList, long* pnMaxRequested, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pszProblemID - The problem ID with which work history information is retrieved.
ppHistoryList - On return, lists work history records of the specified problem.
pnMaxRequested - On initial call, specifies the maximum number of records to retrieve. On return, specifies the actual number of records in ppHistoryList.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
InitContactFilter sets the CONTACT_FILTER data members to default values to indicate unused fields.
Syntax
void InitContactFilter(long nAPIHandle, CONTACT_FILTER* pContactFilter )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pContactFilter - Points to the CONTACT_FILTER structure to be initialized with default values.
Description
InitHierarchyFilter sets the HIERARCHY_FILTER data members to default values to indicate unused fields.
Syntax
void InitHierarchyFilter( long nAPIHandle, HIERARCHY_FILTER* pHierarchyFilter )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pHierarchyFilter - Points to the HIERARCHY_FILTER structure to initialize with default values.
Description
InitHistoryAttachment sets HISTORY_ATTACHMENT data members to default values to indicate unused fields.
Syntax
void InitHistoryAttachment(long nAPIHandle, HISTORY_ATTACHMENT* pHistoryAttachment )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pHistoryAttachment - Points to the HISTORY_ATTACHMENT structure to be initialized with default values.
Description
InitLocationFilter sets the LOCATION_FILTER data members to default values to indicate unused fields.
Syntax
void InitLocationFilter(long nAPIHandle, LOCATION_FILTER* pLocationFilter )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pLocationFilter - Points to the LOCATION_FILTER structure to initialize with default values.
Description
InitNotification sets the NOTIFICATION data members to default values to indicate unused fields.
Syntax
void InitNotification(long nAPIHandle, NOTIFICATION* pNotification )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pNotification - Points to the NOTIFICATION structure to initialize with default values.
Description
InitProblemClosure sets the data members of PROBLEM_CLOSURE to default values to indicate unused fields.
Syntax
void InitProblemClosure(long nAPIHandle, PROBLEM_CLOSURE* pProblemClosure )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pProblemClosure - Points to the PROBLEM_CLOSURE structure to initialize with default values.
Description
InitProblemFilter sets the data members of PROBLEM_FILTER to default values to indicate unused fields.
Syntax
void InitProblemFilter(long nAPIHandle, PROBLEM_FILTER* pProblemFilter )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pProblemFilter - Points to the PROBLEM_FILTER structure to initialize with default values.
Description
InitProblemViewFilter sets the data members of PROBVIEW_FILTER to default values to indicate unused fields.
Syntax
void InitProblemViewFilter (long nAPIHandle, PROBVIEW_FILTER* pProbViewFilter)
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pProbViewFilter - Points to the PROBVIEW_FILTER structure to initialize with default values.
Description
InitRequestContext sets data members of REQUEST_CONTEXT to default values to indicate unused fields.
Syntax
void InitRequestContext(long nAPIHandle, REQUEST_CONTEXT* pRequestContext )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pRequestContext - Points to the REQUEST_CONTEXT structure to initialize with default values.
Description
InitSCIMKey sets the data members of SCIM_KEY to default values to indicate unused fields.
Syntax
void InitSCIMKey(long nAPIHandle, SCIM_KEY* pSCIMKey )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pSCIMKey - Points to the SCIM_KEY structure to initialize with default values.
Description
InquireContacts fetches a list of contacts from the database that matches the filter criteria.
Note: The database does not retrieve more than the specified maximum.
Syntax
int InquireContacts(long nAPIHandle, const CONTACT_FILTER* pcontact_filter, CONTACT_RECORD** ppContactList, long* pnMaxRequested, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pContactFilter - Criteria used to filter the contacts.
ppLocationList - On return, lists contact records matching the filter criteria.
pnMaxRequested - On initial call, specifies the maximum number of records to retrieve. On return, specifies the actual number of records in ppContactList.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
InquireLocations fetches a list of locations from the database that matches filter criteria in the LOCATION_FILTER.
Note: The database does not retrieve more than the specified maximum.
Syntax
int InquireLocations(long nAPIHandle, const LOCATION_FILTER* pLocationFilter, LOCATION_RECORD** ppLocationList, long* pnMaxRequested, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pLocationFilter - Criteria used to filter the locations.
ppLocationList - On return, lists the location records matching the filter criteria.
pnMaxRequested - On initial call, specifies the maximum number of records to retrieve. On return, specifies the actual number of records in ppLocationList.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
InquireProblemViews fetches a list of problem view structures that matches the filter criteria.
Syntax
int InquireProblemViews (long nAPIHandle, const PROBVIEW_FILTER* pProbViewFilter, PROBVIEW_RECORD** ppProbViewList, long* pnMaxRequested, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL)
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pProbViewFilter - The PROBVIEW_FILTER record describing the search criteria for retrieving a list of problem views.
ppProbViewList - On return, lists the problem view records matching the filter criteria.
pnMaxRequested - On initial call, specifies the maximum number of problem views to retrieve. On return, specifies the actual number of problem views in ppProbViewList.
pnError - This variable contains the error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass this C API call.
Returns
int - Request status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR or SAI_ERROR to indicate that an error occurred. If an SQL error occurred, use pnError and refer to your database manual.
Description
InquireRequests fetches a list of requests that matches the filter criteria.
Note: The database does not retrieve more than the specified maximum.
Syntax
int InquireRequests(long nAPIHandle, const PROBLEM_FILTER* pProblemFilter, PROBLEM_RECORD** ppProblemList, long* pnMaxRequested, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pProblemFilter - The PROBLEM_FILTER record describing the search criteria for retrieving a list of requests.
ppProblemList - On return, lists the requests matching the filter criteria.
pnMaxRequested - On initial call, specifies the maximum number of requests to retrieve. On return, specifies the actual number of requests in ppProblemList.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
Given a valid date (a sequence of three numbers representing day, month, and year) by the user, MakeDate formats an ISO standard date in the date fields of C API structures.
Syntax
void MakeDate(char dateBuffer, int nMonth, int nDay, int nYear)
Arguments
dateBuffer - On return, points to allocated memory that contains the formatted ISO date.
nMonth - The month in the ISO date (1-12)
nDay - The day in the ISO date (1-31)
nYear - The year in the ISO date (0-9999)
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
SendNotification sends a notification using the default notification method.
Syntax
int SendNotification(long nAPIHandle, const NOTIFICATION* pNotification, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pNotification - The NOTIFICATION record that describes the notification to send.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
TransferRequest transfers a request to a specified user or group.
Syntax
int TransferRequest(long nAPIHandle, char* pszRequestID, PROBLEM_CLOSURE* pProblem, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL)
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pProblem - The PROBLEM_CLOSURE record that describes required transfer information.
szRequestID - The request ID to transfer.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
UpdateRequest updates a request specified with the new information.
Syntax
int UpdateRequest(long nAPIHandle, char*pszRequestID, PROBLEM_CLOSURE* pProblem, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pProblem - The PROBLEM_CLOSURE record that describes the update to the request.
szRequestID - The request ID to update.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and application server.
Returns
int - Requests status, either SAI_OK, to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If a SQL error occurred, use pnError and refer to your database manual.
Description
LockProblem locks a TSD problem record by setting the ACTIVE_WITH column in the PROBLEMS table to prevent concurrent updates to the same problem. This lock is an application level lock and does not actually lock database tables.
Syntax
int LockProblem( long nAPIHandle, const char* pszUserID, const char* pszProblemID, long* pnError, const EXTENDED_DATA* pUserDefinedData = NULL )
Arguments
nAPIHandle - The C API handle initialized in the call to Connect.
pszUserID - The user id to lock the problem with. This must be a valid TSD user.
pszProblemID - The problem record to lock.
pnError - This variable contains the SQL error number if an error occurred.
pUserDefinedData - Lists optional parameters to pass to this C API call. This user-defined data can be used to customize the C API and the application server.
Returns
Int - Request status, either SAI_OK to indicate no error; or SAI_SQL_ERROR, or SAI_ERROR to indicate that an error occurred. If an SQL error occurred, use pnError and refer to your database manual.