HeyWatch Developers

CoreAPI: DownloadVideoFormatJobEncoded VideoAccount

Job Resource

Get all the jobs

GET /job.(xml|json)

With the cURL command:

curl -u username:passwd https://heywatch.com/job.json
[
  {
    "ping_url_after_encode": "http://site.com/heywatch/encode?post_id=1234454321",
    "created_at": "2011-06-08T15:41:58+02:00",
    "error_msg": null,
    "cf_directive": null,
    "video_id": 9554134,
    "updated_at": "2011-06-08T15:41:16+02:00",
    "progress": 100,
    "id": 4888504,
    "format_id": 3458,
    "s3_directive": null,
    "ping_url_if_error": "http://site.com/heywatch/error?post_id=1234454321",
    "error_code": null,
    "encoding_options": {
      "keep_video_size": true
    },
    "encoded_video_id": 9554145,
    "ftp_directive": null,
    "status": "finished",
    "http_upload_directive": null
  },
  {
    "ping_url_after_encode": "http://site.com/heywatch/encode?post_id=1234454322",
    "created_at": "2011-06-08T15:41:03+02:00",
    "error_msg": null,
    "cf_directive": null,
    "video_id": 9554141,
    "updated_at": "2011-06-08T15:42:26+02:00",
    "progress": 100,
    "id": 4888509,
    "format_id": 2365,
    "s3_directive": null,
    "ping_url_if_error": "http://site.com/heywatch/error?post_id=1234454322",
    "error_code": null,
    "encoding_options": {
      "watermark_position": "topleft",
      "keep_fps": false,
      "watermark_image_url": "http://site.com/images/watermark.png"
    },
    "encoded_video_id": 9554151,
    "ftp_directive": null,
    "status": "finished",
    "http_upload_directive": "http://site.com/heywatch/upload?post_id=1234454322"
  }
]

Get information about a specific Job

GET /job/ID.(xml|json)

With the cURL command:

curl -u username:passwd https://heywatch.com/job/4888551.json
{
  "ping_url_after_encode": "http://site.com/heywatch/encode?post_id=1234454323",
  "created_at": "2011-06-08T15:50:23+02:00",
  "error_msg": null,
  "cf_directive": null,
  "video_id": 9554225,
  "updated_at": "2011-06-08T15:49:18+02:00",
  "progress": 10,
  "id": 4888551,
  "format_id": 3458,
  "s3_directive": "s3://accesskey:secretkey@videos.site.com/web/1234454323.mp4",
  "ping_url_if_error": "http://site.com/heywatch/error?post_id=1234454323",
  "error_code": null,
  "encoding_options": {
    "keep_video_size": true
  },
  "encoded_video_id": 0,
  "ftp_directive": null,
  "status": "working",
  "http_upload_directive": null
}

Create a job

POST /job.(xml|json)

Parameters

Optional Ping URLs and external storages parameters

Note that custom fields don’t work here. To have them, you need to customize the ping urls like http://myhost.com/heywatch/ping/success?myid=1546

Optional Encoding options parameters

With the cURL command:

curl -u username:passwd -X POST \
-d "video_id=9554271" \
-d "format_id=1086" \
-d "s3_directive=s3://accesskey:secretkey@videos.site.com/1234345422.mp4" \
-d "keep_video_size=true" \
-d "ping_url_after_encode=http://site.com/heywatch/encode?post_id=1234345422" \
-d "ping_url_if_error=http://site.com/heywatch/error?post_id=1234345422" \
https://heywatch.com/job.json
{
  "ping_url_after_encode": "http://site.com/heywatch/encode?post_id=1234345422",
  "created_at": "2011-06-08T15:57:50+02:00",
  "error_msg": null,
  "cf_directive": null,
  "video_id": 9554271,
  "updated_at": "2011-06-08T15:57:50+02:00",
  "progress": 0,
  "id": 4888589,
  "format_id": 1086,
  "s3_directive": "s3://accesskey:secretkey@videos.site.com/1234345422.mp4",
  "ping_url_if_error": "http://site.com/heywatch/error?post_id=1234345422",
  "error_code": null,
  "encoding_options": {
    "keep_video_size": true
  },
  "encoded_video_id": 0,
  "ftp_directive": null,
  "status": "pending",
  "http_upload_directive": null
}