{"_id":"5446977f3168910800744db5","body":"The Sky Encoder API is designed around REST with the goal of providing predictable URLs and responses. JSON is used in all communications with clearly defined error flags and messages.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Authentication\"\n}\n[/block]\nTo authenticate with the Sky Encoder API you provide your account API Token and Secret Key values as HTTP Request Headers. You can find both values on the \"Your Account\" page under the API heading.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \" curl -H \\\"SE-Secret-Key: YOUR-SECRET-KEY\\\" -H \\\"SE-API-Token: YOUR-API-TOKEN\\\" http://skyencoder.com/api/1.0/jobs/list\",\n      \"language\": \"shell\",\n      \"name\": \"CURL\"\n    },\n    {\n      \"code\": \"require './lib/SkyEncoder.php';\\n$sky = new SkyEncoder('your-secret-key', 'your-api-token');\",\n      \"language\": \"php\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Errors\"\n}\n[/block]\nError handling with the Sky Encoder API is simple. All responses are formatted as below:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"error\\\":1,\\n  \\\"msg\\\":\\\"Your error message is listed here.\\\",\\n  \\\"data\\\":{}\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nErrors are always indicated with a value of \"1\" while successes are indicated with \"0\". A simple, human-readable error message is always provided. If additional information is available for the error, it will be provided in the \"data\" attribute.","excerpt":"This page will help you get started with Sky Encoder. You'll be up and running in a jiffy!","is_link":false,"user":"544694c43168910800744d9e","version":"5446977f3168910800744db2","order":0,"slug":"getting-started","type":"basic","updates":[],"project":"5446977f3168910800744daf","sync_unique":"","title":"Getting Started with Sky Encoder","api":{"try":true,"url":"","auth":"never","basic_auth":false,"params":[],"results":{"codes":[]}},"category":"54469fac3168910800744de2","link_url":"","__v":11,"createdAt":"2014-10-21T17:27:27.354Z","githubsync":"","childrenPages":[]}

Getting Started with Sky Encoder

This page will help you get started with Sky Encoder. You'll be up and running in a jiffy!

