문제

The example on the Brightcove site provides the JSON needed to update tags for a particular video in my library:

{"method":"update_video","params":{"video":{"id":"123456",
  "shortDescription":"vidDesc","Name":"vidName","startDate":1392912992000,
  "endDate":null,"tags":["tag1","tag2","tag3"]},"token":"someToken.."}}

I've tried this, and it works.

But when I try to post something similar but with an updated reference ID, like this:

{"method":"update_video","params":{"video":{"id":"123456",
  "shortDescription":"vidDesc","Name":"vidName","startDate":1392912992000,
  "endDate":null,"referenceId":"newReferenceId","token":"someToken.."}}

I get this error back from the service:

{"error": {"name":"MissingJSONError","message":"Could not find JSON-RPC.",
  "code":211}, "result": null, "id": null}

I've tried passing it as ref as well - no dice. Does anyone know if it's possible to update this value via any means other than Brightcove's web portal?

도움이 되었습니까?

해결책

Make sure you're sending the JSON as form data rather than in the post body.

e.g. with curl,

curl -F 'json={"method":"update_video","params":{"video":{"id":"123456789","referenceId":"newrefid"},"token":"myToken"}}' https://api.brightcove.com/services/post
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top