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

Description

The clip operation creates a video clip of a specified time range from a video layer.

Request parameters

ParameterDetails

timeRange

(Required)

A JSON object that defines the time range for the video clip. The JSON object must include the start and end properties, the values of which represent the time, in seconds, where the clip begins and ends.

Use dark colors for code blocksCopy
1
2
3
4
timeRange={
  "start": "0",
  "end": "2"
}

expiry

(Required)

The amount of time, in seconds, the clip will remain in file storage after it is created. The minimum value is 0. The maximum value is "999999999".

Use dark colors for code blocksCopy
1
expiry=60

quality

(Optional)

The clip's video resolution quality. The quality cannot be higher than that of the original video. If this parameter is undefined, the clip will default to the original video layer's resolution.

Values: SD | HD | FHD | UHD

async

(Required)

Determines whether the createClip operation is run synchronously or asynchronously.

Values: true | false

name

(Optional)

The name of the output video clip file. A default name is provided if this parameter is left empty.

format

(Required)

The file format for the output video clip.

Values: mov | ts | mp4

f

(Required)

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.

Example usage

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

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

timeRange={
  "start": "0",
  "end": "2"
}&expiry=60&quality=SD&async=true&name=TestClip&format=ts&f=pjson&token=<token>

JSON Response syntax

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
{
    "success": true | false,
    "results": {
        "created": value,
        "expiration": value,
        "url": "<link to created video clip>"
    }
}

JSON Response example

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
{
    "success": true,
    "results": {
        "created": 1758026321814,
        "expiration": 1758026381814,
        "url": "https://organization.example.com/video/rest/services/onDemand_Sample/VideoServer/0/clip/testClip.ts"
    }
}

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