The Sky Encoder API is designed around REST with the goal of providing predictable URLs and responses. JSON is used in all communications with clearly defined error flags and messages. [block:api-header] { "type": "basic", "title": "Authentication" } [/block] To authenticate with the Sky Encoder API you provide your account API Token and Secret Key values as HTTP Request Headers. You can find both values on the "Your Account" page under the API heading. [block:code] { "codes": [ { "code": " curl -H \"SE-Secret-Key: YOUR-SECRET-KEY\" -H \"SE-API-Token: YOUR-API-TOKEN\" http://skyencoder.com/api/1.0/jobs/list", "language": "shell", "name": "CURL" }, { "code": "require './lib/SkyEncoder.php';\n$sky = new SkyEncoder('your-secret-key', 'your-api-token');", "language": "php" } ] } [/block] [block:api-header] { "type": "basic", "title": "Errors" } [/block] Error handling with the Sky Encoder API is simple. All responses are formatted as below: [block:code] { "codes": [ { "code": "{\n \"error\":1,\n \"msg\":\"Your error message is listed here.\",\n \"data\":{}\n}", "language": "json" } ] } [/block] Errors are always indicated with a value of "1" while successes are indicated with "0". A simple, human-readable error message is always provided. If additional information is available for the error, it will be provided in the "data" attribute.
The Sky Encoder API is designed around REST with the goal of providing predictable URLs and responses. JSON is used in all communications with clearly defined error flags and messages. [block:api-header] { "type": "basic", "title": "Authentication" } [/block] To authenticate with the Sky Encoder API you provide your account API Token and Secret Key values as HTTP Request Headers. You can find both values on the "Your Account" page under the API heading. [block:code] { "codes": [ { "code": " curl -H \"SE-Secret-Key: YOUR-SECRET-KEY\" -H \"SE-API-Token: YOUR-API-TOKEN\" http://skyencoder.com/api/1.0/jobs/list", "language": "shell", "name": "CURL" }, { "code": "require './lib/SkyEncoder.php';\n$sky = new SkyEncoder('your-secret-key', 'your-api-token');", "language": "php" } ] } [/block] [block:api-header] { "type": "basic", "title": "Errors" } [/block] Error handling with the Sky Encoder API is simple. All responses are formatted as below: [block:code] { "codes": [ { "code": "{\n \"error\":1,\n \"msg\":\"Your error message is listed here.\",\n \"data\":{}\n}", "language": "json" } ] } [/block] Errors are always indicated with a value of "1" while successes are indicated with "0". A simple, human-readable error message is always provided. If additional information is available for the error, it will be provided in the "data" attribute.
{"_id":"545bcfd788ebc81c0077ac96","order":999,"sync_unique":"","type":"basic","user":"544694c43168910800744d9e","version":"5446977f3168910800744db2","body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Video Containers\"\n}\n[/block]\nBelow is a list of our supported output containers and each container's supported audio and video codecs. ***The items in bold are the defaults for each.*** \n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Container\",\n    \"h-1\": \"Video Codecs\",\n    \"h-2\": \"Audio Codecs\",\n    \"0-0\": \"3gp\",\n    \"0-1\": \"h264, **mpeg4**\",\n    \"0-2\": \"**aac**\",\n    \"1-0\": \"flv\",\n    \"1-1\": \"h264, **sorenson**\",\n    \"1-2\": \"aac, **mp3**\",\n    \"2-0\": \"mkv\",\n    \"2-1\": \"**h264**, sorenson\",\n    \"2-2\": \"**aac**, ac3, eac3, mp3\",\n    \"3-0\": \"**mp4**\",\n    \"3-1\": \"**h264**, h3vc, mpeg4\",\n    \"3-2\": \"**aac**, mp3\",\n    \"4-0\": \"ogg\",\n    \"4-1\": \"**theora**\",\n    \"4-2\": \"**vorbis**\",\n    \"5-0\": \"ts\",\n    \"5-1\": \"**h264**\",\n    \"5-2\": \"**aac**, ac3, mp3\",\n    \"6-0\": \"webm\",\n    \"6-1\": \"**vp8**\",\n    \"6-2\": \"**vorbis**\",\n    \"7-0\": \"wmv\",\n    \"7-1\": \"**wmv**, sorenson\",\n    \"7-2\": \"mp3, **wma**\"\n  },\n  \"cols\": 3,\n  \"rows\": 8\n}\n[/block]\nBelow is a list of each container's available file extensions. ***The items in bold are the defaults for each.*** \n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Container\",\n    \"h-1\": \"Available File Ext\",\n    \"0-0\": \"3gp\",\n    \"0-1\": \"**3gp**, mp4\",\n    \"1-0\": \"flv\",\n    \"1-1\": \"**flv**\",\n    \"2-0\": \"mkv\",\n    \"2-1\": \"**mkv**\",\n    \"3-0\": \"**mp4**\",\n    \"3-1\": \"**mp4**, m4v, f4v, m4b, m4r, f4b\",\n    \"4-0\": \"ogg\",\n    \"4-1\": \"**ogg**, ogv, ogx\",\n    \"5-0\": \"ts\",\n    \"5-1\": \"**ts**\",\n    \"6-0\": \"webm\",\n    \"6-1\": \"**webm**\",\n    \"7-0\": \"wmv\",\n    \"7-1\": \"**wmv**\"\n  },\n  \"cols\": 2,\n  \"rows\": 8\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Audio Codecs\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Codec\",\n    \"h-1\": \"Available File Ext\",\n    \"0-0\": \"aac\",\n    \"0-1\": \"aac\",\n    \"1-0\": \"ac3\",\n    \"1-1\": \"ac3\",\n    \"2-0\": \"amr\",\n    \"2-1\": \"amr\",\n    \"3-0\": \"ec3\",\n    \"3-1\": \"ec3\",\n    \"4-0\": \"eac3\",\n    \"5-0\": \"**mp3**\",\n    \"6-0\": \"vorbis\",\n    \"7-0\": \"wma\",\n    \"7-1\": \"wma\",\n    \"6-1\": \"**oga**, ogg\",\n    \"4-1\": \"eac3\",\n    \"5-1\": \"mp3\"\n  },\n  \"cols\": 2,\n  \"rows\": 8\n}\n[/block]","excerpt":"","githubsync":"","project":"5446977f3168910800744daf","updates":[],"__v":4,"category":"54469fac3168910800744de2","is_link":false,"link_url":"","title":"Supported Containers and Codecs","api":{"try":true,"url":"","auth":"never","basic_auth":false,"params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]}},"createdAt":"2014-11-06T19:45:27.946Z","slug":"supported-containers-and-codecs","childrenPages":[]}

Supported Containers and Codecs


[block:api-header] { "type": "basic", "title": "Video Containers" } [/block] Below is a list of our supported output containers and each container's supported audio and video codecs. ***The items in bold are the defaults for each.*** [block:parameters] { "data": { "h-0": "Container", "h-1": "Video Codecs", "h-2": "Audio Codecs", "0-0": "3gp", "0-1": "h264, **mpeg4**", "0-2": "**aac**", "1-0": "flv", "1-1": "h264, **sorenson**", "1-2": "aac, **mp3**", "2-0": "mkv", "2-1": "**h264**, sorenson", "2-2": "**aac**, ac3, eac3, mp3", "3-0": "**mp4**", "3-1": "**h264**, h3vc, mpeg4", "3-2": "**aac**, mp3", "4-0": "ogg", "4-1": "**theora**", "4-2": "**vorbis**", "5-0": "ts", "5-1": "**h264**", "5-2": "**aac**, ac3, mp3", "6-0": "webm", "6-1": "**vp8**", "6-2": "**vorbis**", "7-0": "wmv", "7-1": "**wmv**, sorenson", "7-2": "mp3, **wma**" }, "cols": 3, "rows": 8 } [/block] Below is a list of each container's available file extensions. ***The items in bold are the defaults for each.*** [block:parameters] { "data": { "h-0": "Container", "h-1": "Available File Ext", "0-0": "3gp", "0-1": "**3gp**, mp4", "1-0": "flv", "1-1": "**flv**", "2-0": "mkv", "2-1": "**mkv**", "3-0": "**mp4**", "3-1": "**mp4**, m4v, f4v, m4b, m4r, f4b", "4-0": "ogg", "4-1": "**ogg**, ogv, ogx", "5-0": "ts", "5-1": "**ts**", "6-0": "webm", "6-1": "**webm**", "7-0": "wmv", "7-1": "**wmv**" }, "cols": 2, "rows": 8 } [/block] [block:api-header] { "type": "basic", "title": "Audio Codecs" } [/block] [block:parameters] { "data": { "h-0": "Codec", "h-1": "Available File Ext", "0-0": "aac", "0-1": "aac", "1-0": "ac3", "1-1": "ac3", "2-0": "amr", "2-1": "amr", "3-0": "ec3", "3-1": "ec3", "4-0": "eac3", "5-0": "**mp3**", "6-0": "vorbis", "7-0": "wma", "7-1": "wma", "6-1": "**oga**, ogg", "4-1": "eac3", "5-1": "mp3" }, "cols": 2, "rows": 8 } [/block]
[block:api-header] { "type": "basic", "title": "Video Containers" } [/block] Below is a list of our supported output containers and each container's supported audio and video codecs. ***The items in bold are the defaults for each.*** [block:parameters] { "data": { "h-0": "Container", "h-1": "Video Codecs", "h-2": "Audio Codecs", "0-0": "3gp", "0-1": "h264, **mpeg4**", "0-2": "**aac**", "1-0": "flv", "1-1": "h264, **sorenson**", "1-2": "aac, **mp3**", "2-0": "mkv", "2-1": "**h264**, sorenson", "2-2": "**aac**, ac3, eac3, mp3", "3-0": "**mp4**", "3-1": "**h264**, h3vc, mpeg4", "3-2": "**aac**, mp3", "4-0": "ogg", "4-1": "**theora**", "4-2": "**vorbis**", "5-0": "ts", "5-1": "**h264**", "5-2": "**aac**, ac3, mp3", "6-0": "webm", "6-1": "**vp8**", "6-2": "**vorbis**", "7-0": "wmv", "7-1": "**wmv**, sorenson", "7-2": "mp3, **wma**" }, "cols": 3, "rows": 8 } [/block] Below is a list of each container's available file extensions. ***The items in bold are the defaults for each.*** [block:parameters] { "data": { "h-0": "Container", "h-1": "Available File Ext", "0-0": "3gp", "0-1": "**3gp**, mp4", "1-0": "flv", "1-1": "**flv**", "2-0": "mkv", "2-1": "**mkv**", "3-0": "**mp4**", "3-1": "**mp4**, m4v, f4v, m4b, m4r, f4b", "4-0": "ogg", "4-1": "**ogg**, ogv, ogx", "5-0": "ts", "5-1": "**ts**", "6-0": "webm", "6-1": "**webm**", "7-0": "wmv", "7-1": "**wmv**" }, "cols": 2, "rows": 8 } [/block] [block:api-header] { "type": "basic", "title": "Audio Codecs" } [/block] [block:parameters] { "data": { "h-0": "Codec", "h-1": "Available File Ext", "0-0": "aac", "0-1": "aac", "1-0": "ac3", "1-1": "ac3", "2-0": "amr", "2-1": "amr", "3-0": "ec3", "3-1": "ec3", "4-0": "eac3", "5-0": "**mp3**", "6-0": "vorbis", "7-0": "wma", "7-1": "wma", "6-1": "**oga**, ogg", "4-1": "eac3", "5-1": "mp3" }, "cols": 2, "rows": 8 } [/block]
{"_id":"5446a57d3168910800744df4","category":"5447be670319802200fc0624","link_url":"","project":"5446977f3168910800744daf","version":"5446977f3168910800744db2","createdAt":"2014-10-21T18:27:09.947Z","sync_unique":"","title":"/jobs/list","__v":1,"api":{"method":"get","params":[{"type":"array_mixed","name":"filters","in":"query","_id":"5446a57d3168910800744df6","required":false,"desc":"Provide a list of filters for the list.","default":""},{"_id":"5446a57d3168910800744df5","required":false,"desc":"Sort the results by the provided fields. Use 1 for ASC and -1 for DESC.","default":"events.created: -1","type":"array_mixed","name":"sort","in":"query"},{"_id":"5446a748ae0040140035f9a8","required":false,"desc":"The page of results to retrieve.","default":"1","type":"int","name":"page","in":"query"},{"_id":"5446a748ae0040140035f9a7","required":false,"desc":"The number of results to list per page. The maximum is 50 per page.","default":"10","type":"int","name":"limit","in":"query"}],"results":{"codes":[{"name":"","code":"{\n  \"error\":0,\n  \"msg\":\"\",\n  \"data\":{\n    \"rows\":{\n      \"111111111\":{\n        \"encoding_minutes\":{\n          \"audio\":2,\n          \"video\":2,\n          \"hd_video\":0,\n          \"images\":1,\n          \"total\":5\n        },\n        \"events\":{\n          \"created\":\"2014-10-21T10:53:57-05:00\",\n          \"delivery_complete\":\"2014-10-21T10:54:54-05:00\",\n          \"delivery_started\":\"2014-10-21T10:54:54-05:00\"\n        },\n        \"input_file\":\"http://yourwebsite.com/input-video.flv\",\n        \"options\":{\n          \"delivery\":[\n\n          ],\n          \"passback\":[\n\n          ],\n          \"passback_headers\":[\n\n          ],\n          \"passback_url\":\"\",\n          \"test\":false\n        },\n        \"tasks\":[\n          {\n            \"events\":{\n              \"download_started\":\"2014-10-21T10:53:47-05:00\",\n              \"task_started\":\"2014-10-21T10:53:47-05:00\",\n              \"render_started\":\"2014-10-21T10:53:53-05:00\",\n              \"queue_date\":\"2014-10-21T10:53:57-05:00\",\n              \"render_finished\":\"2014-10-21T10:54:35-05:00\",\n              \"delivery_started\":\"2014-10-21T10:54:35-05:00\",\n              \"complete\":\"2014-10-21T10:54:39-05:00\"\n            },\n            \"filename\":\"your-output.mp4\",\n            \"format\":\"mp4\",\n            \"height\":\"360\",\n            \"notes\":[\n              \"Output width set to 640px\"\n            ],\n            \"output_file\":\"http://cdn.rackspace.com/your-output.mp4\",\n            \"status\":\"Complete\",\n            \"type\":\"video\",\n            \"width\":\"\",\n            \"id\":\"111111112\"\n          },\n          {\n            \"events\":{\n              \"queue_date\":\"2014-10-21T10:53:57-05:00\",\n              \"task_started\":\"2014-10-21T10:54:00-05:00\",\n              \"download_started\":\"2014-10-21T10:54:01-05:00\",\n              \"render_started\":\"2014-10-21T10:54:09-05:00\",\n              \"render_finished\":\"2014-10-21T10:54:11-05:00\",\n              \"delivery_started\":\"2014-10-21T10:54:12-05:00\",\n              \"complete\":\"2014-10-21T10:54:13-05:00\"\n            },\n            \"filename\":\"your-output.aac\",\n            \"format\":\"aac\",\n            \"output_file\":\"http://cdn.rackspace.com/your-output.aac\",\n            \"status\":\"Complete\",\n            \"type\":\"audio\",\n            \"id\":\"111111113\"\n          },\n          {\n            \"events\":{\n              \"queue_date\":\"2014-10-21T10:53:57-05:00\",\n              \"task_started\":\"2014-10-21T10:53:59-05:00\",\n              \"render_started\":\"2014-10-21T10:54:02-05:00\",\n              \"render_finished\":\"2014-10-21T10:54:04-05:00\",\n              \"delivery_started\":\"2014-10-21T10:54:05-05:00\",\n              \"complete\":\"2014-10-21T10:54:07-05:00\"\n            },\n            \"filename\":\"your-output.jpg\",\n            \"format\":\"jpg\",\n            \"height\":\"360\",\n            \"output_file\":\"http://cdn.rackspace.com/your-output.jpg\",\n            \"status\":\"Complete\",\n            \"type\":\"image\",\n            \"width\":\"480\",\n            \"id\":\"111111114\"\n          }\n        ],\n        \"tmp_files_expire_on\":\"2014-10-23T10:53:57-05:00\",\n        \"total_price\":0.09,\n        \"id\":\"111111111\"\n      }\n    },\n    \"numrows\":1,\n    \"total\":1\n  }\n}","language":"json","status":200},{"name":"","code":"{\n\t\"error\":1,\n  \"msg\":\"Your error message.\",\n  \"data\":{}\n}","language":"json","status":400}]},"try":false,"url":"/jobs/list","auth":"never","basic_auth":false},"editedParams2":true,"excerpt":"Get a list of your jobs.","is_link":false,"order":0,"slug":"list","body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"\",\n  \"body\": \"Make sure to take note of the directional indicators for sorting. We use 1 for ASC and -1 for DESC.\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"filters\\\":{\\n  \\t\\\"status\\\": \\\"Complete\\\"\\n  },\\n  \\\"sort\\\":{\\n    \\\"events.created\\\": -1\\n  },\\n  \\\"page\\\": 1,\\n  \\\"limit\\\": 50\\n}\",\n      \"language\": \"json\",\n      \"name\": \"JSON\"\n    },\n    {\n      \"code\": \"require './lib/SkyEncoder.php';\\n$sky = new SkyEncoder('your-secret-key', 'your-api-token');\\n\\n$resp = $sky->getJobs(array(\\n\\t'filters' => array('status'=>'Complete'),\\n\\t'sort' => array('events.created'=>-1),\\n\\t'page' => 1,\\n\\t'limit' => 50\\n));\",\n      \"language\": \"php\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","editedParams":true,"githubsync":"","type":"get","updates":[],"user":"544694c43168910800744d9e","childrenPages":[]}

get/jobs/list

Get a list of your jobs.

Query Params

filters:
array of mixed
Provide a list of filters for the list.
sort:
array of mixedevents.created: -1
Sort the results by the provided fields. Use 1 for ASC and -1 for DESC.
page:
integer1
The page of results to retrieve.
limit:
integer10
The number of results to list per page. The maximum is 50 per page.
[block:callout] { "type": "info", "title": "", "body": "Make sure to take note of the directional indicators for sorting. We use 1 for ASC and -1 for DESC." } [/block] [block:code] { "codes": [ { "code": "{\n \"filters\":{\n \t\"status\": \"Complete\"\n },\n \"sort\":{\n \"events.created\": -1\n },\n \"page\": 1,\n \"limit\": 50\n}", "language": "json", "name": "JSON" }, { "code": "require './lib/SkyEncoder.php';\n$sky = new SkyEncoder('your-secret-key', 'your-api-token');\n\n$resp = $sky->getJobs(array(\n\t'filters' => array('status'=>'Complete'),\n\t'sort' => array('events.created'=>-1),\n\t'page' => 1,\n\t'limit' => 50\n));", "language": "php" } ], "sidebar": true } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Result Format



[block:callout] { "type": "info", "title": "", "body": "Make sure to take note of the directional indicators for sorting. We use 1 for ASC and -1 for DESC." } [/block] [block:code] { "codes": [ { "code": "{\n \"filters\":{\n \t\"status\": \"Complete\"\n },\n \"sort\":{\n \"events.created\": -1\n },\n \"page\": 1,\n \"limit\": 50\n}", "language": "json", "name": "JSON" }, { "code": "require './lib/SkyEncoder.php';\n$sky = new SkyEncoder('your-secret-key', 'your-api-token');\n\n$resp = $sky->getJobs(array(\n\t'filters' => array('status'=>'Complete'),\n\t'sort' => array('events.created'=>-1),\n\t'page' => 1,\n\t'limit' => 50\n));", "language": "php" } ], "sidebar": true } [/block]
{"_id":"5446a89633b35d0e0023c587","__v":4,"slug":"create","version":"5446977f3168910800744db2","body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"file\\\": \\\"http://mydomain.com/media/my-source.flv\\\",\\n\\t\\\"outputs\\\": [{\\n\\t\\t\\\"type\\\": \\\"video\\\",\\n\\t\\t\\\"filename\\\": \\\"output-high.mp4\\\",\\n\\t\\t\\\"format\\\": \\\"mp4\\\",\\n\\t\\t\\\"video_codec\\\": \\\"h264\\\",\\n\\t\\t\\\"hint\\\": true\\n\\t}],\\n  \\\"passback_url\\\": \\\"http://yourdomain.com/passback/script.php\\\",\\n  \\\"passback\\\": {\\n    \\\"my-var\\\": 123456\\n  },\\n  \\\"passback_headers\\\": {\\n    \\\"Header-Token\\\": 123456789\\n  },\\n  \\\"delivery\\\": ['S3'],\\n  \\\"delivery_zip_filename\\\": \\\"output-files.zip\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"JSON\"\n    },\n    {\n      \"code\": \"require './lib/SkyEncoder.php';\\n$sky = new SkyEncoder('your-secret-key', 'your-api-token');\\n\\n$resp = $sky->createJob(array(\\n\\t'file' => 'http://mydomain.com/media/my-source.flv'\\n\\t'outputs' => array(\\n\\t\\t'type' => 'video',\\n\\t\\t'filename' => 'output-high.mp4',\\n\\t\\t'format' => 'mp4',\\n\\t\\t'video_codec' => 'h264',\\n\\t\\t'hint' => true\\n\\t),\\n));\",\n      \"language\": \"php\",\n      \"name\": \"PHP - Simple Example\"\n    },\n    {\n      \"code\": \"require './lib/SkyEncoder.php';\\n$sky = new SkyEncoder('your-secret-key', 'your-api-token');\\n\\n$resp = $sky->createJob(array(\\n\\t'file' => 'http://mydomain.com/media/my-source.flv'\\n\\t'outputs' => array(\\n\\t\\t'type' => 'video',\\n\\t\\t'filename' => 'output-high.mp4',\\n\\t\\t'preset' => 'mp4_medium'\\n\\t),\\n));\",\n      \"language\": \"php\",\n      \"name\": \"PHP - Presets\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"Make sure that you provide a publicly accessible URL for your source/input file.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"post\",\n  \"title\": \"Main Output Task Parameters\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Default\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"type (required)\",\n    \"1-0\": \"filename\",\n    \"2-0\": \"preset\",\n    \"0-1\": \"video\",\n    \"0-2\": \"Options: video, audio, image\",\n    \"1-1\": \"(source video name)\",\n    \"1-2\": \"The output video filename [(include extension)](/v1.0/docs/supported-containers-and-codecs).\",\n    \"2-1\": \"\",\n    \"2-2\": \"Use the name of a pre-defined output task preset from our formats.json file.\",\n    \"3-0\": \"passback\",\n    \"3-2\": \"Output-specific passback parameters that will be included with the task details.\",\n    \"4-0\": \"priority\",\n    \"4-1\": \"0\",\n    \"4-2\": \"Output-specific priority order for dedicated resources. Output tasks are sorted in **DESCENDING and queue date** by the worker services.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"post\",\n  \"title\": \"Video Output Task Parameters\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Default\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"format\",\n    \"1-0\": \"video_codec\",\n    \"2-0\": \"video_codec_profile\",\n    \"3-0\": \"hint\",\n    \"4-0\": \"deinterlace\",\n    \"5-0\": \"audio_codec\",\n    \"6-0\": \"audio_channels\",\n    \"7-0\": \"audio_sample_rate\",\n    \"8-0\": \"height\",\n    \"9-0\": \"width\",\n    \"8-1\": \"(source height)\",\n    \"9-1\": \"(aspect ratio of height)\",\n    \"0-1\": \"mp4\",\n    \"0-2\": \"The output [video container](/v1.0/docs/supported-containers-and-codecs) to use\",\n    \"1-1\": \"h264\",\n    \"1-2\": \"The output[ video codec](/v1.0/docs/supported-containers-and-codecs) to use\",\n    \"2-1\": \"main\",\n    \"2-2\": \"H264 Codec Only; Options: main, baseline, high\",\n    \"3-1\": \"true\",\n    \"3-2\": \"H264 Codec Only; add moov atom\",\n    \"4-1\": \"false\",\n    \"4-2\": \"Deinterlace the output video\",\n    \"5-1\": \"aac\",\n    \"5-2\": \"The [audio codec](/v1.0/docs/supported-containers-and-codecs) for the output video\",\n    \"6-1\": \"(auto detect)\",\n    \"6-2\": \"Select the number of audio channels; options: 1 (mono), 0 (other/auto detect)\",\n    \"7-1\": \"22050\",\n    \"7-2\": \"The audio sample rate for the output\",\n    \"9-2\": \"Width in pixels\",\n    \"8-2\": \"Height in pixels\"\n  },\n  \"cols\": 3,\n  \"rows\": 10\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"post\",\n  \"title\": \"Audio Output Task Parameters\"\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Default\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"format\",\n    \"1-0\": \"audio_bitrate\",\n    \"2-0\": \"audio_channels\",\n    \"3-0\": \"sample_rate\",\n    \"4-0\": \"max_sample_rate\",\n    \"0-1\": \"aac\",\n    \"1-1\": \"128\",\n    \"2-1\": \"(auto detect)\",\n    \"3-1\": \"(auto detect)\",\n    \"4-1\": \"\",\n    \"0-2\": \"The output [audio codec](/v1.0/docs/supported-containers-and-codecs) to use\",\n    \"1-2\": \"The audio bitrate\",\n    \"2-2\": \"Select the number of audio channels; options: 1 (mono), 0 (other/auto detect)\",\n    \"3-2\": \"The audio sample rate for the output\",\n    \"4-2\": \"The max audio sample rate for the output\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"post\",\n  \"title\": \"Image Output Task Parameters\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Default\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"format\",\n    \"0-1\": \"jpg\",\n    \"0-2\": \"Image format; Options: jpg, png, gif\",\n    \"1-0\": \"seconds\",\n    \"1-1\": \"0\",\n    \"1-2\": \"The number of seconds into the video to take the screenshot.\",\n    \"2-0\": \"height\",\n    \"2-1\": \"(source height)\",\n    \"2-2\": \"Height in pixels\",\n    \"3-0\": \"width\",\n    \"3-1\": \"(aspect ratio of height)\",\n    \"3-2\": \"Width in pixels\"\n  },\n  \"cols\": 3,\n  \"rows\": 4\n}\n[/block]","category":"5447be670319802200fc0624","editedParams2":true,"order":1,"user":"544694c43168910800744d9e","editedParams":true,"githubsync":"","link_external":false,"link_url":"","title":"/jobs/create","updates":[],"project":"5446977f3168910800744daf","sync_unique":"","api":{"auth":"never","basic_auth":false,"method":"post","params":[{"required":true,"desc":"URL of the source file for the encoding job.","default":"","type":"string","name":"file","in":"body","_id":"5446a89633b35d0e0023c588"},{"type":"array_mixed","in":"body","_id":"5446a8ddae0040140035f9aa","default":"","desc":"The collection of output tasks for this job. See tables below for more details.","name":"outputs","required":true},{"name":"passback_url","in":"body","_id":"5446a9c4ae0040140035f9b1","required":false,"desc":"The URL to post a success response to. See details below for more information.","default":"","type":"string"},{"name":"passback","in":"body","_id":"5446a9c4ae0040140035f9b0","required":false,"desc":"An array of values to send back with the passback URL.","default":"","type":"array_mixed"},{"desc":"An array of HTTP headers to use when making the HTTP POST request to the passback_url","default":"","type":"array_mixed","name":"passback_headers","in":"body","_id":"5446a9c4ae0040140035f9af","required":false},{"type":"array_mixed","name":"delivery","in":"body","_id":"5446a9c4ae0040140035f9b2","required":false,"desc":"The pre-configured delivery options you would like to use for this job. The output files for this job will be uploaded to these. Supported: Amazon S3, Rackspace CloudFiles and FTP. Provide an array of option names.","default":""},{"_id":"5449529ecdc9442200488585","required":false,"desc":"To package all the output files into a single zipped package for external delivery just provide a filename for the zipped package.","default":"(source filename .zip)","type":"string","name":"delivery_filename","in":"body"},{"_id":"544f9afdcf9f86080080155a","required":false,"desc":"A flag to enable testing the request integration. A job marked as a test will not create jobs.","default":"false","type":"boolean","name":"test","in":"body"}],"results":{"codes":[{"name":"","code":"{\n\t\"error\": 1,\n  \"msg\": \"\",\n  \"data\": {\n    ...\n  }\n}","language":"json","status":200},{"name":"","code":"{\n\t\"error\":1,\n  \"msg\":\"Your error message\",\n  \"data\":{}\n}","language":"json","status":400}]},"try":false,"url":"/jobs/create"},"createdAt":"2014-10-21T18:40:22.063Z","excerpt":"Create a new encoding job. Sky Encoder provides some very robust preset data that is available for you to use. We also keep a consumable JSON file of data that serves as a great reference for dynamic applications. You can find that file at http://skyencoder.com/js/formats.json","hidden":false,"is_link":false,"type":"post","childrenPages":[]}

post/jobs/create

Create a new encoding job. Sky Encoder provides some very robust preset data that is available for you to use. We also keep a consumable JSON file of data that serves as a great reference for dynamic applications. You can find that file at http://skyencoder.com/js/formats.json

Body Params

file:
required
string
URL of the source file for the encoding job.
outputs:
required
array of mixed
The collection of output tasks for this job. See tables below for more details.
passback_url:
string
The URL to post a success response to. See details below for more information.
passback:
array of mixed
An array of values to send back with the passback URL.
passback_headers:
array of mixed
An array of HTTP headers to use when making the HTTP POST request to the passback_url
delivery:
array of mixed
The pre-configured delivery options you would like to use for this job. The output files for this job will be uploaded to these. Supported: Amazon S3, Rackspace CloudFiles and FTP. Provide an array of option names.
delivery_filename:
string(source filename .zip)
To package all the output files into a single zipped package for external delivery just provide a filename for the zipped package.
test:
booleanfalse
A flag to enable testing the request integration. A job marked as a test will not create jobs.
[block:code] { "codes": [ { "code": "{\n\t\"file\": \"http://mydomain.com/media/my-source.flv\",\n\t\"outputs\": [{\n\t\t\"type\": \"video\",\n\t\t\"filename\": \"output-high.mp4\",\n\t\t\"format\": \"mp4\",\n\t\t\"video_codec\": \"h264\",\n\t\t\"hint\": true\n\t}],\n \"passback_url\": \"http://yourdomain.com/passback/script.php\",\n \"passback\": {\n \"my-var\": 123456\n },\n \"passback_headers\": {\n \"Header-Token\": 123456789\n },\n \"delivery\": ['S3'],\n \"delivery_zip_filename\": \"output-files.zip\"\n}", "language": "json", "name": "JSON" }, { "code": "require './lib/SkyEncoder.php';\n$sky = new SkyEncoder('your-secret-key', 'your-api-token');\n\n$resp = $sky->createJob(array(\n\t'file' => 'http://mydomain.com/media/my-source.flv'\n\t'outputs' => array(\n\t\t'type' => 'video',\n\t\t'filename' => 'output-high.mp4',\n\t\t'format' => 'mp4',\n\t\t'video_codec' => 'h264',\n\t\t'hint' => true\n\t),\n));", "language": "php", "name": "PHP - Simple Example" }, { "code": "require './lib/SkyEncoder.php';\n$sky = new SkyEncoder('your-secret-key', 'your-api-token');\n\n$resp = $sky->createJob(array(\n\t'file' => 'http://mydomain.com/media/my-source.flv'\n\t'outputs' => array(\n\t\t'type' => 'video',\n\t\t'filename' => 'output-high.mp4',\n\t\t'preset' => 'mp4_medium'\n\t),\n));", "language": "php", "name": "PHP - Presets" } ], "sidebar": true } [/block] [block:callout] { "type": "warning", "body": "Make sure that you provide a publicly accessible URL for your source/input file." } [/block] [block:api-header] { "type": "post", "title": "Main Output Task Parameters" } [/block] [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Default", "h-2": "Description", "0-0": "type (required)", "1-0": "filename", "2-0": "preset", "0-1": "video", "0-2": "Options: video, audio, image", "1-1": "(source video name)", "1-2": "The output video filename [(include extension)](/v1.0/docs/supported-containers-and-codecs).", "2-1": "", "2-2": "Use the name of a pre-defined output task preset from our formats.json file.", "3-0": "passback", "3-2": "Output-specific passback parameters that will be included with the task details.", "4-0": "priority", "4-1": "0", "4-2": "Output-specific priority order for dedicated resources. Output tasks are sorted in **DESCENDING and queue date** by the worker services." }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "post", "title": "Video Output Task Parameters" } [/block] [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Default", "h-2": "Description", "0-0": "format", "1-0": "video_codec", "2-0": "video_codec_profile", "3-0": "hint", "4-0": "deinterlace", "5-0": "audio_codec", "6-0": "audio_channels", "7-0": "audio_sample_rate", "8-0": "height", "9-0": "width", "8-1": "(source height)", "9-1": "(aspect ratio of height)", "0-1": "mp4", "0-2": "The output [video container](/v1.0/docs/supported-containers-and-codecs) to use", "1-1": "h264", "1-2": "The output[ video codec](/v1.0/docs/supported-containers-and-codecs) to use", "2-1": "main", "2-2": "H264 Codec Only; Options: main, baseline, high", "3-1": "true", "3-2": "H264 Codec Only; add moov atom", "4-1": "false", "4-2": "Deinterlace the output video", "5-1": "aac", "5-2": "The [audio codec](/v1.0/docs/supported-containers-and-codecs) for the output video", "6-1": "(auto detect)", "6-2": "Select the number of audio channels; options: 1 (mono), 0 (other/auto detect)", "7-1": "22050", "7-2": "The audio sample rate for the output", "9-2": "Width in pixels", "8-2": "Height in pixels" }, "cols": 3, "rows": 10 } [/block] [block:api-header] { "type": "post", "title": "Audio Output Task Parameters" } [/block] [block:textarea] { "text": "", "sidebar": true } [/block] [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Default", "h-2": "Description", "0-0": "format", "1-0": "audio_bitrate", "2-0": "audio_channels", "3-0": "sample_rate", "4-0": "max_sample_rate", "0-1": "aac", "1-1": "128", "2-1": "(auto detect)", "3-1": "(auto detect)", "4-1": "", "0-2": "The output [audio codec](/v1.0/docs/supported-containers-and-codecs) to use", "1-2": "The audio bitrate", "2-2": "Select the number of audio channels; options: 1 (mono), 0 (other/auto detect)", "3-2": "The audio sample rate for the output", "4-2": "The max audio sample rate for the output" }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "post", "title": "Image Output Task Parameters" } [/block] [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Default", "h-2": "Description", "0-0": "format", "0-1": "jpg", "0-2": "Image format; Options: jpg, png, gif", "1-0": "seconds", "1-1": "0", "1-2": "The number of seconds into the video to take the screenshot.", "2-0": "height", "2-1": "(source height)", "2-2": "Height in pixels", "3-0": "width", "3-1": "(aspect ratio of height)", "3-2": "Width in pixels" }, "cols": 3, "rows": 4 } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Result Format



