HTTP

The HTTP output in ArcGIS Velocity allows you to send features and other text to an HTTP endpoint through POST, PUT, or DELETE requests. A request is sent for each output feature sent to the output.

Example

An analyst configures an HTTP output to send features in a custom JSON format to a designated webhook.

Usage notes

Keep the following in mind when working with the HTTP output:

  • When sending JSON in a request body, wrap the JSON with the Text() Arcade expression to properly format the JSON.
  • When using the HTTP output, it is important to understand the velocity of the data. Each record sent to the output generates a separate request. This can quickly overload the capacity or rate-limiting settings of a web server. Use the HTTP output for incidents expected to occur infrequently.
  • When using OAuth authentication:
    • The HTTP output type supports authentication using OAuth 2.0 for HTTP endpoints that follow the Client Credentials or Password grant types. These OAuth grant types follow a pattern that includes the configuration of an HTTP request to fetch an access token. During configuration of the access token request, you are prompted to identify the access token and expiration JSON key fields from the response from the OAuth authorization server. If an expiration is selected, you must define the expiration type (duration or time stamp) and units.
    • When returning to the configuration of the data request, you must use the $accessToken global variable to define where the access token will be used. This is often in an Authorization custom header with the Bearer $accessToken value.

Parameters

The following are the parameters for the HTTP output:

ParameterDescriptionData type

URL

The URL over which the output requests are sent.

String

HTTP method

The HTTP method for the request. Choices include POST, PUT, and DELETE

String

POST body

The JSON Arcade expression.

Arcade Expression

Content-Type

The content-type header for outgoing requests.

  • Plain Text: text/plain
  • JSON: application/json
  • CSV: text/csv
  • XML: text/xml

String

Authentication type

Choose between no authentication, Basic, or OAuth authentication.

If Basic authentication is configured, additional fields will appear to enter username and password.

If OAuth authentication is configured, a popup window will appear to configure:

  • Access token endpoint
  • HTTP method
  • URL parameters
  • Custom headers

Once the above are specified, the connection will be tested and you must click to identify the access token in the JSON response.

Various parameters

URL Parameters

Optional URL parameters that are included in the URL of the HTTP request sent to the specified website.

While parameters can also be set in the URL parameter above, the URL parameters entered here as separate parameters override any matching parameter supplied in the URL parameter.

URL parameters defined in this parameter will always be URL encoded.

Key-Value Pair

Custom headers

Optional custom headers that are included in the HTTP request sent to the specified website. For example, custom headers can be used to specify a third-party API key or authorization header.

Key-Value Pair

Additional logging

Optionally enable logging for raw HTTP requests and responses issued by Velocity.

Note:

This parameter should only be enabled for troubleshooting purposes and disabled when troubleshooting is complete. Once enabled, start the analytic and the debug level logs will be available on the analytic logs page. If necessary, contact Esri Technical Support for assistance with troubleshooting.

Boolean

Considerations and limitations

The following are considerations and limitations when using the HTTP output:

  • When using OAuth authentication:
    • Multiple requests to an authorization server and the associated data endpoint occur when creating an output. Some APIs implement rate limiting for certain requests and this may affect output creation.
    • For security reasons, the access token request POST body must be reconfigured when editing the authentication parameters.
  • The web server must be externally accessible on the internet.