--- title: "API reference: General functions" slug: "api-reference-general" updated: 2026-07-31T06:51:16Z published: 2026-07-31T06:51:16Z canonical: "help.elaine.io/api-reference-general" --- > ## 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 API reference: General functions documents the function signatures, parameters, return values, and error behavior of the Elaine HTTP API. > [!NOTE] > Note > > Function availability depends on the Elaine release and enabled features. Authenticate HTTP requests with an Elaine-issued Bearer JWT. ## Function overview | array | api_errorCodes () | | --- | --- | | | Delivers an associative array with all return error codes or their constant names. | | array\|integer | api_getBackgroundJobs () | | | Lists all currently running background processes of the tenant. | | array\|integer | api_getDatasources () | | | Returns an associative array with all data sources of the tenant. | | 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. | | string\|integer | api_getElaineVersion ( bool $asInteger = false ) | | | Returns ELAINE version as string or int. | | 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. | | array\|integer | api_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 | array | Error 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\|integer | Array 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\|integer | Array 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 = null | Classname (Datafield, Mailing, Group or Segment) | | --- | --- | --- | | int | $objectID = null | Key of the dataset to load | #### Return Value | array\|boolean | Loaded 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\|integer | ELAINE 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_id | Client ID | | --- | --- | --- | | int | $u_id = null | User ID | #### Return Value | integer | 1 on success or error-code | | --- | --- | ### **api_healthcheck_status** #### array|integer api_healthcheck_status () Fetch the latest status of all monitoring business rules #### Return Value | integer | error-code | | --- | --- | | array | Array containing the aggregated status ("UNKNOWN" if no checks are configured), timestamp of the last check, and detailed output of all running checks | ## Related topics - [API reference](/new-public-docs/docs/en/api-reference) - [Call the HTTP API with cURL](/new-public-docs/docs/en/api-http-requests) - [Authentication, network security, and VPN](/new-public-docs/docs/en/api-authentication-security)