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.
What's inside 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.
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.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: ReadPOST: WritePUT: UpdateDELETE: 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.
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
netshcommand.- Run CMD as Administrator.
- Execute
netsh. - Execute
http. - 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}License cobra CXM WEB CONNECT for additional endpoints
By default, cobra CXM WEB CONNECT includes three endpoints. If your requirements exceed three endpoints, you must license the software following the standard cobra licensing procedure.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).
Manage API Keys for REST API access
API keys are required to access the configured REST endpoints. In the »Sicherheit« (Security) tab:
- Click »Hinzufügen« (Add) to create a new key and assign it a name.
- Use the checkbox to activate or deactivate the key.
- Click the »...« symbol in the »Endpunkte« column to define the scope of the key (either allow all endpoints or restrict access to selected ones).
- Select a key and click »Löschen« (Delete) to remove it.
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/tokenRequest 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..." }Restrict API key access to specific endpoints
To enhance security, you can restrict an API key so that it can only access specific endpoints. Once this restriction is enabled, the API key will be unable to access any endpoints that have not been explicitly selected.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:
- Open the CXM WEB CONNECT configuration.
- Navigate to the "Endpunkte" (Endpoints) tab.
- Click "Neuer Endpunkt" (New Endpoint).
- Assign a name and select the relevant table and document field.
- Assign the necessary permissions: "Lesen" (Read) and "Schreiben" (Write).
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.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:
- Open the configuration and navigate to the "Endpunkte" (Endpoints) tab.
- Click on "Funktions-Endpunkte" (Function Endpoints).
- Check the box to activate the PhoneSearch endpoint.
- Configure the relevant field names and cobra fields.
- Click "OK" to save settings.
- Click "Übernehmen" (Apply). You may need to restart the cobra CXM WEB CONNECT service for changes to take effect.