clip

Create clip

Request creation of a recording clip for the given camera. Clip processing is asynchronous — the response will have status PENDING. Poll cameras/{camera_id}/clips/{clip_id}/ until status reaches READY or ERROR. The maximum clip length is 3 hours.

post/cameras/{camera_id}/clips/

Request

  • Base URL
    https://api.angelcam.com/v1
  • Auth
    • OAuth 2
      Authorization codehttps://my.angelcam.com/oauth/authorize/, token URL https://my.angelcam.com/oauth/token/
      PasswordToken URL https://api.angelcam.com/oauth/token/
      Scopesrecording_clips_access, recording_clips_create
    • or API key in header Authorization
  • TypeScript
    A function with typed inputs. Its response is checked against the schema.

Path parameters

camera_idinteger required

Camera ID

Request body

namestring required

Clip name

startstring date-time required

Start time of clip (ISO 8601)

endstring date-time required

End time of clip (ISO 8601)

recordingstring uuid

Optional recording_id; if not specified, continuous recording will be used

Example request

{
  "name": "Frontdoor loitering",
  "start": "2017-01-01T00:00:00.000Z",
  "end": "2017-01-01T00:25:00.000Z"
}

Response

Clip request was received and clip processing will start

idstring required

Clip UUID

created_byinteger required

User who created the clip

created_atstring required

Time when the clip was created

namestring required

Clip name

status'PENDING' | 'BUILDING' | 'SCREENSHOTTING' | 'READY' | 'ERROR' required

Status of clip processing

startstring required

Start time of the clip

endstring required

End time of the clip

sharing_tokenstring required

Security token for sharing the clip without authentication (UUID)

snapshotsstring[] required

List of URLs of snapshot images (JPEG) taken from the beginning of the clip. The snapshots are generated automatically during clip processing and can be used as a thumbnail/preview of the clip. The list is empty until the clip reaches the SCREENSHOTTING stage, and it may stay empty if the snapshot could not be taken. The URLs contain a security token valid for a limited time.

download_urlstring required

URL for download of the clip as TS/MP4 file (TS for HLS cameras, MP4 for MJPEG cameras). The URL contains security token valid for a limited time.

Example response

{
  "id": "b9aad334-07ba-4660-9f18-041875ec1ea4",
  "created_by": 1,
  "name": "Frontdoor loitering",
  "status": "READY",
  "sharing_token": "cd13975b-0b08-48f5-bd39-3f7d2a0c935a",
  "start": "2017-01-01T00:00:20.000Z",
  "end": "2017-01-01T00:25:20.000Z",
  "created_at": "2017-02-01T02:37:21.000Z",
  "snapshots": [
    "https://recording-us-west-2.s3.amazonaws.com/clips/b9aad334-07ba-4660-9f18-041875ec1ea4.jpg?AWSAccessKeyId=AKIAIOSFODNN7EXAMPLE&Signature=NpgCO4tLYjQmhLpq7QgCGkl6EXAMPLE%3D&Expires=1576753567"
  ],
  "download_url": "https://rust-streamer-us-west-2-07489f9b03f198b91.angelcam.com/clips/b986b0c8-05c2-4c59-8fdd-8afd7bbfa2bf/download/?start=2019%2D12%2D09T14%3A19%3A59%2B00%3A00&end=2019%2D12%2D09T14%3A20%3A29%2B00%3A00&token=eyJ0aW1lIjoxNTc2NzUyMzY3LCJ0aW1lb3V0IjoxMjAwfQ%3D%3D%2E1c5903efe76af570bea4ef5edf49c39f5afc1ce2c1aaf79e85ad5d140c8c3f42&filename=Frontdoor%20loitering"
}

Changes

No recorded changes to this operation across all 1 revision of this API.