Call out to an HTTP endpoint from an Azure IoT Data Processor Preview pipeline

Important

Azure IoT Operations Preview – enabled by Azure Arc is currently in PREVIEW. You shouldn't use this preview software in production environments.

See the Supplemental Terms of Use for Microsoft Azure Previews for legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability.

Use the HTTP call out stage to call an external HTTP endpoint with an optional request body and receive an optional response. The call out stage lets you incorporate custom data processing logic, such as running machine learning models, into the pipeline processing.

  • Each partition in a pipeline independently executes the HTTP calls in parallel.
  • HTTP calls are synchronous, the stage waits for the call to return before continuing with further pipeline processing.

Prerequisites

To configure and use an aggregate pipeline stage, you need a:

  • Deployed instance of Azure IoT Data Processor Preview.
  • An HTTP server that's accessible from the Data Processor instance.

Configure an HTTP call out stage

The HTTP call out stage JSON configuration defines the details of the stage. To author the stage, you can either interact with the form-based UI, or provide the JSON configuration on the Advanced tab:

Name Type Description Required Default Example
Name string A name to show in the Data Processor UI. Yes - MLCall1
Description string A user-friendly description of what the call out stage does. No Call ML endpoint 1
Method string enum The HTTP method. No POST GET
URL string The HTTP URL. Yes - http://localhost:8080
Authentication string The authentication type to use. None/Username/Password/Header. Yes None None
Username string The username to use when Authentication is set to Username/Password. No - myusername
Secret string The secret reference for the password to use when Authentication is set to Username/Password. No - mysecret
Header key string The header key to use when Authentication is set to Header. The value must be authorization. No authorization authorization
Secret string The secret reference to use when Authentication is set to Header. No - mysecret
API Request > Data Format string The format the request body should be in and any serialization details. No - JSON
API Request > Path Path The Path to the property in the incoming message to send as the request body. Leave empty if you don't need to send a request body. No - .payload.httpPayload
API request > Header > Key1 Static/Dynamic field The header key to set in the request. No Static/Dynamic field
API request > Header > Value1 Static/Dynamic field The header value to set in the request. No Static/Dynamic field
API Response > Data Format string The format the response body is in and any deserialization details. No - JSON
API Response > Path Path The Path to the property in the outgoing message to store the response in. Leave empty if you don't need the response body. No - .payload.httpResponse
API Response > Header Path The Path to the property in the outgoing message to store the response header in. Leave empty if you don't need the response metadata. No - .payload.httpResponseHeader
API Response > Status Path The Path to the property in the outgoing message to store the response status in. Leave empty if you don't need the response status. No - .payload.httpResponseStatus

1API request > Header: Each element in the header array is a key value pair. You can set the key or value dynamically based on the content of the incoming message or as a static string.

Message formats

You can use the HTTP call out stage with any data format. Use the built-in serializer and deserializer to serialize and deserialize the supported data formats. Use Raw to handle other data formats.

Authentication

Currently, only header based authentication is supported.