External API task
The external API task allows your workflows to securely interact with external REST APIs.

How the external API task works
When the workflow reaches an external API task, the Collibra Edge Session Manager sends the request defined in the task to the external API. The Session Manager processes the request using the configured connection details, authentication, and task-specific details.
The final request URL is constructed by concatenating the Host defined in the Edge HTTP connection with the Path defined in the external API task. For example, a host of https://api.example.com and a path of /v1/resource result in a request to https://api.example.com/v1/resource.
The response from the external API is captured and stored in a process variable. The variable name is determined as follows:
<Model_ID>ResponseBody, for exampleHttpTask_1ResponseBody, if you have not specified a Response variable name.The Response variable name defined in the external API task configuration.
Execution and response handling
The external API task treats all HTTP responses as successful, including 4xx and 5xx status codes. The workflow always continues to the next task, regardless of the response status code. To act on a specific status code, you must explicitly inspect the response in your workflow design.
The API tasks are always executed as asynchronous activities. As a result, any changes made in activities before these tasks are committed to Collibra, including any preparation of the input for the API task.
The API task component treats all response status codes as successful, including 4xx and 5xx. To handle a particular response status code, use the Handle status codes attribute and place an ErrorBoundaryEvent with the appropriate error code, such as HTTP400 on the API task component. This approach provides flexibility to define an error handling pathway, which may include actions such as:
Ending the workflow.
Logging relevant information.
Assigning a task to a system administrator for further investigation.
Using the Fail status codes property causes the workflow to enter an error state as it attempts to revert to the last successful state. Due to the asynchronous execution of the API task, the workflow is unable to progress further, effectively halting its execution.
Workflow exceptions
The workflow stops with an error at the instance level in case of an exception such as:
Pre-validation:
Unsupported Request Format
Edge HTTP Connection Not Provided
Edge HTTP Connection Not Found
Request Sending Error
Request Timeout
Response Size Exceeded
Important considerations
The request timeout is limited to 10 seconds.
The external API task runs in asynchronous mode only.
The maximum allowed response size is 100KB.
The supported request and response formats are XML, JSON, and plain text.
Retry is limited to 3 times, only if the HTTP request fails to be sent, since
4xxand5xxresponse codes are also considered successful.Any
Authorizationheader defined in the Headers configuration of the task is removed. You must configure authentication through the Edge HTTP connection.The Edge vault stores credentials for Edge capabilities only and is not accessible from workflow HTTP tasks.
Troubleshooting null response from a valid endpoint
If an external API task consistently returns a null response even though the same request succeeds in a REST client such as Postman, the target API may not support HTTP response streaming. By default, the Edge Session Manager streams responses. To disable streaming, a Collibra or Edge administrator can run the following Edge CLI command:
Prerequisites
You have created an HTTP connection on an Edge or Collibra Cloud site in Collibra.
General properties
Model ID
The unique identifier of the element within the process model.
Name
The name of the element displayed in the diagram.
Documentation
A description and any additional information about this element.
Edge HTTP connection name
The name of the Edge HTTP connection that contains the connection details and credentials.
Request method
The method of the request: GET, POST, PUT, DELETE, or PATCH.
Request headers
Line-separated HTTP request headers, such as Content-Type:application/json.
Request path
The relative path of the API endpoint.
You can use expressions such as ${requestPath} or /api/endpoint/${expression}.
You can add query parameters in key=value format by appending them after a ? to the path and separating multiple parameters by &, for example /api/endpoint?limit=10&status=${expression}.
Request body
The body of the request, such as a JSON file which can also contain expressions, for example: {'clientId': ${clientId}, 'name': ${name}}.
The supported formats are: XML, JSON, and plain text.
Fail status codes
A list of HTTP response status codes to fail the request and throw a runtime exception. You can set code ranges with an X, for example 400, 404, 5XX.
Handle status codes
A list of status codes for which the task will throw a BPMN error, which can be caught by a boundary error event. You can set code ranges with an X, for example 400, 404, 5XX. To handle exceptions raised by the call itself, such as timeouts, use Exception mappings.
Exception mappings
A list of mappings that turn an exception raised by the call, such as a timeout or a connection failure, into a BPMN error that you can catch with an error boundary event. Each mapping has an error code, an exception class, a root cause setting, and an include child exceptions setting. For example, a mapping on java.io.IOException with child exceptions included covers timeouts and refused connections. In the BPMN XML, the include child exceptions attribute is includeChildExceptions.
Response variable name
The name of the process variable to store the HTTP response.
If not specified, the response is stored in the default variable <HTTP_Task_Model_ID>ResponseBody, for example httpTask1ResponseBody.
Detail properties
Save request variables
Determines whether all the runtime fields related to the request should be stored as process variables, such as header, path, encoding, or body. By default, only fields related to the response are stored as variables.
Available variables:
ResponseReasonRequestUrlRequestHeadersRequestMethodDisallowRedirectsResponseProtocolResponseStatusCodeSaveResponseParametersRequestBodyEncodingRequestTimeoutFailStatusCodesHandleStatusCodesSaveRequestVariablesResponseHeadersRequestBodyIgnoreException
Save response details
Determines whether all the fields related to the response that are not the actual response in the body should be stored as process variables, including HTTP status, headers, and so on. By default, only the response body is stored as a variable.
Result variable prefix
A prefix that should be prepended to all the variables for easier grouping, which is useful when there are different API tasks.
Advanced properties
Skip expression
An expression which is evaluated before executing the task. If it evaluates to true, the task is skipped.
Execution listeners
Allows you to invoke Java logic after certain events:
Start: Executes after the activity has been started.
End: Executes after the activity was completed.
Transition: When defined on a sequence flow, executes once the flow is transition is taken.
Visual properties
Font size
The font size of the element in the diagram.
Font weight
The font weight of the element in the diagram.
Font style
The font style of the element in the diagram.
Font color
The font color of the element in the diagram.
Background color
The background color of the element in the diagram.
Border color
The border color of the element in the diagram.
Last updated
Was this helpful?