Create a Channel
post
/content/management/api/v1.1/channels
Creates a channel with the given payload.
Request
Supported Media Types
- application/json
Query Parameters
-
links(optional): string
This parameter accepts a comma-separated list of link names. By default, this parameter gives all the links applicable. Possible values are: self, canonical, describedby
Header Parameters
-
X-Requested-With: string
A custom header to mitigate CSRF attacks.Allowed Values:
[ "XMLHttpRequest" ]
Creates a channel with the given information in the payload. The fields id, createdBy, createdDate, updatedBy, updatedDate, channelTokens, isSiteChannel and links will be ignored even if given in the payload.
Root Schema : Channel
Type:
object
Channels
Show Source
-
channelAccessControls(optional):
array channelAccessControls
A list of channel access controls, allowed only for a secure regular channel. It currently allows the access control only for secure channels
-
channelTokens(optional):
array channelTokens
A list of tokens for the channel.
-
channelType(optional):
string
Allowed Values:
[ "public", "secure" ]
The type of the channel. -
createdBy(optional):
string
createdBy user of the channel.
-
createdDate(optional):
object date
date
-
description(optional):
string
Description of the channel.
-
id(optional):
string
id of the channel. It is a required property in the get response and put request whereas it is not required in the post request.
-
isSiteChannel(optional):
boolean
Checks whether the channel is site channel.
-
isSitePlanChannel(optional):
boolean
-
links(optional):
array links
Links
-
localizationPolicy(optional):
string
The localization policy of the channel.
-
name(optional):
string
Name of the channel. It is a required property in the get response and post/put request.
-
primaryChannelSupported(optional):
boolean
primaryChannelSupported
-
publishPolicy(optional):
string
Allowed Values:
[ "anythingPublished", "onlyApproved" ]
The publish policy of the channel. -
rankingPolicyContentTypes(optional):
array rankingPolicyContentTypes
The search ranking policy scope of the channel.
-
rankingPolicyDescriptorId(optional):
string
The search ranking policy descriptor ID of the channel.
-
rankingPolicyDescriptorName(optional):
string
The search ranking policy descriptor name of the channel.
-
repositories(optional):
array repositories
Repositories associated with the channel. It currently exposes only the default repository for a site channel.
-
roleName(optional):
string
Name of the user's role on the channel.
-
updatedBy(optional):
string
updatedBy user of the channel.
-
updatedDate(optional):
object date
date
Nested Schema : channelAccessControls
Type:
array
A list of channel access controls, allowed only for a secure regular channel. It currently allows the access control only for secure channels
Show Source
-
Array of:
object channelAccessControls
channelAccessControls
Nested Schema : channelTokens
Type:
array
A list of tokens for the channel.
Show Source
-
Array of:
object channelToken
channelToken
Nested Schema : rankingPolicyContentTypes
Type:
array
The search ranking policy scope of the channel.
Show Source
Nested Schema : repositories
Type:
array
Repositories associated with the channel. It currently exposes only the default repository for a site channel.
Show Source
-
Array of:
object RepositoryId
RepositoryId
Nested Schema : channelAccessControls
Type:
object
channelAccessControls
Show Source
-
type(optional):
string
Allowed Values:
[ "CLOUD_USERS", "SERVICE_USERS", "SPECIFIC_USERS" ]
Access Control Type to be granted, possible values are CLOUD_USERS, SERVICE_USERS, SPECIFIC_USERS and defaults to CLOUD_USERS -
users(optional):
array users
Specific users to which channel access control is provided, allowed only if the access control type is SPECIFC_USERS
Nested Schema : users
Type:
array
Specific users to which channel access control is provided, allowed only if the access control type is SPECIFC_USERS
Show Source
-
Array of:
object UserId
UserId
Nested Schema : UserId
Type:
object
UserId
Show Source
-
groupType(optional):
string
Allowed Values:
[ "CEC", "IDP" ]
-
name(optional):
string
-
type(optional):
string
Allowed Values:
[ "user", "group" ]
Nested Schema : channelToken
Type:
object
channelToken
Show Source
-
expirationDate(optional):
object date
date
-
name(optional):
string
Name of the token.
-
token(optional):
string
Value of the token.
Nested Schema : Link
Type:
object
Link of the resource.
Show Source
-
href(optional):
string
The target resource's URI. It could be template URI. It is a required property in the get response.
-
mediaType(optional):
string
Media type.
-
method(optional):
string
What HTTP method can be used to access the target resource.
-
profile(optional):
string
Link to the metadata that describes the target resource.
-
rel(optional):
string
Relation type. It is a required property in the get response.
-
templated(optional):
boolean
Whether the URI is a template.
Nested Schema : RepositoryId
Type:
object
RepositoryId
Show Source
-
id(optional):
string
-
name(optional):
string
Name of the repository. It is a required property in the get response and post/put request.
Response
Supported Media Types
- application/json
201 Response
Created.
Root Schema : Channel
Type:
object
Channels
Show Source
-
channelAccessControls(optional):
array channelAccessControls
A list of channel access controls, allowed only for a secure regular channel. It currently allows the access control only for secure channels
-
channelTokens(optional):
array channelTokens
A list of tokens for the channel.
-
channelType(optional):
string
Allowed Values:
[ "public", "secure" ]
The type of the channel. -
createdBy(optional):
string
createdBy user of the channel.
-
createdDate(optional):
object date
date
-
description(optional):
string
Description of the channel.
-
id(optional):
string
id of the channel. It is a required property in the get response and put request whereas it is not required in the post request.
-
isSiteChannel(optional):
boolean
Checks whether the channel is site channel.
-
isSitePlanChannel(optional):
boolean
-
links(optional):
array links
Links
-
localizationPolicy(optional):
string
The localization policy of the channel.
-
name(optional):
string
Name of the channel. It is a required property in the get response and post/put request.
-
primaryChannelSupported(optional):
boolean
primaryChannelSupported
-
publishPolicy(optional):
string
Allowed Values:
[ "anythingPublished", "onlyApproved" ]
The publish policy of the channel. -
rankingPolicyContentTypes(optional):
array rankingPolicyContentTypes
The search ranking policy scope of the channel.
-
rankingPolicyDescriptorId(optional):
string
The search ranking policy descriptor ID of the channel.
-
rankingPolicyDescriptorName(optional):
string
The search ranking policy descriptor name of the channel.
-
repositories(optional):
array repositories
Repositories associated with the channel. It currently exposes only the default repository for a site channel.
-
roleName(optional):
string
Name of the user's role on the channel.
-
updatedBy(optional):
string
updatedBy user of the channel.
-
updatedDate(optional):
object date
date
Nested Schema : channelAccessControls
Type:
array
A list of channel access controls, allowed only for a secure regular channel. It currently allows the access control only for secure channels
Show Source
-
Array of:
object channelAccessControls
channelAccessControls
Nested Schema : channelTokens
Type:
array
A list of tokens for the channel.
Show Source
-
Array of:
object channelToken
channelToken
Nested Schema : rankingPolicyContentTypes
Type:
array
The search ranking policy scope of the channel.
Show Source
Nested Schema : repositories
Type:
array
Repositories associated with the channel. It currently exposes only the default repository for a site channel.
Show Source
-
Array of:
object RepositoryId
RepositoryId
Nested Schema : channelAccessControls
Type:
object
channelAccessControls
Show Source
-
type(optional):
string
Allowed Values:
[ "CLOUD_USERS", "SERVICE_USERS", "SPECIFIC_USERS" ]
Access Control Type to be granted, possible values are CLOUD_USERS, SERVICE_USERS, SPECIFIC_USERS and defaults to CLOUD_USERS -
users(optional):
array users
Specific users to which channel access control is provided, allowed only if the access control type is SPECIFC_USERS
Nested Schema : users
Type:
array
Specific users to which channel access control is provided, allowed only if the access control type is SPECIFC_USERS
Show Source
-
Array of:
object UserId
UserId
Nested Schema : UserId
Type:
object
UserId
Show Source
-
groupType(optional):
string
Allowed Values:
[ "CEC", "IDP" ]
-
name(optional):
string
-
type(optional):
string
Allowed Values:
[ "user", "group" ]
Nested Schema : channelToken
Type:
object
channelToken
Show Source
-
expirationDate(optional):
object date
date
-
name(optional):
string
Name of the token.
-
token(optional):
string
Value of the token.
Nested Schema : Link
Type:
object
Link of the resource.
Show Source
-
href(optional):
string
The target resource's URI. It could be template URI. It is a required property in the get response.
-
mediaType(optional):
string
Media type.
-
method(optional):
string
What HTTP method can be used to access the target resource.
-
profile(optional):
string
Link to the metadata that describes the target resource.
-
rel(optional):
string
Relation type. It is a required property in the get response.
-
templated(optional):
boolean
Whether the URI is a template.
Nested Schema : RepositoryId
Type:
object
RepositoryId
Show Source
-
id(optional):
string
-
name(optional):
string
Name of the repository. It is a required property in the get response and post/put request.
400 Response
Bad request.
403 Response
Forbidden.
409 Response
Conflict.
500 Response
Internal server error.
Examples
The following example shows how to create a channel by submitting a POST request on the REST resource using cURL.
curl -X POST -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' 'https://host:port/content/management/api/v1.1/channels'
Example 1:
This creates a public channel with an existing localization policy, where 7B8F6F008D905491E0534DB0F70AEE4C is an existing localization policy id. Replace payload with your own data.
/content/management/api/v1.1/channels
Request Body
{ "name": "channel5", "description": "channel5 description", "channelType": "public", "localizationPolicy": "7B8F6F008D905491E0534DB0F70AEE4C" }
Example 2:
This creates a public channel with an existing localization policy and publishPolicy, where only approved items can be published. 7B8F6F008D905491E0534DB0F70AEE4C is an existing localization policy id. Replace payload with your own data.
/content/management/api/v1.1/channels
Request Body
{ "name": "channel6", "description": "channel6 description", "channelType": "public", "publishPolicy": "onlyApproved", "localizationPolicy": "7B8F6F008D905491E0534DB0F70AEE4C" }