[block:code] { "codes": [ { "code": "{\n\t\"file\": \"http://mydomain.com/media/my-source.flv\",\n\t\"outputs\": [{\n\t\t\"type\": \"video\",\n\t\t\"filename\": \"output-high.mp4\",\n\t\t\"format\": \"mp4\",\n\t\t\"video_codec\": \"h264\",\n\t\t\"hint\": true\n\t}],\n \"passback_url\": \"http://yourdomain.com/passback/script.php\",\n \"passback\": {\n \"my-var\": 123456\n },\n \"passback_headers\": {\n \"Header-Token\": 123456789\n },\n \"delivery\": ['S3'],\n \"delivery_zip_filename\": \"output-files.zip\"\n}", "language": "json", "name": "JSON" }, { "code": "require './lib/SkyEncoder.php';\n$sky = new SkyEncoder('your-secret-key', 'your-api-token');\n\n$resp = $sky->createJob(array(\n\t'file' => 'http://mydomain.com/media/my-source.flv'\n\t'outputs' => array(\n\t\t'type' => 'video',\n\t\t'filename' => 'output-high.mp4',\n\t\t'format' => 'mp4',\n\t\t'video_codec' => 'h264',\n\t\t'hint' => true\n\t),\n));", "language": "php", "name": "PHP - Simple Example" }, { "code": "require './lib/SkyEncoder.php';\n$sky = new SkyEncoder('your-secret-key', 'your-api-token');\n\n$resp = $sky->createJob(array(\n\t'file' => 'http://mydomain.com/media/my-source.flv'\n\t'outputs' => array(\n\t\t'type' => 'video',\n\t\t'filename' => 'output-high.mp4',\n\t\t'preset' => 'mp4_medium'\n\t),\n));", "language": "php", "name": "PHP - Presets" } ], "sidebar": true } [/block] [block:callout] { "type": "warning", "body": "Make sure that you provide a publicly accessible URL for your source/input file." } [/block] [block:api-header] { "type": "post", "title": "Main Output Task Parameters" } [/block] [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Default", "h-2": "Description", "0-0": "type (required)", "1-0": "filename", "2-0": "preset", "0-1": "video", "0-2": "Options: video, audio, image", "1-1": "(source video name)", "1-2": "The output video filename [(include extension)](/v1.0/docs/supported-containers-and-codecs).", "2-1": "", "2-2": "Use the name of a pre-defined output task preset from our formats.json file.", "3-0": "passback", "3-2": "Output-specific passback parameters that will be included with the task details.", "4-0": "priority", "4-1": "0", "4-2": "Output-specific priority order for dedicated resources. Output tasks are sorted in **DESCENDING and queue date** by the worker services." }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "post", "title": "Video Output Task Parameters" } [/block] [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Default", "h-2": "Description", "0-0": "format", "1-0": "video_codec", "2-0": "video_codec_profile", "3-0": "hint", "4-0": "deinterlace", "5-0": "audio_codec", "6-0": "audio_channels", "7-0": "audio_sample_rate", "8-0": "height", "9-0": "width", "8-1": "(source height)", "9-1": "(aspect ratio of height)", "0-1": "mp4", "0-2": "The output [video container](/v1.0/docs/supported-containers-and-codecs) to use", "1-1": "h264", "1-2": "The output[ video codec](/v1.0/docs/supported-containers-and-codecs) to use", "2-1": "main", "2-2": "H264 Codec Only; Options: main, baseline, high", "3-1": "true", "3-2": "H264 Codec Only; add moov atom", "4-1": "false", "4-2": "Deinterlace the output video", "5-1": "aac", "5-2": "The [audio codec](/v1.0/docs/supported-containers-and-codecs) for the output video", "6-1": "(auto detect)", "6-2": "Select the number of audio channels; options: 1 (mono), 0 (other/auto detect)", "7-1": "22050", "7-2": "The audio sample rate for the output", "9-2": "Width in pixels", "8-2": "Height in pixels" }, "cols": 3, "rows": 10 } [/block] [block:api-header] { "type": "post", "title": "Audio Output Task Parameters" } [/block] [block:textarea] { "text": "", "sidebar": true } [/block] [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Default", "h-2": "Description", "0-0": "format", "1-0": "audio_bitrate", "2-0": "audio_channels", "3-0": "sample_rate", "4-0": "max_sample_rate", "0-1": "aac", "1-1": "128", "2-1": "(auto detect)", "3-1": "(auto detect)", "4-1": "", "0-2": "The output [audio codec](/v1.0/docs/supported-containers-and-codecs) to use", "1-2": "The audio bitrate", "2-2": "Select the number of audio channels; options: 1 (mono), 0 (other/auto detect)", "3-2": "The audio sample rate for the output", "4-2": "The max audio sample rate for the output" }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "post", "title": "Image Output Task Parameters" } [/block] [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Default", "h-2": "Description", "0-0": "format", "0-1": "jpg", "0-2": "Image format; Options: jpg, png, gif", "1-0": "seconds", "1-1": "0", "1-2": "The number of seconds into the video to take the screenshot.", "2-0": "height", "2-1": "(source height)", "2-2": "Height in pixels", "3-0": "width", "3-1": "(aspect ratio of height)", "3-2": "Width in pixels" }, "cols": 3, "rows": 4 } [/block]
{"_id":"544fa40acf9f8608008015f8","excerpt":"","project":"5446977f3168910800744daf","title":"/jobs/details","updates":[],"user":"544694c43168910800744d9e","__v":0,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n \\\"id\\\": \\\"123456\\\" \\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"require './lib/SkyEncoder.php';\\n$sky = new SkyEncoder('your-secret-key', 'your-api-token');\\n\\n$resp = $sky->getJob('123456');\",\n      \"language\": \"php\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","createdAt":"2014-10-28T14:11:22.132Z","editedParams":true,"editedParams2":true,"is_link":false,"version":"5446977f3168910800744db2","githubsync":"","link_url":"","order":2,"slug":"jobsdetails","sync_unique":"","api":{"basic_auth":false,"method":"post","params":[{"desc":"The job ID","default":"","type":"string","name":"id","in":"body","_id":"544fa40acf9f8608008015f9","required":true}],"results":{"codes":[{"status":200,"language":"json","code":"{\n\t\"error\": 0,\n  \"msg\": \"\",\n  \"data\": {\n   ... \n  }\n}","name":""},{"status":400,"language":"json","code":"{\n\t\"error\": 1,\n  \"msg\": \"Your error message.\",\n  \"data\": {}\n}","name":""}]},"try":false,"url":"/jobs/details","auth":"never"},"category":"5447be670319802200fc0624","type":"post","childrenPages":[]}

