Add V2 videos endpoints and Video schema#36
Merged
Conversation
Documents the new read-only video endpoints shipping in CompanyCam/Company-Cam-API#21960: - GET /videos (listVideos) - GET /videos/{id} (getVideo) - GET /projects/{project_id}/videos (listProjectVideos) Adds a new Video schema mirroring V2::VideoSerializer field-for-field. Note: video.coordinates is a single Coordinate object (not an array like Photo.coordinates). Each path and the Video schema include callouts about the HLS- readiness gotcha: 'video.created' webhooks fire on after_create, before Mux transcoding completes, so until status flips to 'processed' the playback_url returns the raw upload URL and format returns the file extension of pending_uri instead of 'm3u8'. Do not merge until the Rails endpoints are live in production -- ReadMe at docs.companycam.com auto-publishes from the spec. Amp-Thread-ID: https://ampcode.com/threads/T-019dda1b-6c37-72e4-992c-1834091fce79 Co-authored-by: Amp <amp@ampcode.com>
The preview_gif_urls attribute is being removed from
V2::VideoSerializer in CompanyCam-API#21960 — it always returned
{ large: nil, medium: nil, small: nil } and the underlying
preview_gif column is unused. Removing it from the public schema
before any consumers depend on it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Documents the new read-only V2 videos endpoints shipping in companycam/company-cam-api#21960:
GET /videos—listVideosGET /videos/{id}—getVideoGET /projects/{project_id}/videos—listProjectVideosAdds a new
Videoschema incomponents.schemasderived directly fromV2::VideoSerializer(the same serializer already used to rendervideo.*webhook payloads).ReadMe at docs.companycam.com auto-publishes from this spec. Merging early would document vapor.
Schema notes
coordinatesis a single object ({lat, lon}), not an array likePhoto.coordinates. (V2::VideoSerializer#coordinatesreturnsCoordinate.new(...).to_h, not an array.)playback_url,format, andthumbnail_urls.*are nullable until processing completes.preview_gif_urlswas dropped from both this schema andV2::VideoSerializer(CompanyCam-API#21960) — the underlying column is unused and the field always returned all-nulls. Cleaner to omit than to document a permanently-null block.statusenum:pending,processing,processed,processing_error.Each path block and the
Videoschema include a callout about the HLS-readiness gotcha:Verification
npx js-yaml openapi.yaml > /dev/nullparses cleanly.
components.schemas.Videoand all three new paths show up in the parsed structure.Linked
2026-04-29 - V2 Videos API Scoping.mdhttps://linear.app/companycam/issue/RIF-226/add-videos-to-v2-api