REST API Reference
CastConductor provides a REST API for retrieving channel content.
Base URL
Authentication
Most read endpoints are public. Write operations require authentication via:
- License Key: Header
X-CastConductor-License - WordPress Nonce: For authenticated WordPress users
Endpoints
Content Blocks
List Content Blocks
Parameters:
| Param | Type | Description |
|---|---|---|
type | string | Filter by content type |
per_page | int | Items per page (default: 20) |
page | int | Page number |
Response:
{
"blocks": [
{
"id": 123,
"title": "Featured Video",
"type": "video",
"url": "https://example.com/video.mp4",
"thumbnail": "https://example.com/thumb.jpg",
"metadata": {}
}
],
"total": 50,
"pages": 3
}
Get Single Block
Scenes
List Scenes
Get Scene
Response:
{
"id": 1,
"name": "Home",
"layout": {
"elements": [
{
"blockId": 123,
"x": 100,
"y": 50,
"width": 400,
"height": 225
}
]
},
"navigation": {}
}
Containers
List Containers
Get Container
App Configuration
Get App Config
Returns the complete app configuration for Roku.
Error Handling
All errors return standard HTTP status codes:
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request |
| 401 | Unauthorized |
| 404 | Not Found |
| 500 | Server Error |
Error Response:
Rate Limiting
API requests are rate-limited to prevent abuse:
- 100 requests/minute per IP
- 1000 requests/hour per license
Examples
cURL
curl -X GET "https://yoursite.com/wp-json/castconductor/v5/content-blocks" \
-H "Accept: application/json"