{
  "swagger": "2.0",
  "info": {
    "title": "Video file service",
    "version": "0.1507.0",
    "description": "Send your API key as a bearer token: `Authorization: Bearer <api key>`."
  },
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "securityDefinitions": {
    "ApiKey": {
      "type": "apiKey",
      "in": "header",
      "name": "Authorization",
      "description": "Your API key as a bearer token: `Authorization: Bearer <api key>`."
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ],
  "paths": {
    "/video-files/v1/video-files": {
      "post": {
        "operationId": "VideoFileService_create",
        "summary": "Create",
        "tags": [
          "Video File Service"
        ],
        "description": "Create and persist a video file entity with the given metadata",
        "deprecated": true,
        "x-deprecated": "Legacy VideoFile-entity API. Videos are now channels on datasets and their files are Catalog dataset files; videoV2 ingest records files in the Catalog directly, so no standalone VideoFile is created.",
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/CreateVideoFileRequest"
            },
            "required": true,
            "x-example": {
              "title": "<title>",
              "originMetadata": {
                "source": {
                  "type": "s3",
                  "s3": "<s3 path>"
                },
                "timestampManifest": {
                  "type": "mcap",
                  "mcap": {
                    "mcapChannelLocator": {
                      "type": "topic",
                      "topic": "<mcap channel topic>"
                    }
                  }
                }
              },
              "videoRid": "<video rid>",
              "rawFileSize": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/VideoFile"
            },
            "x-example": {
              "rid": "<video file rid>",
              "videoRid": "<video rid>",
              "title": "<title>",
              "description": "<description>",
              "createdBy": "<created by>",
              "createdAt": "2026-01-01T00:00:00Z",
              "originMetadata": {
                "source": {
                  "type": "s3",
                  "s3": "<s3 path>"
                },
                "timestampManifest": {
                  "type": "mcap",
                  "mcap": {
                    "mcapChannelLocator": {
                      "type": "topic",
                      "topic": "<mcap channel topic>"
                    }
                  }
                }
              },
              "segmentMetadata": {
                "rid": "<video file rid>",
                "numFrames": 1,
                "numSegments": 1,
                "scaleFactor": 1,
                "minAbsoluteTimestamp": {
                  "seconds": 1,
                  "nanos": 1
                },
                "maxAbsoluteTimestamp": {
                  "seconds": 1,
                  "nanos": 1
                },
                "mediaDurationSeconds": 1,
                "mediaFrameRate": 1
              }
            }
          }
        }
      }
    },
    "/video-files/v1/video-files/{videoFileRid}": {
      "get": {
        "operationId": "VideoFileService_get",
        "summary": "Get",
        "tags": [
          "Video File Service"
        ],
        "description": "Returns video file metadata associated with a video file RID.",
        "deprecated": true,
        "x-deprecated": "Legacy VideoFile-entity API. Videos are now channels on datasets and their files are Catalog dataset files; read the file with CatalogService#getDatasetFile.",
        "parameters": [
          {
            "name": "videoFileRid",
            "in": "path",
            "type": "string",
            "format": "rid",
            "x-alias": "VideoFileRid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/VideoFile"
            },
            "x-example": {
              "rid": "<video file rid>",
              "videoRid": "<video rid>",
              "title": "<title>",
              "description": "<description>",
              "createdBy": "<created by>",
              "createdAt": "2026-01-01T00:00:00Z",
              "originMetadata": {
                "source": {
                  "type": "s3",
                  "s3": "<s3 path>"
                },
                "timestampManifest": {
                  "type": "mcap",
                  "mcap": {
                    "mcapChannelLocator": {
                      "type": "topic",
                      "topic": "<mcap channel topic>"
                    }
                  }
                }
              },
              "segmentMetadata": {
                "rid": "<video file rid>",
                "numFrames": 1,
                "numSegments": 1,
                "scaleFactor": 1,
                "minAbsoluteTimestamp": {
                  "seconds": 1,
                  "nanos": 1
                },
                "maxAbsoluteTimestamp": {
                  "seconds": 1,
                  "nanos": 1
                },
                "mediaDurationSeconds": 1,
                "mediaFrameRate": 1
              }
            }
          }
        }
      },
      "put": {
        "operationId": "VideoFileService_update",
        "summary": "Update",
        "tags": [
          "Video File Service"
        ],
        "description": "Updates the metadata for a video file associated with the given RID.",
        "deprecated": true,
        "x-deprecated": "Legacy VideoFile-entity API. Videos are now channels on datasets and their files are Catalog dataset files; update title, start, and scale with VideoService#batchUpdateVideoChannelDatasetFiles addressed by datasetRid.",
        "parameters": [
          {
            "name": "videoFileRid",
            "in": "path",
            "type": "string",
            "format": "rid",
            "x-alias": "VideoFileRid",
            "required": true
          },
          {
            "name": "request",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/UpdateVideoFileRequest"
            },
            "required": true,
            "x-example": {
              "title": "<title>",
              "description": "<description>",
              "startingTimestamp": {
                "seconds": 1,
                "nanos": 1
              },
              "scaleParameter": {
                "type": "trueFrameRate",
                "trueFrameRate": 1
              },
              "segmentedFilesSize": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/VideoFile"
            },
            "x-example": {
              "rid": "<video file rid>",
              "videoRid": "<video rid>",
              "title": "<title>",
              "description": "<description>",
              "createdBy": "<created by>",
              "createdAt": "2026-01-01T00:00:00Z",
              "originMetadata": {
                "source": {
                  "type": "s3",
                  "s3": "<s3 path>"
                },
                "timestampManifest": {
                  "type": "mcap",
                  "mcap": {
                    "mcapChannelLocator": {
                      "type": "topic",
                      "topic": "<mcap channel topic>"
                    }
                  }
                }
              },
              "segmentMetadata": {
                "rid": "<video file rid>",
                "numFrames": 1,
                "numSegments": 1,
                "scaleFactor": 1,
                "minAbsoluteTimestamp": {
                  "seconds": 1,
                  "nanos": 1
                },
                "maxAbsoluteTimestamp": {
                  "seconds": 1,
                  "nanos": 1
                },
                "mediaDurationSeconds": 1,
                "mediaFrameRate": 1
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "VideoFileService_delete",
        "summary": "Delete",
        "tags": [
          "Video File Service"
        ],
        "description": "Permanently deletes a video file and all associated segments from the database. This operation cannot be undone.",
        "deprecated": true,
        "x-deprecated": "Legacy VideoFile-entity API. Videos are now channels on datasets and their files are Catalog dataset files; delete the file with IngestService#deleteFile.",
        "parameters": [
          {
            "name": "videoFileRid",
            "in": "path",
            "type": "string",
            "format": "rid",
            "x-alias": "VideoFileRid",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          }
        }
      }
    },
    "/video-files/v1/video-files/batchGet": {
      "post": {
        "operationId": "VideoFileService_batchGet",
        "summary": "Batch get",
        "tags": [
          "Video File Service"
        ],
        "description": "Returns all video files and their metadata associated with the given RIDs",
        "deprecated": true,
        "x-deprecated": "Legacy VideoFile-entity API. Videos are now channels on datasets and their files are Catalog dataset files; read the files with CatalogService#batchGetDatasetFiles.",
        "parameters": [
          {
            "name": "videoFileRids",
            "in": "body",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "rid",
                "x-alias": "VideoFileRid"
              },
              "uniqueItems": true,
              "example": [
                "<video file rid>"
              ]
            },
            "required": false,
            "x-example": [
              "<video file rid>"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/VideoFile"
              },
              "uniqueItems": true
            },
            "x-example": [
              {
                "rid": "<video file rid>",
                "videoRid": "<video rid>",
                "title": "<title>",
                "description": "<description>",
                "createdBy": "<created by>",
                "createdAt": "2026-01-01T00:00:00Z",
                "originMetadata": {
                  "source": {
                    "type": "s3",
                    "s3": "<s3 path>"
                  },
                  "timestampManifest": {
                    "type": "mcap",
                    "mcap": {
                      "mcapChannelLocator": {
                        "type": "topic",
                        "topic": "<mcap channel topic>"
                      }
                    }
                  }
                },
                "segmentMetadata": {
                  "rid": "<video file rid>",
                  "numFrames": 1,
                  "numSegments": 1,
                  "scaleFactor": 1,
                  "minAbsoluteTimestamp": {
                    "seconds": 1,
                    "nanos": 1
                  },
                  "maxAbsoluteTimestamp": {
                    "seconds": 1,
                    "nanos": 1
                  },
                  "mediaDurationSeconds": 1,
                  "mediaFrameRate": 1
                }
              }
            ]
          }
        }
      }
    },
    "/video-files/v1/video-files/list-files-in-video": {
      "post": {
        "operationId": "VideoFileService_listFilesInVideo",
        "summary": "List files in video",
        "tags": [
          "Video File Service"
        ],
        "description": "Returns all video files and their metadata associated with the given video RID.",
        "deprecated": true,
        "x-deprecated": "Use listFilesInVideoPaginated for legacy videos, or VideoService#listVideoChannelDatasetFiles for videos as dataset channels.",
        "parameters": [
          {
            "name": "videoRid",
            "in": "body",
            "schema": {
              "type": "string",
              "format": "rid",
              "x-alias": "VideoRid",
              "example": "<video rid>"
            },
            "required": true,
            "x-example": "<video rid>"
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/VideoFile"
              },
              "uniqueItems": true
            },
            "x-example": [
              {
                "rid": "<video file rid>",
                "videoRid": "<video rid>",
                "title": "<title>",
                "description": "<description>",
                "createdBy": "<created by>",
                "createdAt": "2026-01-01T00:00:00Z",
                "originMetadata": {
                  "source": {
                    "type": "s3",
                    "s3": "<s3 path>"
                  },
                  "timestampManifest": {
                    "type": "mcap",
                    "mcap": {
                      "mcapChannelLocator": {
                        "type": "topic",
                        "topic": "<mcap channel topic>"
                      }
                    }
                  }
                },
                "segmentMetadata": {
                  "rid": "<video file rid>",
                  "numFrames": 1,
                  "numSegments": 1,
                  "scaleFactor": 1,
                  "minAbsoluteTimestamp": {
                    "seconds": 1,
                    "nanos": 1
                  },
                  "maxAbsoluteTimestamp": {
                    "seconds": 1,
                    "nanos": 1
                  },
                  "mediaDurationSeconds": 1,
                  "mediaFrameRate": 1
                }
              }
            ]
          }
        }
      }
    },
    "/video-files/v1/video-files/list-files-in-video-paginated": {
      "post": {
        "operationId": "VideoFileService_listFilesInVideoPaginated",
        "summary": "List files in video paginated",
        "tags": [
          "Video File Service"
        ],
        "description": "Returns a paginated list of all video files and their metadata associated with the given video RID.",
        "deprecated": true,
        "x-deprecated": "Legacy VideoFile-entity API. Videos are now channels on datasets and their files are Catalog dataset files; list the files backing a channel with VideoService#listVideoChannelDatasetFiles.",
        "parameters": [
          {
            "name": "videoRid",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/ListFilesInVideoRequest"
            },
            "required": true,
            "x-example": {
              "videoRid": "<video rid>"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/ListFilesInVideoResponse"
            },
            "x-example": {
              "files": [
                {
                  "rid": "<video file rid>",
                  "videoRid": "<video rid>",
                  "title": "<title>",
                  "description": "<description>",
                  "createdBy": "<created by>",
                  "createdAt": "2026-01-01T00:00:00Z",
                  "originMetadata": {
                    "source": {
                      "type": "s3",
                      "s3": "<s3 path>"
                    },
                    "timestampManifest": {
                      "type": "mcap",
                      "mcap": {
                        "mcapChannelLocator": {
                          "type": "topic",
                          "topic": "<mcap channel topic>"
                        }
                      }
                    }
                  },
                  "segmentMetadata": {
                    "rid": "<video file rid>",
                    "numFrames": 1,
                    "numSegments": 1,
                    "scaleFactor": 1,
                    "minAbsoluteTimestamp": {
                      "seconds": 1,
                      "nanos": 1
                    },
                    "maxAbsoluteTimestamp": {
                      "seconds": 1,
                      "nanos": 1
                    },
                    "mediaDurationSeconds": 1,
                    "mediaFrameRate": 1
                  }
                }
              ],
              "nextPageToken": "<token>"
            }
          }
        }
      }
    },
    "/video-files/v1/video-files/batch-update": {
      "post": {
        "operationId": "VideoFileService_batchUpdate",
        "summary": "Batch update",
        "tags": [
          "Video File Service"
        ],
        "description": "Updates metadata for multiple video files in a single video.",
        "deprecated": true,
        "x-deprecated": "Legacy VideoFile-entity API. Videos are now channels on datasets and their files are Catalog dataset files; update title, start, and scale with VideoService#batchUpdateVideoChannelDatasetFiles addressed by datasetRid.",
        "parameters": [
          {
            "name": "request",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/BatchUpdateVideoFilesRequest"
            },
            "required": true,
            "x-example": {
              "videoRid": "<video rid>"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/BatchUpdateVideoFilesResponse"
            },
            "x-example": {
              "files": [
                {
                  "rid": "<video file rid>",
                  "videoRid": "<video rid>",
                  "title": "<title>",
                  "description": "<description>",
                  "createdBy": "<created by>",
                  "createdAt": "2026-01-01T00:00:00Z",
                  "originMetadata": {
                    "source": {
                      "type": "s3",
                      "s3": "<s3 path>"
                    },
                    "timestampManifest": {
                      "type": "mcap",
                      "mcap": {
                        "mcapChannelLocator": {
                          "type": "topic",
                          "topic": "<mcap channel topic>"
                        }
                      }
                    }
                  },
                  "segmentMetadata": {
                    "rid": "<video file rid>",
                    "numFrames": 1,
                    "numSegments": 1,
                    "scaleFactor": 1,
                    "minAbsoluteTimestamp": {
                      "seconds": 1,
                      "nanos": 1
                    },
                    "maxAbsoluteTimestamp": {
                      "seconds": 1,
                      "nanos": 1
                    },
                    "mediaDurationSeconds": 1,
                    "mediaFrameRate": 1
                  }
                }
              ]
            }
          }
        }
      }
    },
    "/video-files/v1/video-files/{videoFileRid}/archive": {
      "put": {
        "operationId": "VideoFileService_archive",
        "summary": "Archive",
        "tags": [
          "Video File Service"
        ],
        "deprecated": true,
        "x-deprecated": "Archives a video file, which excludes it from search and hides it from being visible in the UI, but does not permanently delete it. Archived video files can be unarchived. This endpoints is deprecated and will be removed on February 1st, 2026. Use delete endpoint instead for permanent removal.",
        "parameters": [
          {
            "name": "videoFileRid",
            "in": "path",
            "type": "string",
            "format": "rid",
            "x-alias": "VideoFileRid",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          }
        }
      }
    },
    "/video-files/v1/video-files/{videoFileRid}/unarchive": {
      "put": {
        "operationId": "VideoFileService_unarchive",
        "summary": "Unarchive",
        "tags": [
          "Video File Service"
        ],
        "deprecated": true,
        "x-deprecated": "Unarchive a previously archived video file, exposing it to the UI and search. Unarchiving functionality will be removed on February 1st, 2026.",
        "parameters": [
          {
            "name": "videoFileRid",
            "in": "path",
            "type": "string",
            "format": "rid",
            "x-alias": "VideoFileRid",
            "required": true
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          }
        }
      }
    },
    "/video-files/v1/video-files/{videoFileRid}/ingest-status": {
      "get": {
        "operationId": "VideoFileService_getIngestStatus",
        "summary": "Get ingest status",
        "tags": [
          "Video File Service"
        ],
        "description": "Get the latest ingest status for a given video file by RID.",
        "deprecated": true,
        "x-deprecated": "Legacy VideoFile-entity API. Videos are now channels on datasets and their files are Catalog dataset files; ingest status is tracked on the Catalog dataset file (CatalogService#getDatasetFile).",
        "parameters": [
          {
            "name": "videoFileRid",
            "in": "path",
            "type": "string",
            "format": "rid",
            "x-alias": "VideoFileRid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/GetIngestStatusResponse"
            },
            "x-example": {
              "ingestStatus": {
                "type": "success",
                "success": {}
              }
            }
          }
        }
      }
    },
    "/video-files/v1/videos/batch-get-ingest-status": {
      "post": {
        "operationId": "VideoFileService_batchGetIngestStatus",
        "summary": "Batch get ingest status",
        "tags": [
          "Video File Service"
        ],
        "description": "Get the latest ingest status for a set of given video files by RID.",
        "deprecated": true,
        "x-deprecated": "Legacy VideoFile-entity API. Videos are now channels on datasets and their files are Catalog dataset files; ingest status is tracked on the Catalog dataset file (CatalogService#batchGetDatasetFiles).",
        "parameters": [
          {
            "name": "videoFileRids",
            "in": "body",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "rid",
                "x-alias": "VideoFileRid"
              },
              "uniqueItems": true,
              "example": [
                "<video file rid>"
              ]
            },
            "required": false,
            "x-example": [
              "<video file rid>"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "object",
              "additionalProperties": {
                "$ref": "#/definitions/VideoFileIngestStatus"
              },
              "x-map-key": "VideoFileRid"
            },
            "x-example": {
              "<key>": {
                "type": "success",
                "success": {}
              }
            }
          }
        }
      }
    },
    "/video-files/v1/videos/{videoFileRid}/ingest-status": {
      "put": {
        "operationId": "VideoFileService_updateIngestStatus",
        "summary": "Update ingest status",
        "tags": [
          "Video File Service"
        ],
        "description": "Update the latest ingest status for a given video file by RID.",
        "deprecated": true,
        "x-deprecated": "Legacy VideoFile-entity API. Videos are now channels on datasets and their files are Catalog dataset files; ingest status is tracked on the Catalog dataset file.",
        "parameters": [
          {
            "name": "videoFileRid",
            "in": "path",
            "type": "string",
            "format": "rid",
            "x-alias": "VideoFileRid",
            "required": true
          },
          {
            "name": "request",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/UpdateIngestStatusRequest"
            },
            "required": true,
            "x-example": {
              "video": "<video rid>",
              "ingestStatus": {
                "type": "success",
                "success": {}
              }
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No content."
          }
        }
      }
    },
    "/video-files/v1/video-files/{videoFileRid}/segment-summaries": {
      "get": {
        "operationId": "VideoFileService_getSegmentSummaries",
        "summary": "Get segment summaries",
        "tags": [
          "Video File Service"
        ],
        "description": "Returns the min and max absolute and media timestamps for each segment in a video file. To be used during frame-timestamp mapping when playing back videos.",
        "parameters": [
          {
            "name": "videoFileRid",
            "in": "path",
            "type": "string",
            "format": "rid",
            "x-alias": "VideoFileRid",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/SegmentSummary"
              }
            },
            "x-example": [
              {
                "minAbsoluteTimestamp": {
                  "seconds": 1,
                  "nanos": 1
                },
                "maxAbsoluteTimestamp": {
                  "seconds": 1,
                  "nanos": 1
                },
                "minMediaTimestamp": 1,
                "maxMediaTimestamp": 1
              }
            ]
          }
        }
      }
    },
    "/video-files/v1/video-files/{videoFileRid}/playlist": {
      "get": {
        "operationId": "VideoFileService_getPlaylist",
        "summary": "Get playlist",
        "tags": [
          "Video File Service"
        ],
        "description": "Generate an HLS playlist for a video file with the given RID to enable playback. The HLS playlist will contain links to all of the video segments in the video in sequential order.",
        "parameters": [
          {
            "name": "videoFileRid",
            "in": "path",
            "type": "string",
            "format": "rid",
            "x-alias": "VideoFileRid",
            "required": true
          }
        ],
        "produces": [
          "application/octet-stream"
        ],
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "type": "string",
              "format": "binary"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "Empty": {
      "type": "object",
      "properties": {}
    },
    "Handle": {
      "type": "object",
      "x-union": true,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "s3"
          ]
        },
        "s3": {
          "type": "string",
          "x-alias": "S3Path"
        }
      },
      "required": [
        "type"
      ],
      "description": "Set `type` to the name of one of the other fields, and set only that field.",
      "example": {
        "type": "s3",
        "s3": "string"
      }
    },
    "McapChannelLocator": {
      "description": "Locator for a channel in an mcap file. Channel name is not guaranteed to be unique, so channel ID should be used for mcap files with duplicate channel names.\n\nSet `type` to the name of one of the other fields, and set only that field.",
      "type": "object",
      "x-union": true,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "topic",
            "id"
          ]
        },
        "topic": {
          "type": "string",
          "x-alias": "McapChannelTopic"
        },
        "id": {
          "type": "integer",
          "format": "int32",
          "x-alias": "McapChannelId"
        }
      },
      "required": [
        "type"
      ],
      "example": {
        "type": "topic",
        "topic": "string"
      }
    },
    "Timestamp": {
      "description": "Deprecated for new APIs. Use google.protobuf.Timestamp for absolute instants in proto APIs.\n\nThis legacy nanosecond precision timestamp type is represented by an epoch time in seconds and a nanosecond offset. The nanosecond offset is from the start of the epoch second, so must be less than 1 billion.",
      "type": "object",
      "properties": {
        "seconds": {
          "type": "integer",
          "format": "int64"
        },
        "nanos": {
          "type": "integer",
          "format": "int64"
        }
      },
      "required": [
        "seconds",
        "nanos"
      ]
    },
    "BatchUpdateVideoFilesRequest": {
      "description": "Request to update metadata for multiple files within a single video. All files must belong to the provided video, and the batch may include at most 100 files.",
      "type": "object",
      "properties": {
        "videoRid": {
          "type": "string",
          "format": "rid",
          "x-alias": "VideoRid"
        },
        "updates": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/VideoFileUpdate"
          }
        }
      },
      "required": [
        "videoRid"
      ],
      "example": {
        "videoRid": "<video rid>"
      }
    },
    "BatchUpdateVideoFilesResponse": {
      "type": "object",
      "properties": {
        "files": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/VideoFile"
          }
        }
      }
    },
    "CreateVideoFileRequest": {
      "description": "Request to create and persist a video file",
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "originMetadata": {
          "$ref": "#/definitions/VideoFileOriginMetadata"
        },
        "videoRid": {
          "type": "string",
          "format": "rid",
          "x-alias": "VideoRid"
        },
        "rawFileSize": {
          "type": "integer",
          "format": "int64",
          "description": "The size of the pre-processed raw video file in bytes."
        }
      },
      "required": [
        "title",
        "originMetadata",
        "videoRid",
        "rawFileSize"
      ],
      "example": {
        "title": "<title>",
        "originMetadata": {
          "source": {
            "type": "s3",
            "s3": "<s3 path>"
          },
          "timestampManifest": {
            "type": "mcap",
            "mcap": {
              "mcapChannelLocator": {
                "type": "topic",
                "topic": "<mcap channel topic>"
              }
            }
          }
        },
        "videoRid": "<video rid>",
        "rawFileSize": 1
      }
    },
    "GetIngestStatusResponse": {
      "type": "object",
      "properties": {
        "ingestStatus": {
          "$ref": "#/definitions/VideoFileIngestStatus"
        }
      },
      "required": [
        "ingestStatus"
      ]
    },
    "IngestError": {
      "type": "object",
      "properties": {
        "errorType": {
          "type": "string",
          "x-alias": "ErrorType"
        },
        "message": {
          "type": "string"
        },
        "errorInstanceId": {
          "type": "string"
        }
      },
      "required": [
        "errorType",
        "message"
      ]
    },
    "ListFilesInVideoRequest": {
      "type": "object",
      "properties": {
        "videoRid": {
          "type": "string",
          "format": "rid",
          "x-alias": "VideoRid"
        },
        "token": {
          "type": "string",
          "x-alias": "Token"
        }
      },
      "required": [
        "videoRid"
      ],
      "example": {
        "videoRid": "<video rid>"
      }
    },
    "ListFilesInVideoResponse": {
      "type": "object",
      "properties": {
        "files": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/VideoFile"
          }
        },
        "nextPageToken": {
          "type": "string",
          "x-alias": "Token"
        }
      }
    },
    "McapTimestampManifest": {
      "description": "Timestamps are derived from the mcap file containing the video frames.",
      "type": "object",
      "properties": {
        "mcapChannelLocator": {
          "$ref": "#/definitions/McapChannelLocator"
        }
      },
      "required": [
        "mcapChannelLocator"
      ]
    },
    "NoTimestampManifest": {
      "description": "these values will not be updated after ingest time, to allow for resetting. The updated values are stored implicitly through the segment timestamps.",
      "type": "object",
      "properties": {
        "startingTimestamp": {
          "allOf": [
            {
              "$ref": "#/definitions/Timestamp"
            }
          ],
          "description": "Specifies the original starting timestamp of the video."
        },
        "scaleParameter": {
          "allOf": [
            {
              "$ref": "#/definitions/ScaleParameter"
            }
          ],
          "description": "A field that specifies that the frame rate of the video does not match the frame rate of the camera | i.e. a slowed down or sped up video. Can specify either the camera frame rate or the absolute end time."
        }
      },
      "required": [
        "startingTimestamp"
      ]
    },
    "ScaleParameter": {
      "type": "object",
      "x-union": true,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "trueFrameRate",
            "endingTimestamp",
            "scaleFactor"
          ]
        },
        "trueFrameRate": {
          "type": "number",
          "format": "double"
        },
        "endingTimestamp": {
          "$ref": "#/definitions/Timestamp"
        },
        "scaleFactor": {
          "type": "number",
          "format": "double",
          "description": "the scale factor can be used to calculate whether media duration differs from a video's | real duration, and if so, the true frame rate of the camera. The video time will thus be scaled | by the ratio of the real duration to media duration, or media frame rate to true frame rate."
        }
      },
      "required": [
        "type"
      ],
      "description": "Set `type` to the name of one of the other fields, and set only that field.",
      "example": {
        "type": "trueFrameRate",
        "trueFrameRate": 1
      }
    },
    "SegmentSummary": {
      "description": "Bounding timestamps for the frames within a segment. For non-frame-mapped videos, the min and max media timestamps will be empty.",
      "type": "object",
      "properties": {
        "minAbsoluteTimestamp": {
          "$ref": "#/definitions/Timestamp"
        },
        "maxAbsoluteTimestamp": {
          "$ref": "#/definitions/Timestamp"
        },
        "minMediaTimestamp": {
          "type": "number",
          "format": "double"
        },
        "maxMediaTimestamp": {
          "type": "number",
          "format": "double"
        }
      },
      "required": [
        "minAbsoluteTimestamp",
        "maxAbsoluteTimestamp",
        "minMediaTimestamp",
        "maxMediaTimestamp"
      ]
    },
    "SuccessIngestStatus": {
      "type": "object",
      "properties": {}
    },
    "UpdateIngestStatusRequest": {
      "type": "object",
      "properties": {
        "video": {
          "type": "string",
          "format": "rid",
          "x-alias": "VideoRid"
        },
        "ingestStatus": {
          "$ref": "#/definitions/VideoFileIngestStatus"
        }
      },
      "required": [
        "video",
        "ingestStatus"
      ],
      "example": {
        "video": "<video rid>",
        "ingestStatus": {
          "type": "success",
          "success": {}
        }
      }
    },
    "UpdateVideoFileRequest": {
      "description": "Request to update metadata for a given video file.",
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "startingTimestamp": {
          "$ref": "#/definitions/Timestamp"
        },
        "scaleParameter": {
          "$ref": "#/definitions/ScaleParameter"
        },
        "segmentedFilesSize": {
          "type": "integer",
          "format": "int64",
          "description": "The total size of all the post-processed segments corresponding to this video file in bytes."
        }
      },
      "example": {
        "title": "<title>",
        "description": "<description>",
        "startingTimestamp": {
          "seconds": 1,
          "nanos": 1
        },
        "scaleParameter": {
          "type": "trueFrameRate",
          "trueFrameRate": 1
        },
        "segmentedFilesSize": 1
      }
    },
    "VideoFile": {
      "description": "Representation of a single user-provided video file.",
      "type": "object",
      "properties": {
        "rid": {
          "type": "string",
          "format": "rid",
          "x-alias": "VideoFileRid"
        },
        "videoRid": {
          "type": "string",
          "format": "rid",
          "x-alias": "VideoRid"
        },
        "title": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "createdBy": {
          "type": "string",
          "format": "rid"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "originMetadata": {
          "$ref": "#/definitions/VideoFileOriginMetadata"
        },
        "segmentMetadata": {
          "$ref": "#/definitions/VideoFileSegmentsMetadata"
        }
      },
      "required": [
        "rid",
        "videoRid",
        "title",
        "createdBy",
        "createdAt",
        "originMetadata"
      ]
    },
    "VideoFileIngestStatus": {
      "type": "object",
      "x-union": true,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "success",
            "error",
            "inProgress"
          ]
        },
        "success": {
          "$ref": "#/definitions/SuccessIngestStatus"
        },
        "error": {
          "$ref": "#/definitions/IngestError"
        },
        "inProgress": {
          "$ref": "#/definitions/Empty"
        }
      },
      "required": [
        "type"
      ],
      "description": "Set `type` to the name of one of the other fields, and set only that field.",
      "example": {
        "type": "success",
        "success": {}
      }
    },
    "VideoFileOriginMetadata": {
      "description": "Metadata about the origin of the video file. This includes the original source of the video file and additional timestamp metadata used to time-sync the video file.",
      "type": "object",
      "properties": {
        "source": {
          "$ref": "#/definitions/Handle"
        },
        "timestampManifest": {
          "$ref": "#/definitions/VideoFileTimestampManifest"
        }
      },
      "required": [
        "source",
        "timestampManifest"
      ]
    },
    "VideoFileSegmentsMetadata": {
      "description": "High-level metadata about the segments comprising a video file post-segmentation.",
      "type": "object",
      "properties": {
        "rid": {
          "type": "string",
          "format": "rid",
          "x-alias": "VideoFileRid"
        },
        "numFrames": {
          "type": "integer",
          "format": "int32"
        },
        "numSegments": {
          "type": "integer",
          "format": "int32"
        },
        "scaleFactor": {
          "type": "number",
          "format": "double"
        },
        "minAbsoluteTimestamp": {
          "$ref": "#/definitions/Timestamp"
        },
        "maxAbsoluteTimestamp": {
          "$ref": "#/definitions/Timestamp"
        },
        "mediaDurationSeconds": {
          "type": "number",
          "format": "double"
        },
        "mediaFrameRate": {
          "type": "number",
          "format": "double"
        }
      },
      "required": [
        "rid",
        "numFrames",
        "numSegments",
        "scaleFactor",
        "minAbsoluteTimestamp",
        "maxAbsoluteTimestamp",
        "mediaDurationSeconds",
        "mediaFrameRate"
      ]
    },
    "VideoFileTimestampManifest": {
      "description": "A video file’s timestamp manifest specifies how to determine absolute timestamps for each frame. In an MCAP file, this data is embedded within the source file. Alternatively, the manifest may be provided as an external sidecar file. If no manifest is available, the timestamps are calculated by applying a starting offset to the presentation timestamp of each frame.\n\nSet `type` to the name of one of the other fields, and set only that field.",
      "type": "object",
      "x-union": true,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "mcap",
            "s3path",
            "s3paths",
            "noManifest"
          ]
        },
        "mcap": {
          "$ref": "#/definitions/McapTimestampManifest"
        },
        "s3path": {
          "type": "string",
          "x-alias": "S3Path"
        },
        "s3paths": {
          "type": "array",
          "items": {
            "type": "string",
            "x-alias": "S3Path"
          },
          "description": "Multiple sidecar manifest files whose per-frame timestamps are concatenated in list order. Used when a video's frame timestamps are recorded across several files."
        },
        "noManifest": {
          "$ref": "#/definitions/NoTimestampManifest"
        }
      },
      "required": [
        "type"
      ],
      "example": {
        "type": "mcap",
        "mcap": {
          "mcapChannelLocator": {
            "type": "topic",
            "topic": "string"
          }
        }
      }
    },
    "VideoFileUpdate": {
      "description": "Metadata update for a single video file in a batch update.",
      "type": "object",
      "properties": {
        "videoFileRid": {
          "type": "string",
          "format": "rid",
          "x-alias": "VideoFileRid"
        },
        "request": {
          "$ref": "#/definitions/UpdateVideoFileRequest"
        }
      },
      "required": [
        "videoFileRid",
        "request"
      ]
    }
  },
  "tags": [
    {
      "name": "Video File Service",
      "x-displayName": "Video file service",
      "description": "The video service manages individual video files and their metadata.",
      "x-errors": [
        {
          "status": 404,
          "errorCode": "NOT_FOUND",
          "errorName": "Video:VideoFileNotFound",
          "description": "Accessing a video file by RID that does not exist or that you do not have permission to access."
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "Video:VideoFileIngestNotComplete",
          "description": "Attempting to access per-file segment information before video segmentation has finished."
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "Video:InvalidFileShiftScaleRequest",
          "description": "Attempting to shift or scale the timestamps of a video with a timestamp manifest."
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "Video:InvalidVideoFileBatchUpdateRequest",
          "description": "Attempting to batch update video files with an invalid request shape."
        }
      ]
    }
  ]
}
