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
- 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
Parameter | Description | Data 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.
| 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:
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 |
Considerations and limitations
- Consider the following when authoring an output with OAuth:
- Multiple requests to an authorization server and the associated data endpoint occur during authoring. Some APIs implement rate limiting for certain requests and this may affect authoring the output.
- For security reasons, access token request POST body must be reconfigured when editing the authentication parameters.
- The web server must be externally accessible on the internet.