post/jobs/details


Body Params

id:
required
string
The job ID
[block:code] { "codes": [ { "code": "{\n \"id\": \"123456\" \n}", "language": "json" }, { "code": "require './lib/SkyEncoder.php';\n$sky = new SkyEncoder('your-secret-key', 'your-api-token');\n\n$resp = $sky->getJob('123456');", "language": "php" } ], "sidebar": true } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Result Format



[block:code] { "codes": [ { "code": "{\n \"id\": \"123456\" \n}", "language": "json" }, { "code": "require './lib/SkyEncoder.php';\n$sky = new SkyEncoder('your-secret-key', 'your-api-token');\n\n$resp = $sky->getJob('123456');", "language": "php" } ], "sidebar": true } [/block]
{"_id":"5447bdfe8d7af31a00dd4062","is_link":false,"link_url":"","slug":"cancel","api":{"try":false,"url":"/jobs/cancel","auth":"never","basic_auth":false,"method":"post","params":[{"desc":"Job ID","default":"","type":"string","name":"id","in":"body","_id":"5447bdfe8d7af31a00dd4063","required":true}],"results":{"codes":[{"language":"json","code":"{\n\t\"error\": 0,\n  \"msg\": \"\",\n  \"data\": {}\n}","name":"","status":200},{"status":400,"language":"json","code":"{\n\t\"error\": 1,\n  \"msg\": \"Your error message.\",\n  \"data\": {}\n}","name":""}]}},"category":"5447be670319802200fc0624","editedParams2":true,"excerpt":"Cancel an active job and all of it's output tasks.","githubsync":"","user":"544694c43168910800744d9e","version":"5446977f3168910800744db2","project":"5446977f3168910800744daf","updates":[],"sync_unique":"","title":"/jobs/cancel","__v":0,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": \\\"1234567890\\\",\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"require './lib/SkyEncoder.php';\\n$sky = new SkyEncoder('your-secret-key', 'your-api-token');\\n\\n$resp = $sky->cancelJob('1234567890');\",\n      \"language\": \"php\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","createdAt":"2014-10-22T14:23:58.803Z","editedParams":true,"order":3,"type":"post","childrenPages":[]}

