Streaming live at 10am (PST)

Video field support in REST API


#1

Hi folks,

I’m evaluating the use of the Webflow REST API. The documentation is thorough, though there is one hole: I do not see docs regarding working with collections that contain a Video field. Like an Image, Video fields seem to be stored in a rather special way. My initial attempt at creating an item that includes a Video field failed with a curiously incorrect error.

Given collection configuration (output of GET /collections/:collection_id) that includes the following field:
{
“id”: “…”,
“editable”: true,
“required”: true,
“type”: “Video”,
“slug”: “video-url”,
“name”: “video_url”
}

And the following POST request:
curl --silent --request POST https://api.webflow.com/collections/$COLLECTION_ID/items
-H "Authorization: Bearer API_TOKEN" \ -H "accept-version: 1.0.0" \ -H "Content-Type: application/json" \ --data-binary ‘{
“fields”: {
“name”: “exciting movie”,
“slug”: “exciting-movie”,
“_archived”: “false”,
“_draft”: “false”,
“video_url”: “https://vimeo.com/fake/url/for/example/purpose
}
}’

I get the following “ValidationError”:
{
“msg”: “Validation Failure”,
“code”: 400,
“name”: “ValidationError”,
“path”: “/collections/…/items”,
“err”: “ValidationError: Validation Failure”,
“problems”: [
“Field ‘video_url’: Field not described in schema”
],
“problem_data”: [
{
“slug”: “video_url”,
“msg”: “Field not described in schema”
}
]
}

Clearly the field “video_url” exists in the collection at hand. I have tested that I can manually create entries for this collection through the WebflowCMS GUI–that is no problem.

Is working with Video fields not supported through the REST API?