Get content search results
GET {{baseUrl}}/api/-/search?terms=<string>&page=<long>&limit=<integer>&order_by=hitsTotal&filter=<string>
Searches across all supported content types for objects relevant to the search expression specified in the querystring of the request URI.
Version: Available in API 3.16 ( Tableau Cloud June 2022 / Server 2022.3) and later. Versioning Overview
Permissions: Search results will be limited to those objects that the user has permissions to access. Permissions Overview
License: No additional license required.
Access Scope: Not available.
Access Scopes Overview: Cloud | Server-Windows | Server-Linux
For example, MY_SERVER/api/-/search?terms=productID
could return the Sales
workbook that contains a data field named productID
as well as
Superstore database containing a table with a column named productID
.
Query parameters can be combined to refine your search. For instance, the
request for a search on the term sales
, for workbooks created in 2021
or later, sorted by the number of times the content has been viewed
since its creation, with smallest number of views first, would look
like:
/search?terms=sales&filter=type:eq:workbook&tmodifiedTime:gte:2021&sort=hitsTotal:asc
Content types returned can include:
|
|
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
terms | string | (Optional) One or more terms the search uses as the basis for which items are relevant to return. The items may be of any supported content type. The relevance may be assessed based on any element of a given item. If no terms are supplied, then results will be based filtering and page size limits. | |
page | string | (Optional) The number of the page in the list response pages to return. Maximum number of items returned is 10,000 | |
limit | string | (Optional) The number of items to return on each response page. The default is 10. | |
order_by | string | <br />(Optional) The sorting method for items returned, based on | |
the popularity of the item. You can sort based on: |
hitsTotal
- The number of times a content item has been viewed since it was created.hitsSmallSpanTotal
The number of times viewed in the last month.hitsMediumSpanTotal
The number of times viewed in the last three months.hitsLargeSpanTotal
The number of times viewed in the last twelve months.downstreamWorkbookCount
The number workbooks in a given project. This value is only returned when the requestfilter
expression is=type:eq:table
or=type:eq:database
.
Append :asc
or :desc
to determine sort direction. The default is asc
.
Your search expression can have more than one comma separated order_by
element. If there is a tie between two items for the first
order_by
expression, then sort order between the two items will be
determined by the second order_by
expression. The following
expression sorts items from the fewest views since creation and, in
case of a tie, by the one that has the most recent views.
?order_by=hitsTotal:asc,hitsSmallSpanTotal:desc
|
| filter
| string | | (Optional) An expression to filter the response using one of the following parameters, or
a combination of expressions separated by a comma.
-
type
The content type, using the
eq
orin
operator in expressions like:?filter=type:eq:workbook
?filter=type:in:[workbook,datasource]
> Note: The
in
operator is available in API 3.17 (Tableau Cloud October 2022 / Server 2022.3) and later. or: -
ownerId
Resource owner ID or last modified time, using
eq
,lte
,gte
,gt
, orin
operator in an expression like:filter=modifiedTime:gte:2022-01-11T08:00:00.000Z
or:
-
modifiedTime
Resource owner ID or last modified time, using
eq
,lte
,gte
,gt
, orin
operator in an expression like:filter=ownerId:in:[akhil,fred,alice]
For more information about filter expressions, see Filtering and Sorting in the Tableau REST API.
</li></ul> |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: OK
{"next":"\u003cstring\u003e","prev":"\u003cstring\u003e","pageIndex":"\u003clong\u003e","startIndex":"\u003clong\u003e","total":"\u003clong\u003e","limit":"\u003cinteger\u003e","items":[{"uri":"\u003cstring\u003e","content":{"eiusmod3e4":{}}},{"uri":"\u003cstring\u003e","content":{"adipisicing1":{},"culpa_4b6":{},"utd44":{}}}]}