Documentation Index

Fetch the complete documentation index at: https://help.elaine.io/llms.txt

Use this file to discover all available pages before exploring further.

API reference: General functions

Prev Next

 API reference: General functions documents the function signatures, parameters, return values, and error behavior of the Elaine HTTP API.

Note

Function availability depends on the Elaine release and enabled features. Authenticate HTTP requests with an Elaine-issued Bearer JWT.

Function overview

arrayapi_errorCodes ()
Delivers an associative array with all return error codes or their constant names.
array|integerapi_getBackgroundJobs ()
Lists all currently running background processes of the tenant.
array|integerapi_getDatasources ()
Returns an associative array with all data sources of the tenant.
array|booleanapi_getDetails ( string $objectType = null , int $objectID = null )
Delivers an array with detailed information on the specified ELAINE element $objectType identified via $objectID.
string|integerapi_getElaineVersion ( bool $asInteger = false )
Returns ELAINE version as string or int.
integerapi_init ( int $cl_id , int $u_id = null )
Before using the API in ELAINE scripts or local PHP programs it must be initialized with this function for the tenant $cl_id and the user $u_id.
array|integerapi_healthcheck_status ()
Fetch latest health check status from monitoring business rules

Functions

api_errorCodes ()

array api_errorCodes ()

Delivers an associative array with all return error codes or their constant names.

Return Value

arrayError codes and names

api_getBackgroundJobs ()

array|integer api_getBackgroundJobs ()

Lists all currently running background processes of the tenant. This allows you, e.g. to identify whether a job to create a data field has already been completed.

Return Value

array|integerArray of jobs or error code

api_getDatasources ()

array|integer api_getDatasources ()

Returns an associative array with all data sources of the tenant.

Return Value

array|integerArray with datasources

api_getDetails

array|boolean api_getDetails( string $objectType = null , int $objectID = null )

Delivers an array with detailed information on the specified ELAINE element $objectType identified via $objectID. Possible types are: 'Datafield', 'Mailing', 'Group' and 'Segment'

Parameters

string$objectType = nullClassname (Datafield, Mailing, Group or Segment)
int$objectID = nullKey of the dataset to load

Return Value

array|booleanLoaded dataset of the given classname

api_getElaineVersion

string|integer api_getElaineVersion( bool $asInteger = false )

SINCE 5.13.2 Returns ELAINE version as string or int.

Parameters

bool$asInteger = false[optional] set true to get version as integer

Return Value

string|integerELAINE version

api_init

integer api_init( int $cl_id , int $u_id = null )

Before using the API in ELAINE scripts or local PHP programs it must be initialized with this function for the tenant $cl_id and the user $u_id. When using the HTTP interface, the function is not relevant because it is started automatically.

Parameters

int$cl_idClient ID
int$u_id = nullUser ID

Return Value

integer1 on success or error-code

api_healthcheck_status

array|integer api_healthcheck_status ()

Fetch the latest status of all monitoring business rules

Return Value

integererror-code
arrayArray containing the aggregated status ("UNKNOWN" if no checks are configured), timestamp of the last check, and detailed output of all running checks