Skip to content
URL:
https://<root>/services/serviceName/VideoServer/layerId/query
Methods:
POST
Version Introduced:
12.0

Description

The query operation queries a video service layer and returns its spatial information.

Request parameters

ParameterDetails

id

(Required)

The service name must be input in the form of a string.

layerId

(Optional)

The ID of the layer specifically targeted for the query.

geometryType

(Required)

The type of geometry specified by the geometry parameter. The geometry type can be an envelope, a point, a line, or a polygon. The default geometry type is an envelope.

Values: esriGeometryPoint | esriGeometryPolyline | esriGeometryPolygon | esriGeometryEnvelope

geometry

(Required)

The geometry to apply as the spatial filter for a query. The different geometry object types include esriGeometryPoint, esriGeometryPolyline, esriGeometryPolygon, and esriGeometryEnvelope. More information can be found in the Geometry Objects and Query Feature Service Layer documentation. Additional JSON examples are also available at these locations.

Example JSON syntax for the esriGeometryPolygon type:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
geometry={
"rings":
[
  [
    [ -123.137633,  49.262336],
    [ -122.423569,  30.612065],
    [-72.337101, 18.545215],
    [-51.793489, 64.188779],
    [-123.137633,  49.262336]
  ]
 ]
}

spatialRel

(Optional)

The spatial operation to test. The query operation currently only supports testing the esriSpatialRelIntersects spatial operation.

time

(Optional)

Time range within the on-demand video layer to search for intersections with the provided geometry. The format is startTime,endTime. Input should be a Unix timestamp in milliseconds.

f

(Optional)

The output format for this operation. The default value is html.

Values: html | json | pjson

token

(Required)

Users interacting programmatically with this endpoint must generate a token that must be included as a request parameter. A token can be obtained using the Generate Token operation.

Response properties

PropertyDetails

results

The results of the query, outputting four additional properties: duration, offset, startTime, and startTimeAsDate.

duration

The duration of time in which the geometry input in the query request is available in the chosen service.

offset

The offset of the geometry provided in the query.

startTime

The start time at which the requested geometry appears, written out in a Unix timestamp in milliseconds.

startTimeAsDate

The start time at which the requested geometry appears, written out in a standard format.

Example usage

The following is a sample POST request for the query operation:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
POST /arcgis/rest/services/sampleService/VideoServer/01/query HTTP/1.1
Host: organization.example.com:21443
Content-Type: application/x-www-form-urlencoded
Content-Length: []

geometry={
  "rings":
  [
    [
      [ -123.137633,  49.262336],
      [ -122.423569,  30.612065],
      [-72.337101, 18.545215],
      [-51.793489, 64.188779],
      [-123.137633,  49.262336]
    ]
  ]
}&geometryType=esriGeometryPolygon&spatialRel=esriSpatialRelIntersects&f=pjson

JSON Response syntax

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
{
{"results": [{
    "duration": <length of time>,
    "offset": <offset integer>,
    "startTime": <startTime>,
    "startTimeAsDate": "<date in DAY|MONTH|DATE|TIME|TIMEZONE|YEAR format>"
}]}
}

JSON Response example

Use dark colors for code blocksCopy
1
2
3
4
5
6
{"results": [{
    "duration": 83200,
    "offset": 0,
    "startTime": 1348087244105,
    "startTimeAsDate": "Wed Sep 19 16:40:44 EDT 2012"
}]}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.