post/jobs/cancel

Cancel an active job and all of it's output tasks.

Body Params

id:
required
string
Job ID
[block:code] { "codes": [ { "code": "{\n \"id\": \"1234567890\",\n}", "language": "json" }, { "code": "require './lib/SkyEncoder.php';\n$sky = new SkyEncoder('your-secret-key', 'your-api-token');\n\n$resp = $sky->cancelJob('1234567890');", "language": "php" } ], "sidebar": true } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Result Format



[block:code] { "codes": [ { "code": "{\n \"id\": \"1234567890\",\n}", "language": "json" }, { "code": "require './lib/SkyEncoder.php';\n$sky = new SkyEncoder('your-secret-key', 'your-api-token');\n\n$resp = $sky->cancelJob('1234567890');", "language": "php" } ], "sidebar": true } [/block]
{"_id":"5447bee38d7af31a00dd406e","version":"5446977f3168910800744db2","api":{"results":{"codes":[{"status":200,"language":"json","code":"{\n\t\"error\": 0,\n  \"msg\": \"\",\n  \"data\": {}\n}","name":""},{"status":400,"language":"json","code":"{\n\t\"error\": 1,\n  \"msg\": \"Your error message\",\n  \"data\": {}\n}","name":""}]},"try":false,"url":"/tasks/cancel","auth":"never","basic_auth":false,"method":"post","params":[{"_id":"5447bee38d7af31a00dd406f","required":true,"desc":"Task ID","default":"","type":"string","name":"id","in":"body"}]},"createdAt":"2014-10-22T14:27:47.921Z","githubsync":"","project":"5446977f3168910800744daf","title":"/tasks/cancel","user":"544694c43168910800744d9e","body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": \\\"1234567890\\\"\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"require './lib/SkyEncoder.php';\\n$sky = new SkyEncoder('your-secret-key', 'your-api-token');\\n\\n$resp = $sky->cancelTask('1234567890');\",\n      \"language\": \"php\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","category":"5447be5a0319802200fc0622","editedParams":true,"order":0,"updates":[],"__v":0,"excerpt":"Cancel an individual output task.","slug":"cancel-1","type":"post","editedParams2":true,"is_link":false,"link_url":"","sync_unique":"","childrenPages":[]}

