POST
/v1/channel/content
Get scheduled content for a channel by GUID
Overview
Returns all active content scheduled for a specific channel. Content is filtered based on the current date/time, day of week restrictions, and schedule settings. Files are returned with presigned S3 URLs valid for 2 hours.
Note: S3 URLs expire after 2 hours. Request new content before URLs expire.
Request
Endpoint
HTTP Request
POST https://api.pixelsuite.com.au/v1/channel/content
Request Body (JSON)
| Parameter | Type | Required | Description |
|---|---|---|---|
guid |
string | Yes | Channel GUID (8-64 characters) |
screenMode |
string | No | Screen orientation: land, port, land-180, port-180Default: land |
Example Request
cURL
curl -X POST "https://api.pixelsuite.com.au/v1/channel/content" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"guid": "abc123-def456-ghi789",
"screenMode": "land"
}'
Response
Success Response (200 OK)
JSON
{
"success": true,
"data": {
"channel": {
"ID": 123,
"name": "Main Lobby Display",
"guid": "abc123-def456-ghi789"
},
"content": [
{
"ID": 456,
"name": "Summer Sale 2024",
"type": "signage",
"url": "https://s3.amazonaws.com/...",
"onScreenTime": 15,
"order": 1
},
{
"ID": 789,
"name": "Lunch Menu",
"type": "menu",
"url": "https://s3.amazonaws.com/...",
"onScreenTime": 30,
"order": 2
}
],
"checksum": "a1b2c3d4e5f6"
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
channel |
object | Channel information |
content |
array | Array of scheduled content items |
content[].type |
string | Content type: signage, menu, video |
content[].url |
string | Presigned S3 URL (valid 2 hours) |
content[].onScreenTime |
integer | Display duration in seconds |
content[].order |
integer | Display order |
checksum |
string | Content checksum for change detection |
Error Responses
400 Bad Request
Invalid or missing GUID.
{
"success": false,
"error": "Validation failed",
"message": "Parameter 'guid' is required"
}
404 Not Found
Channel not found or archived.
{
"success": false,
"error": "Channel not found",
"message": "No channel exists with the provided GUID"
}
Use Cases
Digital Signage Player
Fetch content playlist for display on digital signage screens.
Content Updates
Poll regularly and check checksum to detect content changes.
Mobile Displays
Use screenMode to request content optimized for portrait/landscape.
Content Caching
Download media files using S3 URLs for offline playback.
Code Examples
PHP
<?php
$apiKey = 'YOUR_API_KEY';
$url = 'https://api.pixelsuite.com.au/v1/channel/content';
$data = [
'guid' => 'abc123-def456-ghi789',
'screenMode' => 'land'
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer {$apiKey}",
"Content-Type: application/json"
]);
$response = curl_exec($ch);
$result = json_decode($response, true);
if ($result['success']) {
echo "Channel: {$result['data']['channel']['name']}\n";
echo "Content items: " . count($result['data']['content']) . "\n\n";
foreach ($result['data']['content'] as $item) {
echo "- {$item['name']} ({$item['type']}) - {$item['onScreenTime']}s\n";
}
}
curl_close($ch);
JavaScript
const apiKey = 'YOUR_API_KEY';
const url = 'https://api.pixelsuite.com.au/v1/channel/content';
const data = {
guid: 'abc123-def456-ghi789',
screenMode: 'land'
};
fetch(url, {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
},
body: JSON.stringify(data)
})
.then(res => res.json())
.then(result => {
if (result.success) {
console.log(`Channel: ${result.data.channel.name}`);
console.log(`Content items: ${result.data.content.length}\n`);
result.data.content.forEach(item => {
console.log(`- ${item.name} (${item.type}) - ${item.onScreenTime}s`);
});
}
})
.catch(error => console.error('Error:', error));
Python
import requests
api_key = 'YOUR_API_KEY'
url = 'https://api.pixelsuite.com.au/v1/channel/content'
headers = {
'Authorization': f'Bearer {api_key}',
'Content-Type': 'application/json'
}
data = {
'guid': 'abc123-def456-ghi789',
'screenMode': 'land'
}
response = requests.post(url, headers=headers, json=data)
result = response.json()
if result['success']:
print(f"Channel: {result['data']['channel']['name']}")
print(f"Content items: {len(result['data']['content'])}\n")
for item in result['data']['content']:
print(f"- {item['name']} ({item['type']}) - {item['onScreenTime']}s")