Documentation

Cxn.php

The Cxn API allows a Civi site to initiate a connection to a remote application. There are three primary actions:

  • register: Establish a new connection.
  • unregister: Destroy an existing connection.
  • get: Get a list of existing connections.

Table of Contents

Functions

_civicrm_api3_cxn_register_spec()  : mixed
Adjust metadata for "register" action.
civicrm_api3_cxn_register()  : array<string|int, mixed>
Register with a remote application and create a new connection.
_civicrm_api3_cxn_unregister_spec()  : mixed
Adjust metadata for cxn unregister.
civicrm_api3_cxn_unregister()  : array<string|int, mixed>
Unregister with a remote application; destroy an existing connection.
_civicrm_api3_cxn_parseCxnId()  : string
_civicrm_api3_cxn_get_spec()  : mixed
Adjust metadata for cxn get action.
civicrm_api3_cxn_get()  : array<string|int, mixed>
Returns an array of Cxn records.
_civicrm_api3_cxn_getlink_spec()  : mixed
Adjust metadata for "getlink" action.
civicrm_api3_cxn_getlink()  : array<string|int, mixed>
civicrm_api3_cxn_getcfg()  : array<string|int, mixed>
civicrm_api3_cxn_create()  : page
Creates or modifies a Cxn row.

Functions

_civicrm_api3_cxn_register_spec()

Adjust metadata for "register" action.

_civicrm_api3_cxn_register_spec(array<string|int, mixed> &$spec) : mixed
Parameters
$spec : array<string|int, mixed>

List of fields.

civicrm_api3_cxn_register()

Register with a remote application and create a new connection.

civicrm_api3_cxn_register(array<string|int, mixed> $params) : array<string|int, mixed>

One should generally identify an application using the app_guid. However, if you need to test a new/experimental application, then disable CIVICRM_CXN_CA and specify app_meta_url.

Parameters
$params : array<string|int, mixed>

Array with keys:

  • app_guid: The unique identifier of the target application.
  • app_meta_url: The URL for the application's metadata.
Tags
throws
Exception
Return values
array<string|int, mixed>

_civicrm_api3_cxn_unregister_spec()

Adjust metadata for cxn unregister.

_civicrm_api3_cxn_unregister_spec(array<string|int, mixed> &$spec) : mixed
Parameters
$spec : array<string|int, mixed>

civicrm_api3_cxn_unregister()

Unregister with a remote application; destroy an existing connection.

civicrm_api3_cxn_unregister(array<string|int, mixed> $params) : array<string|int, mixed>

Specify app_guid XOR cxn_guid.

Parameters
$params : array<string|int, mixed>

Array with keys:

  • cxn_guid: string
  • app_guid: string
  • force: bool
Return values
array<string|int, mixed>

_civicrm_api3_cxn_parseCxnId()

_civicrm_api3_cxn_parseCxnId(array<string|int, mixed> $params) : string
Parameters
$params : array<string|int, mixed>

An array with cxn_guid and/or app_guid.

Tags
throws
CRM_Core_Exception
Return values
string

The CxnId. (If not available, then an exception is thrown.)

_civicrm_api3_cxn_get_spec()

Adjust metadata for cxn get action.

_civicrm_api3_cxn_get_spec(array<string|int, mixed> &$spec) : mixed
Parameters
$spec : array<string|int, mixed>

civicrm_api3_cxn_get()

Returns an array of Cxn records.

civicrm_api3_cxn_get(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>

Array of one or more valid property_name=>value pairs.

Return values
array<string|int, mixed>

API result array.

Adjust metadata for "getlink" action.

_civicrm_api3_cxn_getlink_spec(array<string|int, mixed> &$spec) : mixed
Parameters
$spec : array<string|int, mixed>

List of fields.

civicrm_api3_cxn_getlink(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>

Array with keys:

  • cxn_guid OR app_guid: string.
  • page: string.
Tags
throws
Exception
Return values
array<string|int, mixed>

civicrm_api3_cxn_getcfg()

civicrm_api3_cxn_getcfg(array<string|int, mixed> $params) : array<string|int, mixed>
Parameters
$params : array<string|int, mixed>
Tags
throws
Exception
Return values
array<string|int, mixed>

civicrm_api3_cxn_create()

Creates or modifies a Cxn row.

civicrm_api3_cxn_create(array<string|int, mixed> $params) : page
Parameters
$params : array<string|int, mixed>

Array with keys:

  • id, cxn_guid OR app_guid: string.
  • is_active: boolean.
  • options: JSON
Tags
throws
Exception
Return values
page

        
On this page

Search results