|This article is the first of two articles examining enhancements made to the HTTP transport for the GeoEvent Server 10.5 release. This article examines the inbound transport. The second article examining the outbound transport can be found here.|
In this article, I would like to provide detail for an enhancement made to the HTTP inbound transport for the GeoEvent Server 10.5 release. The following capability is listed on the What's new in ArcGIS GeoEvent Server web help page:
Beginning with the 10.5 product release, an input leveraging the HTTP transport can be configured to support an external server or application which incorporates its data payload in the URL of the request (as opposed to the request’s content body).
The new capabilities of the HTTP transport will be described below with exercise steps you can follow to demonstrate the capabilities.
When you want to receive event records as an HTTP/POST request from an external server or application you typically configure an inbound connector – such as the Receive JSON on a REST Endpoint input. GeoEvent Server will create a REST endpoint to which the external server can post its event data with the event data included in the content body of the request. This capability has been available in the last several releases.
A device on the edge of the Internet of Things, however, might prefer to organize the event data as query parameters and incorporate its data payload in the URL of the request -- leaving the content body of the request empty. For example:
Beginning with the 10.5 product release an input pairing either the out-of-the-box JSON or TEXT adapter with the HTTP inbound transport can be configured to support the use cases above with an HTTP/GET request.
Exercise 1A – Use HTTP/GET requests to send event data to GeoEvent Server as query parameters
Note the new 10.5 parameter: Get Request Contains Raw Data
Review the help tip provided for this parameter. If the inbound connector is running in SERVER mode and receives an HTTP/GET request, if the request content body is empty and the request URL includes query parameters, the default (‘No’) will consider each name/value pair as a separate attribute value in an event record. If the default is changed to ‘Yes’ you will be expected to specify the one query parameter which will be considered the event’s raw data.
You can use any outbound connector which supports JSON event record displays. Recommended output connectors are ‘Send Features to a Stream Service’ or ‘Write to a JSON File’.
You should observe the event count of your ‘Receive JSON on a REST Endpoint’ input increment as HTTP/GET requests are made on your input’s REST endpoint
Exercise 1B – Explore HTTP/GET requests whose query parameters include comma delimited values
Rather than incorporating the event data into a series of key/value pairs, the event data can be conveyed using a single query parameter whose value is a set of comma delimited values. The delimited text values will require an inbound connector which leverages the TEXT adapter (rather than the JSON adapter used in the previous exercise).
GeoEvent Server does not include a “Receive TEXT on a REST Endpoint” inbound connector out-of-the-box, so you will need to configure one for this exercise.
|Shown Properties||Default Value|
|Event Separator||\n (newline)|
|Field Separator||, (comma)|
|Incoming Data Contains GeoEvent Definition||False|
|Create Unrecognized Event Definitions||False|
|Create Fixed GeoEvent Definitions||False|
|GeoEvent Definition Name (New)||[ no default value defined ]|
|GeoEvent Definition Name (Existing)||[ no default value defined ]|
|Language for Number Formatting||[ no default value defined ]|
|Advanced Properties||Default Value|
|Acceptable MIME Types (Server Mode)||text/plain|
|Expected Date Format||[ no default value defined ]|
|Build Geometry From Fields||False|
|X Geometry Field||[ no default value defined ]|
|Y Geometry Field||[ no default value defined ]|
|Z Geometry Field||[ no default value defined ]|
|Well Known Text Geometry Field||[ no default value defined ]|
|wkid Geometry Field||[ no default value defined ]|
|Get Request Contains Raw Data||True|
|Parameter Name for the Raw Data||data|
|Hidden Properties||Default Value|
|Use Long Polling||False|
|Frequency (in seconds)||[ no default value defined ]|
|Receive New Data Only||False|
|Post/Put body MIME Type||[ no default value defined ]|
|Header Parameter Name:Value List||( blank )|
|Post/Put Parameters||( blank )|
|Content Body||[ no default value defined ]|
|Parameters||[ no default value defined ]|
|URL||[ no default value defined ]|
|URL Proxy||[ no default value defined ]|
|Use URL Proxy||False|
|Acceptable MIME Types (Client Mode)||[ no default value defined ]|
|HTTP Timeout (in seconds)||30|
|Append to the End of Payload||[ no default value defined ]|
You should observe the event count of your ‘(Custom) Receive TEXT on a REST Endpoint’ input increment as HTTP/GET requests are made on your input’s REST endpoint.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.