# Return CalDAV and CardDAV connection information

This function returns the connection information to set up the CalDAV and CardDAV clients.

Endpoint: GET /DAV/get_calendar_contacts_config
Version: 11.138.0.6
Security: BasicAuth

## Query parameters:

  - `user` (any)
    A cPanel account or valid email account user.

If you do not include this parameter, the function defaults to the current
authenticated user.

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "get_calendar_contacts_config"

  - `module` (string)
    The name of the module called.
    Example: "DAV"

  - `result` (object)

  - `result.data` (object)

  - `result.data.activesync` (object)
    Configuration details for ActiveSync.

  - `result.data.activesync.enabled` (integer)
    Whether the server has ActiveSync enabled.
* 1 — Enabled.
* 0 — Not enabled.
    Enum: 1, 0

  - `result.data.activesync.port` (integer)
    The port number the system uses for secure ActiveSync connections.
    Example: 2091

  - `result.data.activesync.server` (string)
    The fully qualified domain name to connect to.
    Example: "example.com"

  - `result.data.activesync.user` (string)
    The cPanel user or email account user to
whom the returned connection information pertains.

If you do not specify the user parameter,
this function returns the authenticated cPanel user.
    Example: "username"

  - `result.data.no_ssl` (object)
    A list of non-SSL connection configurations.

  - `result.data.no_ssl.calendars` (array)
    An array of objects containing the user's calendars.

  - `result.data.no_ssl.calendars.description` (string)
    The description of the calendar.
    Example: "Custom calendar 1."

  - `result.data.no_ssl.calendars.name` (string)
    The name of the calendar.
    Example: "Calendar 1"

  - `result.data.no_ssl.calendars.path` (string)
    The relative URL path to the calendar.
    Example: "/calendars/example/calendar:ZcG9JBH68WXxfMVUgvSrUw1"

  - `result.data.no_ssl.calendars.url` (string)
    The absolute URL to the calendar.
    Example: "http://example.com:2079/calendars/example/calendar:ZcG9JBH68WXxfMVUgvSrUw1"

  - `result.data.no_ssl.contacts` (array)
    An array of objects containing the user's address books.

  - `result.data.no_ssl.contacts.description` (string)
    The description of the address book.
    Example: "Custom address book 1."

  - `result.data.no_ssl.contacts.name` (string)
    The name of the address book.
    Example: "Custom 1"

  - `result.data.no_ssl.contacts.path` (string)
    The relative URL to the address book.
    Example: "/addressbooks/example/contacts:E-KKA5uQZyQJbTBKcGP3OQ6"

  - `result.data.no_ssl.contacts.url` (string)
    The absolute URL to the address book.
    Example: "https://example.com:2080/addressbooks/example/contacts:E-KKA5uQZyQJbTBKcGP3OQ6"

  - `result.data.no_ssl.free_busy` (string)
    The absolute URL path and HTTP port to the user's
CalDAV free-busy-query connection.

Note:

This information is useful for clients that support Autodiscovery.
    Example: "http://server.example.com:2079/kronolith/fb.php?u=example"

  - `result.data.no_ssl.full_server` (string)
    The absolute URL path and HTTP port to the user's CalDAV
and CardDAV connection information.

Note:

This information is useful for clients that do not support Autodiscovery.
    Example: "http://example.com:2079/rpc/principal/example"

  - `result.data.no_ssl.port` (integer)
    The port number that the system uses for non-SSL connections.
    Example: 2079

  - `result.data.no_ssl.server` (string)
    The short server connection string that includes a domain name and a port that uses the HTTP protocol.
    Example: "http://example.com:2079"

  - `result.data.ssl` (object)
    A list of SSL connection configurations.

  - `result.data.ssl.calendars` (array)
    An array of objects containing the user's calendars.

  - `result.data.ssl.calendars.description` (string)
    The description of the calendar.
    Example: "Custom calendar 2."

  - `result.data.ssl.calendars.name` (string)
    The name of the calendar.
    Example: "Calendar 2"

  - `result.data.ssl.calendars.path` (string)
    The relative URL path to the calendar.
    Example: "/calendars/example/calendar:ZcG9JBH68WXxfMVUgvSrUw1"

  - `result.data.ssl.calendars.url` (string)
    The absolute URL to the calendar.
    Example: "http://example.com:2080/calendars/example/calendar:ZcG9JBH68WXxfMVUgvSrUw1"

  - `result.data.ssl.contacts` (array)
    An array of objects containing the user's address books.

  - `result.data.ssl.contacts.description` (string)
    The description of the address book.
    Example: "Custom address book 2."

  - `result.data.ssl.contacts.name` (string)
    The name of the address book.
    Example: "Address book 2"

  - `result.data.ssl.contacts.path` (string)
    The relative URL to the address book.
    Example: "/addressbooks/example/contacts:E-KKA5uQZyQJbTBKcGP3OQ6"

  - `result.data.ssl.contacts.url` (string)
    The absolute URL to the address book.
    Example: "https://example.com:2080/addressbooks/example/contacts:E-KKA5uQZyQJbTBKcGP3OQ6"

  - `result.data.ssl.free_busy` (string)
    The absolute URL path and HTTPS port to the user's CalDAV
free-busy-query connection.

Note:

This information is useful for clients that support Autodiscovery.
    Example: "http://server.example.com:2080/kronolith/fb.php?u=example"

  - `result.data.ssl.full_server` (string)
    The absolute URL path and HTTPS port to the user's CalDAV and
CardDAV connection information.

Note:

This information is useful for clients that do not support
Autodiscovery.
    Example: "http://example.com:2080/rpc/principal/example"

  - `result.data.ssl.is_self_signed` (integer)
    Whether the server uses a self-signed certificate.

* 1 — Self-signed.
* 0 — Not self-signed.
    Enum: 1, 0

  - `result.data.ssl.port` (integer)
    The port number that the system uses for SSL connections.
    Example: 2080

  - `result.data.ssl.server` (string)
    The short server connection string that includes a
domain name and a port that uses the HTTPS protocol.

Note:

This value is useful for clients that support Autodiscovery.
    Example: "https://example.com:2080"

  - `result.data.user` (string)
    The cPanel user or email account user to
whom the returned connection information pertains.

If you do not specify the user parameter,
this function returns the authenticated cPanel user.
    Example: "username"

  - `result.errors` (array,null)
    List of errors if the API failed.

  - `result.messages` (array,null)
    List of messages generated by the API.

  - `result.metadata` (object)

  - `result.status` (integer)
    * 1 — Success.
* 0 — Failed. Check the errors field for more details.
    Enum: 1, 0

  - `result.warnings` (array,null)
    List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.


