API Reference

Channels.getChannelInfo

Returns information about a specific channel.

The ID argument can be specified by the channel ID or the channel shortname. If the channel shortname is used the vhost argument is required.


Syntax

array channels.getChannelInfo ( mixed id, int vhost = NULL )

Arguments

NameTypeRequiredDefault valueDescription
idmixedRequirednoneThe ID of the channel you want information about.
vhostintOptionalNULLThe vhost ID that the channel belongs to.

Response

This is the response received on success of the getChannels method call. If there are no channels in your vhost you will be returned an empty XML response.

NameTypeDescriptionPossible Values
idINTThe current channel ID.INT channel ID
createdYYYY-MM-DD HH:MM:SSThe date the channel was created.YYYY-MM-DD HH:MM:SS
vhostINTThe vhost ID.INT
nameSTRINGThe channel name defined in MediaFactory.STRING
shortnameSTRINGThe given short given retrieved in MediaFactory. By Default this is the channel name, all lowercase and have spaces " " replaced by underscores "_".STRING
parentchannelINTThe ID of the current channel's parent. This is for nested channel lists.INT
thumburlSTRINGOBSOLETESTRING
statusINTThe moderation status of the current channel.0,1,2,3,4
descriptionSTRINGA short summary for the purpose of the channel. This is defined in MediaFactory.STRING
readonlyINTOBSOLETE0/1
disableembedINTDEPRECATED0/1
modemailacceptedINTThe ID of the email to use for Media approved in the channel.0/1
modemaildeniedINTThe moderation email ID of the email to use for Media denied in the channel.0/1
emailaddressSTRINGEmail address to be used for media intake through email. Leave empty to disable, must be unique.STRING
defaultsortSTRINGThe default sort order of the media within the channel'name ASC', 'name DESC', 'shortname ASC', 'shortname DESC', 'id ASC', 'id DESC', 'createdDate ASC', 'createdDate DESC'
visibilitySTRINGThe current visibility of the channelSHOWN, HIDDEN
geoblockingSTRINGA list of accepted country codes for the channel to display content from. This value is set in the channel settings.CA,US,AU
groupidDEPRECATEDDEPRECATEDDEPRECATED
groupnameDEPRECATEDDEPRECATEDDEPRECATED

Sample Response

Sample REST Response
http://api.newspark.ca/services/rest/channels/getChannelInfo?vhost=[VHOST_ID]&id=[CHANNEL_ID]
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <id>CHANNEL_ID</id>
  <created>2012-01-20 12:08:57</created>
  <vhost>VHOST_ID</vhost>
  <name>Comments</name>
  <shortname>comments</shortname>
  <parentchannel>0</parentchannel>
  <thumburl/>
  <status>1</status>
  <description/>
  <readonly>0</readonly>
  <disableembed>0</disableembed>
  <modemailaccepted>0</modemailaccepted>
  <modemaildenied>0</modemaildenied>
  <emailaddress/>
  <visibility>1</visibility>
  <treeleft>11</treeleft>
  <treeright>12</treeright>
  <defaultsort>upload DESC</defaultsort>
  <geoblocking/>
</result>
Sample JSON Response
{
    "status": true,
    "result": {
        "id": CHANNEL_ID,
        "created": "2012-01-20 12:08:57",
        "vhost": VHOST_ID,
        "name": "Comments",
        "shortname": "comments",
        "parentchannel": 0,
        "thumburl": "",
        "status": 1,
        "description": "",
        "readonly": "0",
        "disableembed": "0",
        "modemailaccepted": 0,
        "modemaildenied": 0,
        "emailaddress": null,
        "visibility": 1,
        "treeleft": 11,
        "treeright": 12,
        "defaultsort": "upload DESC",
        "geoblocking": []
    }
}

Code examples

0 comments

Be the first to comment on getChannelInfo.

Add a Comment

  • captcha