Executes a search query and returns the search results. Use POST when the query parameters exceed the URL length limitations. Parameters are passed in a resource instead of URL arguments.
Resource containing all the parameters needed for a search.
This parameter is generated automatically by Content Hub and contains the information required to restore a search state. Do not create or modify it manually.
The filters to apply to the search query. Each filter is a FieldFilterRequestResource object.
The sorting to apply to the search query. This is a SortingRequestResource object that specifies the field and order (ascending or descending).
The aggregations to apply to the search query. Each aggregation is an AggregationRequestResource object.
The full-text search terms to apply to the query. This is an array of strings, where each string is a term to search for.
The fields to include in the search results. This is an array of strings, where each string is a field name.
Custom sorting options for the search. This is an object where keys are field names and values are integers representing the sort order.
The start date for the calendar filter. This is a string in date-time format, for example, 2023-01-01T00:00:00Z.
The stop date for the calendar filter. This is a string in date-time format, for example, 2023-12-31T23:59:59Z.
The selection pool to use for the search. This is a SelectionPoolFilterResource object that specifies the selection pool and optional sub-pool ID.
The nested relations to include in the search. Each item is a NestedRelationInfo object that specifies the relation, role, and properties to include.
The grouping information for the search. This is a SearchGroupRequestResource object that specifies how to group the search results.
Indicates whether this is the initial request for the search. This is a boolean value, where true means it is the initial request and false means it is a subsequent request.
Indicates whether to take user settings into account for the search. This is a boolean value, where true means user settings are taken into account and false means they are not.
Indicates whether to use localization for the search. This is a boolean value, where true means localization is used and false means it is not.
The visual search parameters to use for the search. This is a VisualSearchRequestResource object that specifies the image, color, text, and other parameters for visual search.
- https://your-serverhttps://your-server/api/search
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
- application/json-patch+json
- application/json
- text/json
- application/*+json
curl -i -X POST \
https://your-server/api/search \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json-patch+json' \
-d '{
"query": "string",
"skip": 0,
"take": 0,
"filters": [
{
"name": "string",
"definition": "string",
"group_identifier": "string",
"operator": "None",
"values": [
null
],
"nested_values": [
{}
],
"hidden": true,
"type": "FieldFilter",
"role": "string",
"visible": true,
"multi_select": true,
"selection_pool_specs": {
"pool_id": 0,
"sub_pool_id": 0
}
}
],
"sorting": {
"field": "string",
"asc": true
},
"aggregations": [
{
"name": "string",
"field": "string",
"size": 0,
"datasource": "string",
"children": [
{}
],
"metric_option": {
"name": "string",
"type": "string",
"field": "string"
},
"type": "Term",
"interval": "second",
"format": "string",
"include_missing": true
}
],
"fulltext": [
"string"
],
"fields": [
"string"
],
"culture": "string",
"view": "string",
"component": 0,
"logical_grouping_template": "string",
"defaults": "string",
"configuration_category": "string",
"customSorting": {
"property1": 0,
"property2": 0
},
"saved_selection": 0,
"calendarStartDate": "2019-08-24T14:15:22Z",
"calendarStopDate": "2019-08-24T14:15:22Z",
"selection_pool": {
"selection_pool": "string",
"sub_pool_id": 0,
"definitions": [
"string"
]
},
"nested_relations": [
{
"relation": "string",
"role": "Parent",
"properties": [
"string"
],
"renditions": [
"string"
],
"limit": 0
}
],
"group": {
"row": "string",
"column": "string",
"rowDefinitionId": 0,
"columnDefinitionId": 0,
"result_count": 0
},
"is_initial_request": true,
"take_user_settings": true,
"l10n": true,
"visualSearch": {
"image": "string",
"color": "string",
"text": "string",
"type": "vector",
"imageEntityId": 0,
"IsDeepSearch": true
},
"property1": null,
"property2": null
}'{ "self": { "href": "string", "filename_properties": [ … ], "title": "string", "templated": false } }