Query Encoding Jobs
Multi-purpose POST endpoint. Behaviour depends on body content: - No body + query string r / r&i: filter jobs by date range and optionally zone. - Body view=job: get single job details by jobid and index (form-encoded). - Body view=new: get new / polling jobs (form-encoded).
curl -X POST "https://api.5centscdn.com/v2/transcoding?r=2024-01-15%2000%3A00%20-%202024-01-31%2023%3A59&i=5678" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"view": "job",
"jobid": 12345,
"index": 0,
"jobids": [
101,
102
]
}'
import requests
import json
url = "https://api.5centscdn.com/v2/transcoding?r=2024-01-15%2000%3A00%20-%202024-01-31%2023%3A59&i=5678"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"view": "job",
"jobid": 12345,
"index": 0,
"jobids": [
101,
102
]
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.5centscdn.com/v2/transcoding?r=2024-01-15%2000%3A00%20-%202024-01-31%2023%3A59&i=5678", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"view": "job",
"jobid": 12345,
"index": 0,
"jobids": [
101,
102
]
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"view": "job",
"jobid": 12345,
"index": 0,
"jobids": [
101,
102
]
}`)
req, err := http.NewRequest("POST", "https://api.5centscdn.com/v2/transcoding?r=2024-01-15%2000%3A00%20-%202024-01-31%2023%3A59&i=5678", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.5centscdn.com/v2/transcoding?r=2024-01-15%2000%3A00%20-%202024-01-31%2023%3A59&i=5678')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['X-API-Key'] = 'YOUR_API_KEY'
request.body = '{
"view": "job",
"jobid": 12345,
"index": 0,
"jobids": [
101,
102
]
}'
response = http.request(request)
puts response.body
{
"zonesInRange": [
12345,
67890,
11111
],
"logsInRange": [],
"billed": {
"jobs": 0,
"secs": 0,
"mins": "0 mins",
"sourceMins": "0 mins",
"completed": 0,
"active": 0
}
}
/transcoding
Target server for requests. Edit to use your own host.
API key (sent in header)
Date-time range filter. Format: YYYY-MM-DD HH:mm - YYYY-MM-DD HH:mm. Maximum span is 31 days; time component is required.
Optional integer filter to restrict results to a specific zone or profile.
The media type of the request body
Switches the query operation. job = fetch paginated job list filtered by date range. new = poll for status updates on specific job IDs (requires jobids[]).
Job ID. Required when view=job.
Job index. Required when view=job.
Array of job IDs to check for status updates. Required when view=new. Sent as repeated URL-encoded params (e.g. jobids[]=101&jobids[]=102).
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Provide your API key in the header.
Query Parameters
Date-time range filter. Format: YYYY-MM-DD HH:mm - YYYY-MM-DD HH:mm. Maximum span is 31 days; time component is required.
2024-01-15 00:00 - 2024-01-31 23:59Body
Switches the query operation. job = fetch paginated job list filtered by date range. new = poll for status updates on specific job IDs (requires jobids[]).
jobnewArray of job IDs to check for status updates. Required when view=new. Sent as repeated URL-encoded params (e.g. jobids[]=101&jobids[]=102).
[101,102]Responses
Array of zone IDs that have encoding jobs within the queried date range.
Array of encoding job log entries within the queried date range.
Billing summary for encoding jobs in the queried period.
Total number of encoding jobs in the period.
Total billed duration in seconds.
Human-readable total billed duration.
Total source video duration in minutes.
Number of successfully completed encoding jobs.
Number of currently active or in-progress encoding jobs.