SiteSearch resource (Data API 19.3)

Summary

Http Method Resource Description
POST /site_search

Searches for sites.

The query attribute specifies a complex query that can be used to narrow down the search. These are the list of searchable attributes:

  • id - String
  • display_name - Localized <String>
  • description - Localized <String>
  • in_deletion - Boolean

The output of the query can also be sorted. These are the list of sortable attributes:

  • id - String
  • display_name - Localized <String>
  • description - Localized <String>
  • in_deletion - Boolean

Search Sites

Searches for sites.

The query attribute specifies a complex query that can be used to narrow down the search. These are the list of searchable attributes:

The output of the query can also be sorted. These are the list of sortable attributes:

Url

POST https://hostname:port/dw/data/v19_3/site_search

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Request Document

SearchRequest

Response Document

SiteSearchResult

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 MalformedSearchParameterException   Thrown if the query is ill-formed.
400 EnumConstraintViolationException

document (String)

enumValue (String)

Thrown if the invalid value is entered for access_type

Sample

REQUEST:
POST /s/-/dw/data/v19_3/site_search HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Accept: application/json

{
    "query" : {
        "text_query": {
            "field": ["id", "description"],
            "search_phrase": "my"
        }
    },
    "select" : "(**)"
}

RESPONSE:
HTTP/1.1 200 OK
Content-Length: 67
Content-Type: application/json; charset=UTF-8

{
  "_v" : "19.3",
  "count" : 2,
  "hits" : [
    {
       "_v" : "19.3",
       "id" : "my-site1",
       "customer_list_link" : {
            "_type" : "customer_list_link",
            "customer_list_id" : "my-site1",
            "link" : "https://example.com/s/-/dw/data/v19_3/customer_lists/my-site1"
       },
       "display_name" : {
          "default" : "my-display_name",
          "en" : "An English my-display_name",
          "de" : "A German my-display_name"
       },
       "description" : {
          "default" : "my-description",
          "en" : "An English my-description",
          "de" : "A German my-description"
       },
        "link" : "https://example.com/s/-/dw/data/v19_3/sites/my-site1",
        "in_deletion": false,
        "storefront_status": "online"
    },
    {
       "_v" : "19.3",
       "id" : "my-site2",
       "customer_list_link" : {
            "_type" : "customer_list_link",
            "customer_list_id" : "my-site2",
            "link" : "https://example.com/s/-/dw/data/v19_3/customer_lists/my-site2"
       },
       "display_name" : {
          "default" : "my-display_name",
          "en" : "An English my-display_name",
          "de" : "A German my-display_name"
       },
       "description" : {
          "default" : "my-description",
          "en" : "An English my-description",
          "de" : "A German my-description"
       },
        "link" : "https://example.com/s/-/dw/data/v19_3/sites/my-site2",
        "in_deletion": false,
        "storefront_status": "online"
    }
  ],
  "query" : { "text_query": { "fields": ["id", "description"], "search_phrase": "my" } },
  "select": "**",
  "start" : 0,
  "total" : 2
}