posts

Search for team posts

Search posts in the team and from the provided terms string.

Permissions

Must be authenticated and have the view_team permission.

post/api/v4/teams/{team_id}/posts/search

Path parameters

team_idstring required

Team GUID

Request body

termsstring required

The search terms as inputed by the user. To search for posts from a user include from:someusername, using a user's username. To search in a specific channel include in:somechannel, using the channel name (not the display name).

is_or_searchboolean required

Set to true if an Or search should be performed vs an And search.

time_zone_offsetinteger

Offset from UTC of user timezone for date searches.

include_deleted_channelsboolean

Set to true if deleted channels should be included in the search. (archived channels)

pageinteger

The page to select. (Only works with Elasticsearch)

per_pageinteger

The number of posts per page. (Only works with Elasticsearch)

Response

Post list retrieval successful

orderstring[]
postsobject
matchesobject

A mapping of post IDs to a list of matched terms within the post.

Example response

{
  "order": [
    "post_id1",
    "post_id12"
  ],
  "matches": {
    "post_id1": [
      "search match 1",
      "search match 2"
    ]
  }
}

Changes

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