Skip to content

Get Operations

All requests sent to the /api/v1/videos:process endpoint are asynchronous, with each returning an operation name like:

projects/{project-id}/locations/{location-id}/operations/{operation-id}

This name is used to both identify a specific Redactor project, and to inspect the status of the operation.

HTTP Request

GET /api/v1/{operation-name)

Path Parameters

projects/{project-id}/locations/{location-id}/operations/{operation-id}

Response Body

When the value of the "done" field is true, the operation is complete and either the response or error will contain additional information.

RESPONSE SCHEMA: application/json
name string<operationName>
projects/{project-id}/locations/{location-id}/operations/{operation-id}
metadata object
done boolean
response object
error object

Samples

Complete

{
  "name": "projects/0/locations/0/operations/123",
  "metadata": {
    "@type": "sighthound.cloud.v1.Progress",
    "progress": {
      "inputUri": "https://example.com/path/to/video.mp4",
      "progressPercent": 100,
      "startTime": "2020-04-01T22:13:17.978847Z",
      "updateTime": "2020-04-01T22:13:17.978847Z"
    }
  },
  "done": true,
  "response": {
    "@type": "sighthound.cloud.v1.ProcessResponse",
    "processResults": {
      "outputUri": "s3://bucket-name/key-name/"
    }
  }
}

Pending/Progress

{
  "name": "projects/0/locations/0/operations/123",
  "metadata": {
    "@type": "sighthound.cloud.v1.Progress",
    "progress": {
      "inputUri": "https://example.com/path/to/video.mp4",
      "progressPercent": 30,
      "startTime": "2020-04-01T22:13:17.978847Z",
      "updateTime": "2020-04-01T22:13:17.978847Z"
    }
  },
  "done": false
}

Error

{
  "name": "projects/0/locations/0/operations/123",
  "metadata": {
    "@type": "sighthound.cloud.v1.Progress",
    "progress": {
      "inputUri": "https://example.com/path/to/video.mp4",
      "progressPercent": 100,
      "startTime": "2020-04-01T22:13:17.978847Z",
      "updateTime": "2020-04-01T22:13:17.978847Z"
    }
  },
  "done": true,
  "error": {
    "code": 123,
    "message": "corrupt media"
  }
}