Child pages
  • Add Video on Demand CDN Resource
Skip to end of metadata
Go to start of metadata

To create an HTTP resource, use the following request:

POST /cdn_resources.xml
POST /cdn_resources.json

Add VoD PULL XML Request example

curl -i -X POST -d '<cdn_resource><cdn_hostname>az.test.api</cdn_hostname><edge_group_ids type="array"><edge_group_id type="integer">7</edge_group_id></edge_group_ids><resource_type>STREAM_VOD_PULL</resource_type><origin>test.origin.com</origin></cdn_resource>' -u user:userpass http://onapp.test/cdn_resources.xml -H 'Accept: application/xml' -H 'Content-type: application/xml' 

Add VoD PULL JSON Request example

curl -i -u user:userpass -X POST http://onapp.test/cdn_resources.json -H 'Accept: application/json' -H 'Content-type: application/json' -d '{"cdn_resource":{"cdn_hostname":"cdn.test.co","resource_type":"STREAM_VOD_PULL","edge_group_ids":[7],"origin":"test.origin.com"}}'

Add VoD PUSH XML Request example

curl -i -X POST -d '<cdn_resource><cdn_hostname>cdn.test.co</cdn_hostname><edge_group_ids type="array"><edge_group_id type="integer">7</edge_group_id></edge_group_ids><resource_type>STREAM_VOD_PUSH</resource_type><ftp_password>j3x8svqybA2gmrgYOZSrOlYToQ</ftp_password></cdn_resource>' -u user:userpass http://onapp.test/cdn_resources.xml -H 'Accept: application/xml' -H 'Content-type: application/xml' 

Add VoD PUSH JSON Request example

curl -i -u user:userpass -X POST http://onapp.test/cdn_resources.json -H 'Accept: application/json' -H 'Content-type: application/json' -d '{"cdn_resource":{"cdn_hostname":"cdn.test.co","resource_type":"STREAM_VOD_PUSH","edge_group_ids":[7],"ftp_password":"j3x8svqybA2gmrgYOZSrOlYToQ"}}'

Where:

cdn_hostname * - specify the name which will serve as a label only

resource_type* - specify the resource type - STREAM_VOD_PULL or STREAM_VOD_PUSH

origin* - the path from which the CDN requests the content (for VoD PULL request).

edge_group_ids * - indicate the ID(s) of required CDN edge groups

ftp_password * - specify the FTP password for VoD PUSH type. It should consist of 6-32 alphanumeric symbols.

 

Response

#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))
  • No labels