Request

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.

Security
OAuth2.0
Bodyrequired

Resource containing all the parameters needed for a search.

querystring or null

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.

skipinteger, (int32)

The number of results to skip, for example, 0.

takeinteger, (int32)

The number of results to return, for example, 10.

filtersArray of objects or null(FieldFilterRequestResource)

The filters to apply to the search query. Each filter is a FieldFilterRequestResource object.

sortingobject(SortingRequestResource)

The sorting to apply to the search query. This is a SortingRequestResource object that specifies the field and order (ascending or descending).

aggregationsArray of objects or null(AggregationRequestResource)

The aggregations to apply to the search query. Each aggregation is an AggregationRequestResource object.

fulltextArray of strings or null

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.

fieldsArray of strings or null

The fields to include in the search results. This is an array of strings, where each string is a field name.

culturestring or null

The culture to use for the search, for example, en-US or fr-FR.

viewstring or null

The view to use for the search (that is, the view name).

componentinteger, (int64)

The component ID to use for the search, for example, 1.

logical_grouping_templatestring or null

The logical grouping template to use for the search.

defaultsstring or null

The default values to use for the search.

configuration_categorystring or null

The configuration category to use for the search.

customSortingobject or null

Custom sorting options for the search. This is an object where keys are field names and values are integers representing the sort order.

saved_selectioninteger, (int64)

The ID of a saved selection to use for the search.

calendarStartDatestring, (date-time)

The start date for the calendar filter. This is a string in date-time format, for example, 2023-01-01T00:00:00Z.

calendarStopDatestring, (date-time)

The stop date for the calendar filter. This is a string in date-time format, for example, 2023-12-31T23:59:59Z.

selection_poolobject(SelectionPoolFilterResource)

The selection pool to use for the search. This is a SelectionPoolFilterResource object that specifies the selection pool and optional sub-pool ID.

nested_relationsArray of objects or null(NestedRelationInfo)

The nested relations to include in the search. Each item is a NestedRelationInfo object that specifies the relation, role, and properties to include.

groupobject(SearchGroupRequestResource)

The grouping information for the search. This is a SearchGroupRequestResource object that specifies how to group the search results.

is_initial_requestboolean

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.

take_user_settingsboolean

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.

l10nboolean or null

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.

visualSearchobject(VisualSearchRequestResource)

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.

property name*anyadditional property
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
  }'

Responses

Successful operation

Bodyapplication/json
selfobject(Link)

Represents a link to a resource.

Response
{ "self": { "href": "string", "filename_properties": [ … ], "title": "string", "templated": false } }