Skip to content

API Channel

Compatibility

  • EE2
  • EE3
  • EE4
  • EE5
  • EE6
  • EE7

Installation

  1. Copy the files to the system/user dir
  2. Enable the API from within the Webservice Module

Methods

create_channel

Short nameDescription
site_idThe site IDRequired
channel_titleThe channel titleRequired
channel_nameThe channel nameRequired
url_title_prefixThe url prefixOptional
comment_expirationThe comment expiration dateOptional
status_groupStatus group IDOptional
field_groupField group IDOptional
channel_urlThe channel urlOptional
channel_langLanguage of the channelOptional
group_orderOrder positionOptional

Request

Array
(
    [site_id] => 1
    [channel_title] => Test Channel
    [channel_name] => test_channel
)

read_channel

Short nameDescription
channel_idThe channel IDRequired

Request

Array
(
    [channel_id] => 1
)

update_channel

Short nameDescription
channel_idThe channel IDRequired
channel_titleThe channel titleOptional
channel_nameThe channel nameOptional
url_title_prefixThe url prefixOptional
comment_expirationThe comment expiration dateOptional
status_groupStatus group IDOptional
field_groupField group IDOptional
channel_urlThe channel urlOptional
channel_langLanguage of the channelOptional
group_orderOrder positionOptional

Request

Array
(
    [channel_id] => 1
    [channel_title] => Test Channel
    [channel_name] => test_channel
)

delete_channel

Short nameDescription
channel_idThe channel IDRequired

Request

Array
(
    [channel_id] => 1
)

Hooks

webservice_create_channel_end

(added in v3.0)

ee()->extensions->call('webservice_create_channel_end', $channel_id);

webservice_read_channel_end

(added in v3.0)

ee()->extensions->call('webservice_read_channel_end', $channel_read_data);

webservice_update_channel_end

(added in v3.0)

ee()->extensions->call('webservice_update_channel_end', $channel_update_data);

webservice_delete_channel_end

(added in v3.0)

ee()->extensions->call('webservice_delete_channel_end', $channel_id);