Search code examples
brightcove

Brightcove API "create_video" : result is null


I have two questions about Brightcove API create_video.

  1. The create_video API returns this JSON response below. The "result" attribute could be video_id. But what is the "id" attribute?

    {"result"=>653155417001, "error=>null, "id"=>null}

  2. Sometimes, not sure why, The API returns this JSON response below. It seems to be the request is OK but result is null... Does anyone know why?

    {"result"=>null, "error=>null, "id"=>null}

FYI

http://docs.brightcove.com/en/video-cloud/media/samples/create_video.html https://github.com/BrightcoveOS/Ruby-MAPI-Wrapper/blob/master/README.md

Thanks


Solution

  • The 'result' value is the video id. As the Media API uses JSON-RPC, the id in the response would match the id specified in the request, or null if there were no id. It has nothing to do with the video id.

    {"method": "create_video","params": {…}, "id": 1}
    
    {"result": 12345678900001, "error": null, "id": 1}
    

    Brightcove's Media API doesn't require id to be specified, so there's no need to include it.

    The second question would be better put to Brightcove support.