List All Channels
get
/content/management/api/v1.1/channels
List all channels.
Request
Query Parameters
-
fields(optional): string
This parameter is used to control the returned fields in each channel in the list. This parameter accepts a comma-separated list of field names or all. These fields will be returned for each channel in the list. All the field names are case-sensitive, and users must provide the correct field names in the query. Each channel has both standard fields (id, name, description, createdBy, createdDate, updatedBy, updatedDate, isSiteChannel) and additional fields (channelType, publishPolicy, localizationPolicy, channelTokens). When fields is specified as all (case-insensitive), all the standard and additional fields are returned. The standard fields are always returned in the response and cannot be filtered out. The user can filter out only the additional fields. This parameter is optional in the query, and by default the result shows only standard fields in the response. Any incorrect or invalid field name given in the query will throw an error.
Example: ?fields=channelTokens,localizationPolicy
This returns all standard fields along with the channelTokens and localizationPolicy additional fields for each channel.
Example: ?fields=all
This will return all standard fields and all additional fields for each channel.
-
limit(optional): integer(int32)
This parameter accepts a non negative integer and is used to control the size of the result.Default Value:
100
-
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, first, last, prev, next
-
offset(optional): integer(int32)
This parameter accepts a non negative integer and is used to control the start index of the result.Default Value:
0
-
orderBy(optional): string
This parameter is used to control the order of results. The value of this query parameter follows the format of fieldName:[asc/desc]. asc stands for ascending order desc stands for descending order, default order is asc. The only field names allowed are name and updatedDate.Default Value:
name:asc
-
q(optional): string
This parameter accepts a query expression condition that matches the field values. The value of query condition follows the format of {fieldName} {operator} "{fieldValue}". The only fieldNames allowed for now are roleName, repositoryId and name and only allowed operators for now are mt on name and eq on the others. This query param is optional and defaults to roleName eq "viewer" which filters the resources with at least given role.
Example:
?q=(roleName eq "manager")Default Value:roleName eq "viewer"
-
roleName(optional): string
This parameter is used to filter the returned channels with the given role name. This parameter is optional in the query and by default all the channels are returned.Allowed Values:
[ "viewer", "contributor", "manager" ]
-
totalResults(optional): boolean
This parameter accepts a boolean flag. If specified as true, then the returned result must include the total result count.Default Value:
false
Response
Supported Media Types
- application/json
200 Response
OK.
Root Schema : Channels
Type:
object
Channels
Show Source
-
aggregationResults(optional):
array aggregationResults
Aggregation results.
-
count(optional):
integer(int32)
Total number of records in the current response.
-
hasMore(optional):
boolean
Check whether there are more pages to fetch.
-
items(optional):
array items
Singular resources contained in the collection.
-
limit(optional):
integer(int32)
Actual page size used by the server. This might not be the same as what the client requests.
-
links(optional):
array links
Links of the resource.
-
offset(optional):
integer(int32)
The actual index from which the singular resources are returned.
-
pinned(optional):
array pinned
Pinned items. Shows items pinned at the top of search list
-
scrollId(optional):
string
scrollId if the search resolved to a scroll search.
-
totalResults(optional):
integer(int32)
Total number of rows that satisfy the client request (excluding the paging parameters.)
Nested Schema : items
Type:
array
Singular resources contained in the collection.
Show Source
-
Array of:
object Channel
Channels
Nested Schema : links
Type:
array
Links of the resource.
Show Source
-
Array of:
object Link
Link of the resource.
Nested Schema : pinned
Type:
array
Pinned items. Shows items pinned at the top of search list
Show Source
Nested 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.
304 Response
Not modified.
400 Response
Bad request.
403 Response
Forbidden.
404 Response
Not found.
500 Response
Internal server error.
Examples
The following example shows how to get all channels by submission of a GET request on the REST resource using cURL:
curl -X GET -H 'Accept: application/json' 'https://host:port/content/management/api/v1.1/channels'
Example 1:
This lists all channels including totalResults value in the response.
/content/management/api/v1.1/channels?totalResults=true
Response Body
{ "hasMore": false, "offset": 0, "count": 2, "limit": 2, "totalResults": 2, "items": [ { "id": "CCB59F44D5015819EBC0F86A2B3133B22638AF433F1E", "name": "channel1", "description": "channel description1 updated", "createdBy": "marketing.user", "createdDate": { "value": "2018-12-10T07:00:42.862Z", "timezone": "UTC" }, "updatedBy": "marketing.user", "updatedDate": { "value": "2018-12-10T09:41:56.783Z", "timezone": "UTC" }, "isSiteChannel": false, "links": [ { "href": "https://host:port/content/management/api/v1.1/channels/CCB59F44D5015819EBC0F86A2B3133B22638AF433F1E", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, { "id": "CC03EC1531E0E39F6D6BA75CEE430DDBEA79EDD5F5B0", "name": "channel2", "description": "", "createdBy": "marketing.user", "createdDate": { "value": "2018-12-10T07:50:34.832Z", "timezone": "UTC" }, "updatedBy": "marketing.user", "updatedDate": { "value": "2018-12-10T07:50:34.832Z", "timezone": "UTC" }, "isSiteChannel": false, "links": [ { "href": "https://host:port/content/management/api/v1.1/channels/CC03EC1531E0E39F6D6BA75CEE430DDBEA79EDD5F5B0", "rel": "self", "method": "GET", "mediaType": "application/json" } ] } ], "links": [ { "href": "https://host:port/content/management/api/v1.1/channels?totalResults=true", "rel": "self", "method": "GET", "mediaType": "application/json" }, { "href": "https://host:port/content/management/api/v1.1/channels?totalResults=true", "rel": "canonical", "method": "GET", "mediaType": "application/json" }, { "href": "https://host:port/content/management/api/v1.1/metadata-catalog/channels", "rel": "describedby", "method": "GET", "mediaType": "application/schema+json" }, { "href": "https://host:port/content/management/api/v1.1/channels?offset=0&totalResults=true", "rel": "first", "method": "GET", "mediaType": "application/json" }, { "href": "https://host:port/content/management/api/v1.1/channels?offset=0&totalResults=true", "rel": "last", "method": "GET", "mediaType": "application/json" } ] }
Example 2:
This lists first 3 available channels starting from index 3, with associated localizationPolicy list, includes totalResults value, rolename is manager and in descending order by field-name name in the response.
/content/management/api/v1.1/channels?limit=3&offset=3&totalResults=true&orderBy=name:desc&fields=localizationPolicy&roleName=manager
Response Body
{ "hasMore": false, "offset": 3, "count": 2, "limit": 5, "totalResults": 5, "items": [ { "id": "CC03EC1531E0E39F6D6BA75CEE430DDBEA79EDD5F5B0", "name": "channel2", "description": "", "createdBy": "marketing.user", "createdDate": { "value": "2018-12-10T07:50:34.832Z", "timezone": "UTC" }, "updatedBy": "marketing.user", "updatedDate": { "value": "2018-12-10T07:50:34.832Z", "timezone": "UTC" }, "isSiteChannel": false, "localizationPolicy": "", "links": [ { "href": "https://host:port/content/management/api/v1.1/channels/CC03EC1531E0E39F6D6BA75CEE430DDBEA79EDD5F5B0", "rel": "self", "method": "GET", "mediaType": "application/json" } ] }, { "id": "CCB59F44D5015819EBC0F86A2B3133B22638AF433F1E", "name": "channel1", "description": "channel description1 updated", "createdBy": "marketing.user", "createdDate": { "value": "2018-12-10T07:00:42.862Z", "timezone": "UTC" }, "updatedBy": "marketing.user", "updatedDate": { "value": "2018-12-10T09:41:56.783Z", "timezone": "UTC" }, "isSiteChannel": false, "localizationPolicy": "", "links": [ { "href": "https://host:port/content/management/api/v1.1/channels/CCB59F44D5015819EBC0F86A2B3133B22638AF433F1E", "rel": "self", "method": "GET", "mediaType": "application/json" } ] } ], "links": [ { "href": "https://host:port/content/management/api/v1.1/channels?totalResults=true&offset=3&limit=3&roleName=manager&orderBy=name:desc&fields=localizationPolicy", "rel": "self", "method": "GET", "mediaType": "application/json" }, { "href": "https://host:port/content/management/api/v1.1/channels?totalResults=true&offset=3&limit=3&roleName=manager&orderBy=name:desc&fields=localizationPolicy", "rel": "canonical", "method": "GET", "mediaType": "application/json" }, { "href": "https://host:port/content/management/api/v1.1/metadata-catalog/channels", "rel": "describedby", "method": "GET", "mediaType": "application/schema+json" }, { "href": "https://host:port/content/management/api/v1.1/channels?totalResults=true&offset=1&limit=3&roleName=manager&orderBy=name:desc&fields=localizationPolicy", "rel": "prev", "method": "GET", "mediaType": "application/json" }, { "href": "https://host:port/content/management/api/v1.1/channels?totalResults=true&offset=0&limit=3&roleName=manager&orderBy=name:desc&fields=localizationPolicy", "rel": "first", "method": "GET", "mediaType": "application/json" }, { "href": "https://host:port/content/management/api/v1.1/channels?totalResults=true&offset=3&limit=3&roleName=manager&orderBy=name:desc&fields=localizationPolicy", "rel": "last", "method": "GET", "mediaType": "application/json" } ] } }