post/tasks/cancel

Cancel an individual output task.

Body Params

id:
required
string
Task ID
[block:code] { "codes": [ { "code": "{\n \"id\": \"1234567890\"\n}", "language": "json" }, { "code": "require './lib/SkyEncoder.php';\n$sky = new SkyEncoder('your-secret-key', 'your-api-token');\n\n$resp = $sky->cancelTask('1234567890');", "language": "php" } ], "sidebar": true } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Result Format



[block:code] { "codes": [ { "code": "{\n \"id\": \"1234567890\"\n}", "language": "json" }, { "code": "require './lib/SkyEncoder.php';\n$sky = new SkyEncoder('your-secret-key', 'your-api-token');\n\n$resp = $sky->cancelTask('1234567890');", "language": "php" } ], "sidebar": true } [/block]
{"_id":"544804028d7af31a00dd415b","body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"start\\\": \\\"\\\",\\n  \\\"end\\\": \\\"\\\"\\n}\",\n      \"language\": \"json\"\n    },\n    {\n      \"code\": \"require './lib/SkyEncoder.php';\\n$sky = new SkyEncoder('your-secret-key', 'your-api-token');\\n\\n/* get the output minutes for the year */\\n$resp = $sky->getUsageReport(array(\\n\\t'start' => mktime(0, 0, 0, 1, 1, date('Y')),\\n\\t'end' => time()\\n));\",\n      \"language\": \"php\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","category":"544802bb0319802200fc0753","editedParams2":true,"is_link":false,"link_url":"","order":0,"updates":[],"api":{"params":[{"in":"body","_id":"544804028d7af31a00dd415d","required":false,"desc":"The start date. All dates should be formatted as a standard ISO 8601 date or Unix timestamp.","default":"(First of Current Month)","type":"datetime","name":"start"},{"default":"(Current Date)","type":"datetime","name":"end","in":"body","_id":"544804028d7af31a00dd415c","required":false,"desc":"The end date. All dates should be formatted as a standard ISO 8601 date or Unix timestamp."}],"results":{"codes":[{"code":"{\n\t\"error\": 0,\n  \"msg\": \"\",\n  \"data\": {}\n}","name":"","status":200,"language":"json"},{"name":"","status":400,"language":"json","code":"{\n\t\"error\": 1,\n  \"msg\": \"Your error message\",\n  \"data\": {}\n}"}]},"try":false,"url":"/reports/usage","auth":"never","basic_auth":false,"method":"post"},"slug":"reportsoutput","sync_unique":"","type":"post","editedParams":true,"createdAt":"2014-10-22T19:22:42.150Z","title":"/reports/usage","version":"5446977f3168910800744db2","__v":0,"excerpt":"Get a date range report on the total amount of output minutes, costs, jobs and tasks for the given range. The time is broken down by daily usage.","githubsync":"","project":"5446977f3168910800744daf","user":"544694c43168910800744d9e","childrenPages":[]}

