- URL:https://<catalog-url>/<serviceName>/StreamServer
- Operations:Broadcast, Subscribe
- Required Capability:Streaming
- Version Introduced:10.3
Description
License:
ArcGIS Servermust be licensed as an ArcGIS GeoEvent Server to use this resource.
A stream service is a type of ArcGIS GeoEvent Server service that emphasizes low latency and real-time data dissemination for client and server data flows.
ArcGIS GeoEvent Server must be licensed and installed in your enterprise GIS to use stream services. In the initial release, stream service content can be used in ArcGIS Online web maps as well as clients developed using the ArcGIS API for JavaScript. Future releases will support a wider variety of client subscriptions. See Introduction to ArcGIS GeoEvent Server for more information.
Hosting a stream service on ArcGIS GeoEvent Server allows administrators to broadcast event data over the stream service and enables clients to subscribe to a stream service and immediately begin receiving data.
The REST API stream service resource provides basic information about the service including event attribute fields, geometry type, and WebSocket resources used by the service.
See Stream services for more information.
Request parameters
Parameter | Details |
---|---|
f | The response format. The default response format is html. Values: html | json | jsapi |
Example usage
The following is a sample request URL used to query a hypothetical service named AircraftLocations on a local ArcGIS GeoEvent Server:
https://machine.domain.com/webadaptor/rest/services/AircraftLocations/StreamServer?f=pjson
JSON Response example
{
"currentVersion": "10.3",
"description": "Flights",
"objectIdField": null,
"timeInfo": {
"trackIdField": "AircraftId",
"startTimeField": null,
"endTimeField": null
},
"geometryType": "esriGeometryPoint",
"geometryField": "Location",
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
},
"drawingInfo": {
"renderer": {
"type": "simple",
"description": "",
"symbol": {
"type": "esriSMS",
"style": "esriSMSCircle",
"color": [
5,
112,
176,
204
],
"size": 10,
"angle": 0,
"xoffset": 0,
"yoffset": 0,
"outline": {
"color": [
255,
255,
255,
255
],
"width": 1
}
}
}
},
"fields": [
{
"name": "FltId",
"type": "esriFieldTypeString",
"alias": "FltId",
"nullable": true
},
{
"name": "DepArpt",
"type": "esriFieldTypeString",
"alias": "DepArpt",
"nullable": true
},
{
"name": "MsgTime",
"type": "esriFieldTypeDate",
"alias": "MsgTime",
"nullable": true
},
{
"name": "Heading",
"type": "esriFieldTypeInteger",
"alias": "Heading",
"nullable": true
},
{
"name": "AltitudeFeet",
"type": "esriFieldTypeInteger",
"alias": "AltitudeFeet",
"nullable": true
},
{
"name": "FID",
"type": "esriFieldTypeInteger",
"alias": "FID",
"nullable": true
}
],
// if snapshot archiving was enabled during publishing
"keepLatestArchive": {
"featuresUrl": "https://host:port/arcgis/rest/services/FltArc/FeatureServer/0",
"updateInterval": 10,
"maximumFeatureAge": 60,
"datastore": null
},
// if related features service URL was specified during publishing
"relatedFeatures": {
"featuresUrl": "https://host:port/arcgis/rest/services/FltLoc/FeatureServer/0",
"joinField": "FltId"
},
"streamUrls": [
{
"transport": "ws",
// An access token with an expiration of 5 minutes if the service is secured
"token": "kAZQCVDbCHCiWk9__LOBgwa6fjw6uDbqh",
"urls": [
"ws(s)://machine:port/arcgis/ws/services/Flights/StreamServer"
]
}
],
"capabilities": "broadcast,subscribe"
}