The HW Blog

Want to be updated? @opencoconut | Feed

Ping request format in JSON and XML

Bruno Celeste (@brunoceleste)

October 15, 2013 Features

We just added a functionality to get the POST data directly in JSON or XML format instead of the usual Form/POST parameters.

To specify the ping format, just add the query string parameter ping_format=json to the ping URL. In [robot:ping] section, you will add the parameter _format = json.

A typical ping in JSON would be:

{
  "ping":
  {
      "data":
      {
        "format_id": "iphone_720p",
        "video_id": 18957097,
        "encoded_video_id": 18957101,
        "link": "http://coconut.com/encoded_video/18957101.bin",
        "job_id": 9742501,
        "filename": "7867483.mp4"
      },
      "type": "encode",
      "status": "success"
  }
}

It works with every kind of ping you receive from Coconut.

A note about the Robot API

The ping data you receive in JSON and XML is different than the regular ping. By default the ping format is now in JSON.



Any Comment? Send us a message on Twitter @opencoconut
If you have questions or feedbacks, you can also contact us via our contact page