Deli putem


Send data to an HTTP endpoint

Important

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

You will need to deploy a new Azure IoT Operations installation when a generally available release is made available, you won't be able to upgrade a preview installation.

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 destination to write processed and clean data to an HTTP endpoint for further processing.

When you send data to an HTTP endpoint from a destination stage, any response is discarded.

Prerequisites

To configure and use this destination pipeline stage, you need:

  • A deployed instance of the data processor that includes the optional data processor component.
  • An HTTP server that's accessible from the data processor instance.

Configure the destination stage

The HTTP destination 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:

Field Type Description Required? Default Example
url string URL for the request. Both HTTP and HTTPS are supported. Yes https://contoso.com/some/url/path
method string enum The HTTP method to use. One of: POST, PUT Yes POST
request Request An object that represents the request body and headers. No (empty) See Request
retry Retry The retry mechanism to use if the call fails. No (empty) {"type": "fixed"}
authentication Authentication type Authentication information for the endpoint. Supports none, usernamePassword, and header auth types. No {"type": "none"} {"type": "none"}

Request

Field Type Description Required? Default Example
body Object. Formatting information, including location where the body is located in the message. No (empty) {"type": "json", "path": ".payload"}
headers An array of objects. List of headers to send with the request. Keys and values can be static or dynamic. No [] See Examples

Sample configuration

The following JSON shows an example definition for an HTTP destination stage:

{
    "displayName": "HTTP Output Example",
    "description": "Sample HTTP output stage",
    "type": "output/http@v1",
    "url": "https://contoso.com/some/url/path",
    "method": "POST",
    "request": {
        "body": {
            "format": "json",
            "path": ".payload",
        },
        "headers": [
            {
                "key": {
                    "type": "static",
                    "value": "asset"
                },
                "value": {
                    "type": "dynamic",
                    "value": ".payload.assetId"
                }
            },
            {
                "key": {
                    "type": "static",
                    "value": "revision"
                },
                "value": {
                    "type": "static",
                    "value": "12"
                }
            }
        ]
    },
    "retry": {
        "type": "fixed",
        "interval": "20s",
        "maxRetries": 4
    },
    "next": ["next-stage-id"]
}