Key Capabilities
- Public API endpoint exposure for HTTP POST and PUT data ingestion with modern authentication mechanisms
- User-based rate limiting and concurrent request management with CORS support
- HMAC signature authentication for enhanced security and custom response event scripting
- Sample request templates for XML Map connector integration and workflow automation
Overview
Webhook connectors enable data to enter the CData Arc flow via HTTP POSTs and PUTs. Each Webhook connector exposes an endpoint in the application where external clients can send XML and JSON payloads. These payloads are written to an output file and passed along to the next connectors in the flow. You can specify a sample request in the Webhook connector to simplify the process of transforming data that is POSTed to the endpoint. When an XML sample is specified, and the Webhook connector is connected to an XML Map connector in the flow, the XML Map connector automatically detects the expected structure of XML files posted to the endpoint. You can then use the XML Map connector Node Value Editor to map this structure into a target XML structure.Connector Configuration
This section contains all of the configurable connector properties.Settings Tab
Connector Details
Settings related to the core operation of the connector.Advanced Settings
Request Details Tab
Supply an XML or JSON template representing the expected structure of incoming data. The primary benefit of specifying a sample request is when you connect the Webhook connector to an XML Map connector in the flow. Use XML Map connectors when the API data needs to be converted into some other format, like an EDI document or a database insert. The XML Map connector detects the XML structure of the sample request and uses this as the Source File for the XML Map connector. Upload the XML structure representing the target format as the Destination File, then use the Node Value Editor to convert the source structure into the destination.Users Tab
The Users tab lets you:- Create users with their associated authtokens and OAuth 2.0 credentials
- Define POST and/or PUT privileges
- Specify how many requests each user can make per hour
- Specify how many concurrent requests are permitted
Server Tab
Trusted IP Addresses
Default Rate Limits (Per User)
Settings restricting the number of requests allowed, if no values have been provided on the Users tab.Cross-Origin Resource Sharing (CORS)
Settings governing the use of CORS to serve cross-origin resources.| Setting | Description |
|---|---|
| Enable cross-origin resource sharing (CORS) | Whether or not CORS is enabled. The rest of these options are only available when you check this box. |
| Allow all domains without '*' | If enabled, domain origins are not restricted to a specific list. |
| Access-Control-Allow-Origin | The comma-delimited list of domain origins to allow. Included as an HTTP response header. |
| Access-Control-Allow-Credentials | Whether or not user credentials such as cookies are allowed in cross-origin requests. Included as an HTTP response header. |
| Access-Control-Allow-Methods | The comma-delimited list of methods to allow. Included as an HTTP response header. |
| Access-Control-Allow-Headers | The comma-delimited list of headers to allow. Included as an HTTP response header. |
| Access-Control-Max-Age | The maximum duration (in seconds) that Access-Control response header values can be cached. |
Advanced Settings
Advanced Tab
Message
Message settings determine how the connector searches for messages and manages them after processing.
Note: The settings below are deprecated and hidden by default. They appear only on connectors where they were previously enabled or configured to a non-default value. To retain copies of successfully processed files, right-click the connector in the flow, choose Show Success Path, and connect the success path to a File connector.
| Setting | Description |
|---|---|
| Save to Sent Folder (Deprecated) | Copies files processed by the connector to the Sent folder. Disabled by default. Files saved to the Sent folder are not covered by Encryption at Rest. |
| Sent Folder Scheme (Deprecated) | Groups files in the Sent folder by the selected time interval. Only relevant when Save to Sent Folder is enabled. |
Logging
Settings that govern the creation and storage of logs.
| Setting | Description |
|---|---|
| Log Level | The verbosity of logs generated by the connector. When you request support, set this to Debug. |
| Log Subfolder Scheme | Instructs the connector to group files in the Logs folder according to the selected interval. The Weekly option (which is the default) instructs the connector to create a new subfolder each week and store all logs for the week in that folder. Leaving this setting blank tells the connector to save all logs directly in the Logs folder. For connectors that process many transactions, using subfolders helps keep logs organized and improves performance. |
| Log Messages | Check this to have the log entry for a processed file include a copy of the file itself. If you disable this, you might not be able to download a copy of the file from the Transactions tab. |
Miscellaneous
Miscellaneous settings are for specific use cases.
| Setting | Description |
|---|---|
| Other Settings | Enables you to configure hidden connector settings in a semicolon-separated list (for example, setting1=value1;setting2=value2). Normal connector use cases and functionality should not require the use of these settings. |
Alerts Tab
SLAs Tab
HMAC Authentication
HMAC (Hash-based Message Authentication Code) signature authentication is a cryptographic method that verifies the authenticity and integrity of webhook requests. It uses a shared secret key to generate a unique signature for each request, ensuring:- Request Authenticity: Confirms the request originated from a trusted source
- Data Integrity: Verifies that the request payload hasn’t been tampered with during transmission
- Replay Attack Prevention: Protects against malicious reuse of intercepted requests
Configuration
- Enable HMAC Authentication
- Check Enable HMAC Authentication in the webhook connector settings.
- Optionally, customize the HMAC Signature Header value (the default is
x-cdata-hmac-signature).
Set HMAC Keys for Users
After enabling HMAC authentication:- Navigate to the Users tab of the webhook connector.
- Configure the HMAC key each authorized webhook user:
- An HMAC key is automatically generated for each user. You can override the auto-generated key with a custom value. Each user must use their assigned HMAC key to generate valid signatures for their webhook requests.
Auth Token Authentication
Users can access Webhook resources by providing authtokens with requests. Manage users and authtokens by adding or editing a user on the Users tab, and navigating to the Authentication tab. Before users can call the Webhook endpoint, you must also set trusted IP addresses for connections. Set these in the Trusted IP Addresses section of the Server tab. By default, all IP addresses are restricted.Using Auth Tokens in Basic Authentication
Enter the user’s authtoken as the password when using Basic Authentication.Using Auth tokens in the HTTP Header
Add the HTTP headerx-{companyName}-authtoken with the authtoken as part of the HTTP request.
Using Auth Tokens as Query String Parameters
To allow the connector to pass the authtoken in query string parameters, check Allow authtoken in URL in the Advanced Settings section of the Server tab. After enabling this feature, you can specify the authtoken as the value of the@authtoken parameter, which you supply as part of the HTTP form-post data or as a query parameter.
OAuth 2.0 Authentication
Users can secure Webhook resources using OAuth 2.0 authentication. Manage users and OAuth credentials by adding or editing a user on the Users tab, and navigating to the Authentication tab.Receiving Data
When data is uploaded to the webhook endpoint, the body of the web request is written as an output file and passed along to the next connector in the flow. This allows for a flexible method of invoking an Arc workflow via an external API call.Custom Responses
Ordinarily, the Webhook connector accepts the post data with a token response that the request was accepted, but you can customize the response by using theResponse event, where the _request, _httpheaders, _response, and _message special items are available. When specified, the connector expects the custom response to be provided through the _response item.
You can also use the Response event to push custom output items using the following attributes:
- Filename: The filename of the output message to pass down the flow.
- Data: The data to include in the message that is passed down the flow. For binary data, use the Base64Data attribute instead.
- Base64Data: The Base64-encoded data to include in the message that is passed down the flow.
- HeaderNames#: A list of header names to include on the message that is passed down the flow. Use the HeaderValues attribute to specify values for these headers at the matching index.
- HeaderValues#: A list of header values to include on the message that is passed down the flow. These values are used for the header names defined at the matching index in the HeaderNames list.
- Logs#: A list of log entries to include in the logs for the transaction.
Response Examples
To push a file containing the body of the webhook request, with a custom filename and header, down the flow, the ArcScript in theResponse event might look like this:
Response event. To surface a header on the incoming request as a header on the message that is passed down the flow, the ArcScript in the Response event might look like this:
Response event, a client can send a request similar to the following: