channels

Search all private and open type channels

Returns all private and open type channels where 'term' matches on the name, display name, or purpose of the channel.

Configured 'default' channels (ex Town Square and Off-Topic) can be excluded from the results with the exclude_default_channels boolean parameter.

Channels that are associated (via GroupChannel records) to a given group can be excluded from the results with the not_associated_to_group parameter and a group id string.

post/api/v4/channels/search

Query parameters

system_consoleboolean

Is the request from system_console. If this is set to true, it filters channels by the logged in user.

Request body

termstring required

The string to search in the channel name, display name, and purpose.

not_associated_to_groupstring

A group id to exclude channels that are associated to that group via GroupChannel records.

exclude_default_channelsboolean

Exclude default channels from the results by setting this parameter to true.

team_idsstring[]

Filters results to channels belonging to the given team ids

group_constrainedboolean

Filters results to only return channels constrained to a group

exclude_group_constrainedboolean

Filters results to exclude channels constrained to a group

publicboolean

Filters results to only return Public / Open channels, can be used in conjunction with private to return both public and private channels

privateboolean

Filters results to only return Private channels, can be used in conjunction with public to return both private and public channels

deletedboolean

Filters results to only return deleted / archived channels

pageinteger

The page number to return, if paginated. If this parameter is not present with the per_page parameter then the results will be returned un-paged.

per_pageinteger

The number of entries to return per page, if paginated. If this parameter is not present with the page parameter then the results will be returned un-paged.

exclude_policy_constrainedboolean

If set to true, only channels which do not have a granular retention policy assigned to them will be returned. The sysconsole_read_compliance_data_retention permission is required to use this parameter.

include_search_by_idboolean

If set to true, returns channels where given search 'term' matches channel ID.

Response

Paginated channel response. (Note that the non-paginated response—returned if the request body does not contain both page and per_page fields—is a simple array of channels.)

total_countnumber

The total number of results, regardless of page and per_page requested.

Changes

No recorded changes to this endpoint across all 1 revision of this API.