cobra API CXM WEB CONNECT

website·Indexed 32 days ago

https://webconnect.cobra-hilfe.de/

Documentation for the cobra REST API CXM WEB CONNECT, including guides on authentication via JWT Bearer Tokens, endpoint configuration, and data management. Covers operations such as creating, updating, and deleting addresses, managing documents and images, executing SQL commands, and utilizing pagination, filtering, and sorting.

Tokens
12.9K
Snippets
51
Records
103
Agent score
64%

What's inside CXM Web Connect

  1. Overview of cobra API CXM WEB CONNECT

    The cobra CXM WEB CONNECT is a REST-API adapter that allows external applications, mobile apps, and websites to read and modify data within a cobra database. It is available in the CRM PLUS, CRM PRO XL, and CRM BI editions. The interface integrates with the cobra permission system to ensure secure data access.
  2. Overview of cobra CXM WEB CONNECT REST API

    The cobra CXM WEB CONNECT add-on provides a REST API that acts as an adapter to access and modify data within a cobra database from external or mobile systems. The interface respects the cobra permission system, ensuring that data access is controlled according to defined user rights. Common use cases include publishing cobra data on websites, connecting disparate systems, or importing data from web forms into cobra.
  3. Create and configure REST endpoints in cobra CXM WEBCONNECT

    To create a new REST endpoint, click the 'Neuer Endpunkt' (New Endpoint) button. This allows you to grant external access to specific database tables.

    Configuration Parameters:

    • Endpunktname (Endpoint Name): A custom name. Allowed characters are numbers (0-9), letters (A-Z), and hyphens. Special characters are not permitted.
    • Tabelle (Table): Select the data table from the chosen database that should be accessible externally. This includes 'free tables' (e.g., 'Immobilien').
    • Filter: Define a filter to restrict access to specific data (e.g., restricting access based on the 'Erfasst von' field).
    • Berechtigung (Permissions): Define the allowed HTTP methods for the endpoint:
      • GET: Read
      • POST: Write
      • PUT: Update
      • DELETE: Delete

    Fine-grained Field Permissions: To restrict permissions to specific fields or related tables, click the '+' icon next to the endpoint name. You can then configure rights in two tabs:

    • Felder (Fields): Access and permissions for individual fields within the database table.
    • Verknüpfte Tabellen (Linked Tables): Access to tables connected via relationship fields to the primary table.
  4. Establish a secure SSL connection via Command Line

    To encrypt communication between the end device and the server, you can bind an SSL certificate (e.g., a Windows PFX certificate) to a specific port using the netsh command.

    1. Run CMD as Administrator.
    2. Execute netsh.
    3. Execute http.
    4. Execute add sslcert ipport=IP-Address:Port certhash=Fingerprint appid={GUID}.
    • certhash (Fingerprint): Found in the 'Details' tab of the certificate properties under 'Fingerprint'.
    • appid (GUID): A unique identifier that can be generated via a GUID generator.
    netsh http add sslcert ipport=172.16.1.32:30001 certhash=43953a5f065fb433c6b620dddcf37cb358ebbede appid={91291103-8638-4b7c-a3ab-649450d4c947}
  5. Configure CXM WEB CONNECT settings

    When configuring CXM WEB CONNECT, adhere to the following constraints and requirements:

    • Port Selection: The port specified in the 'Status' tab must not be already in use by another service.
    • Service Permissions: The CXM Web Connect service must run under an account with sufficient permissions. Note that after a software update, the user account must be re-entered manually.
    • User Activation: cobra must be launched at least once using the user account specified under 'CXM Web Connect: Zugangsdaten' (Credentials) in the configuration.
    • Endpoint Naming: Field names for individual endpoints should not contain spaces or special characters.
    • cobra Event Integration: If using cobra Event, the checkbox 'Endpunkt aktiv' (Endpoint active) must be enabled under 'Endpunkte: Funktions-Endpunkte: E-Mail-Suche' (Endpoints: Function Endpoints: Email Search).
  6. Manage API Keys for REST API access

    API keys are required to access the configured REST endpoints. In the »Sicherheit« (Security) tab:

    1. Click »Hinzufügen« (Add) to create a new key and assign it a name.
    2. Use the checkbox to activate or deactivate the key.
    3. Click the »...« symbol in the »Endpunkte« column to define the scope of the key (either allow all endpoints or restrict access to selected ones).
    4. Select a key and click »Löschen« (Delete) to remove it.
  7. Retrieve a JWT Bearer Token for cobra CXM WEB CONNECT

    To authenticate requests to the cobra CXM WEB CONNECT API, you must first obtain a JWT Bearer Token. Once obtained, this token and your API Key (created in the CXM WEB CONNECT settings) must be included in the header of all subsequent API requests. When using the token, the username and password are no longer required.

    Endpoint: POST /api/token

    Request Headers

    {
        "ApiKey": "myApiKey",
        "Accept": "application/json",
        "Content-Type": "application/json",
        "Accept-Encoding": "gzip, deflate, br"
    }

    Request Body

    {
        "userName": "webApiUser", 
        "password": "myPassword"
    }

    Example Response

    {
      "success": true,
      "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
    }
  8. Configure a REST endpoint in CXM WEB CONNECT

    Before an endpoint can be queried via the API, it must be configured in the CXM WEB CONNECT administration interface:

    1. Open the CXM WEB CONNECT configuration.
    2. Navigate to the "Endpunkte" (Endpoints) tab.
    3. Click "Neuer Endpunkt" (New Endpoint).
    4. Assign a name and select the relevant table and document field.
    5. Assign the necessary permissions: "Lesen" (Read) and "Schreiben" (Write).
  9. Activate CXM WEB CONNECT licenses for additional REST endpoints

    CXM WEB CONNECT includes three REST endpoints by default. To use more than three endpoints, you must activate the corresponding license using the license information or license file provided with the software or by your partner.
  10. Activate the PhoneSearch function endpoint in CXM WEB CONNECT

    To enable the phone number search functionality, follow these steps in the cobra CXM WEB CONNECT configuration:

    1. Open the configuration and navigate to the "Endpunkte" (Endpoints) tab.
    2. Click on "Funktions-Endpunkte" (Function Endpoints).
    3. Check the box to activate the PhoneSearch endpoint.
    4. Configure the relevant field names and cobra fields.
    5. Click "OK" to save settings.
    6. Click "Übernehmen" (Apply). You may need to restart the cobra CXM WEB CONNECT service for changes to take effect.