API Reference

Channels.newChannel

This method creates a new channel. On success the new channel ID will be returned to you.

The shortname will show up in many places, such as the email address for incoming media, and in some cases, URLs. It is highly recommended to pick a shortname that is lowercase and alphanumeric .


Syntax

int channels.newChannel ( int vhost, string name, string shortname, string description = '', int parentchannel = 0, array geoblocking = array(), string emailaddress = NULL, mixed visibility = 'SHOWN' )

Arguments

NameTypeRequiredDefault valueDescription
vhostintRequirednoneThe vhost id.
namestringRequirednoneThe name of the channel.
shortnamestringRequirednoneShortname (for email and urls).
descriptionstringOptional''A description of the content that the channel was created to group together.
parentchannelintOptional0Id of the parent channel (0 for no parent).
geoblockingarrayOptionalarray()Each item is a country code that is allowed to view the media item, if empty then all countries may view the media (default: empty).
emailaddressstringOptionalNULLEmail address to be used for media intake through email. Leave empty to disable, must be unique.
visibilitymixedOptional'SHOWN'"SHOWN or "HIDDEN". Hiding a channel does not make the media within private, hidden or otherwise inaccessible.

Response

The response on successfully deleting a channel.

NameDescription
resultThe new channel ID that has just been created.

Sample Response

Sample REST Response
http://api.newspark.ca/services/rest/channels/newChannel?vhost=[VHOST_ID]&name=[CHANNEL_NAME]&shortname=[CHANNEL_SHORT_NAME]&APIKEY=[APIKEY]
<?xml version="1.0" encoding="UTF-8"?>
<result>CHANNEL_ID</result>
Sample JSON Response
{
    "status": true,
    "result": CHANNEL_ID
}

Code examples

0 comments

Be the first to comment on newChannel.

Add a Comment

  • captcha