Stream Services

Description

LicenseLicense:

As of 10.5, you must license your ArcGIS Server as an ArcGIS GeoEvent Server in order to use this resource.

A stream service is a type of ArcGIS GeoEvent Server service that emphasizes low latency, real-time data dissemination for client and server data flows.

ArcGIS GeoEvent Server must be licensed and installed in your enterprise GIS in order to leverage stream services. In the initial release (10.3), stream service content can be incorporated into ArcGIS Online web maps as well as exposed through clients developed using the ArcGIS API for JavaScript. Future releases will support a wider variety of client subscriptions.

See What is ArcGIS GeoEvent Server? for more information on ArcGIS GeoEvent Server.

Hosting a stream service on ArcGIS GeoEvent Server enables 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 on stream services.

Request parameters

Parameter

Details

f

The response format. The default response format is html.

Values: html | json | jsapi

Example usage

The URL to query a hypothetical service named Aircraft Locations on a local ArcGIS GeoEvent Server:

https://myserver.mydomain.com/arcgis/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",
            // A 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"
}