teams
files
search

Search files in a team

Search for files in a team based on file name, extention and file content (if file content extraction is enabled and supported for the files).

Permissions

Must be authenticated and have the view_team permission.

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

Path parameters

team_idstring required

Team GUID

Request body

termsstring required

The search terms as inputed by the user. To search for files 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). To search for specific extensions included ext:extension.

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

Files list retrieval successful

orderstring[]
file_infosobject
next_file_idstring

The ID of next file info. Not omitted when empty or not relevant.

prev_file_idstring

The ID of previous file info. Not omitted when empty or not relevant.

Example response

{
  "order": [
    "file_info_id1",
    "file_info_id2"
  ]
}

Changes

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