post/reports/usage

Get a date range report on the total amount of output minutes, costs, jobs and tasks for the given range. The time is broken down by daily usage.

Body Params

start:
datetime(First of Current Month)
The start date. All dates should be formatted as a standard ISO 8601 date or Unix timestamp.
end:
datetime(Current Date)
The end date. All dates should be formatted as a standard ISO 8601 date or Unix timestamp.
[block:code] { "codes": [ { "code": "{\n \"start\": \"\",\n \"end\": \"\"\n}", "language": "json" }, { "code": "require './lib/SkyEncoder.php';\n$sky = new SkyEncoder('your-secret-key', 'your-api-token');\n\n/* get the output minutes for the year */\n$resp = $sky->getUsageReport(array(\n\t'start' => mktime(0, 0, 0, 1, 1, date('Y')),\n\t'end' => time()\n));", "language": "php" } ], "sidebar": true } [/block]

Definition

{{ api_url }}{{ page_api_url }}

Result Format



[block:code] { "codes": [ { "code": "{\n \"start\": \"\",\n \"end\": \"\"\n}", "language": "json" }, { "code": "require './lib/SkyEncoder.php';\n$sky = new SkyEncoder('your-secret-key', 'your-api-token');\n\n/* get the output minutes for the year */\n$resp = $sky->getUsageReport(array(\n\t'start' => mktime(0, 0, 0, 1, 1, date('Y')),\n\t'end' => time()\n));", "language": "php" } ], "sidebar": true } [/block]
{"_id":"545cf2cd134a0808005d446e","sync_unique":"","category":"545cf0235b86c608004df7a6","excerpt":"","githubsync":"","version":"5446977f3168910800744db2","api":{"params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"try":true,"url":"","auth":"never","basic_auth":false},"project":"5446977f3168910800744daf","slug":"encoding-errors","type":"basic","user":"544694c43168910800744d9e","__v":1,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"The Basics About Error Handling\"\n}\n[/block]\nDetails About Standard Error Response\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Invalid Output Tasks\"\n}\n[/block]\nDetails about how the create API handles invalid output tasks.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Encoding Errors\"\n}\n[/block]\nDetails about how to handle errors encountered during encoding.","link_url":"","title":"Errors, errors, errors!","updates":[],"createdAt":"2014-11-07T16:26:53.888Z","is_link":false,"order":999,"childrenPages":[]}

Errors, errors, errors!


[block:api-header] { "type": "basic", "title": "The Basics About Error Handling" } [/block] Details About Standard Error Response [block:api-header] { "type": "basic", "title": "Invalid Output Tasks" } [/block] Details about how the create API handles invalid output tasks. [block:api-header] { "type": "basic", "title": "Encoding Errors" } [/block] Details about how to handle errors encountered during encoding.
[block:api-header] { "type": "basic", "title": "The Basics About Error Handling" } [/block] Details About Standard Error Response [block:api-header] { "type": "basic", "title": "Invalid Output Tasks" } [/block] Details about how the create API handles invalid output tasks. [block:api-header] { "type": "basic", "title": "Encoding Errors" } [/block] Details about how to handle errors encountered during encoding.