Brightcove网站上的示例提供了更新我的库中特定视频的标签所需的JSON:
{"method":"update_video","params":{"video":{"id":"123456",
"shortDescription":"vidDesc","Name":"vidName","startDate":1392912992000,
"endDate":null,"tags":["tag1","tag2","tag3"]},"token":"someToken.."}}
我已经尝试过了,它确实有效。
但是当我尝试发布类似但有更新的引用ID的内容时,如下所示:
{"method":"update_video","params":{"video":{"id":"123456",
"shortDescription":"vidDesc","Name":"vidName","startDate":1392912992000,
"endDate":null,"referenceId":"newReferenceId","token":"someToken.."}}
我从服务中收到此错误:
{"error": {"name":"MissingJSONError","message":"Could not find JSON-RPC.",
"code":211}, "result": null, "id": null}
我也试过将它作为ref
传递 - 没有骰子。有没有人知道是否可以通过Brightcove的门户网站以外的任何方式更新此值?
答案 0 :(得分:2)
确保您将JSON作为表单数据发送,而不是发布在帖子正文中。
e.g。卷曲,
curl -F 'json={"method":"update_video","params":{"video":{"id":"123456789","referenceId":"newrefid"},"token":"myToken"}}' https://api.brightcove.com/services/post