SlotSearch resource (Data API 23.2)

Summary

Http Method Resource Description
POST /sites/{site_id}/slot_search

Searches for slots.

The query attribute specifies a complex query that can be used to narrow down the search. The set of fields that are available to search are:

  • slot_id - String
  • description - String
  • context_type - String

Note that only searchable attributes can be used in sorting. "context_type" value is restricted to Global/Folder/Category.

Search Slots

Searches for slots.

The query attribute specifies a complex query that can be used to narrow down the search. The set of fields that are available to search are:

  • slot_id - String
  • description - String
  • context_type - String

Note that only searchable attributes can be used in sorting. "context_type" value is restricted to Global/Folder/Category.

Url

POST https://hostname:port/dw/data/v23_2/sites/{site_id}/slot_search

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Request Document

SearchRequest

Response Document

SlotSearchResult

Path Parameters

Parameter Type Description Constraints
site_id String The site context.  

In case of a failure Fault Document is returned.

Faults

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

Sample

REQUEST:
POST /s/-/dw/data/v23_2/sites/site-one/slot_search HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Accept: application/json

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

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

{
  "_v" : "23.2",
  "count" : 2,
  "hits" : [
    {
       "context_type" : "global",
       "description" : "description for slot"
       "link" : "https:/URL/s/-/dw/data/v23_2/sites/site-one/slots/asXPXaOaceGzIdcwcjue7iKn3j",
       "slot_configurations" : 
               [
                
                {
                   "_type" : "slot_configuration_content",
                   "configuration_id" : "404-banner",
                   "default" : false,
                   "enabled" : true,
                   "uuid" : "cw6YLaOace0MUqwcsju07iKn3j"
                }
             ],
       "slot_id" : "my-slot",
       "uuid" : "asXPXaOaceGzIdcwcjue7iKn3j"
    },
    {
       "context_type" : "global",
       "description" : "description for my slot 2.",
       "link" : "s/-/dw/data/v23_2/sites/SiteId/slots/sdXPXaOaceGzIdascas7iKn3j"
       "slot_id" : "my-slot2",
       "uuid" : "sdXPXaOaceGzIdascas7iKn3j"
    }
  ],
  "query" : { "text_query": { "fields": ["id", "description"], "search_phrase": "my" } },
  "select": "**",
  "start" : 0,
  "total" : 2
}
X OCAPI versions 15.x and 16.x will be retired on March 31, 2021. For dates and more information, see the OCAPI versioning and deprecation policy and this Knowledge Article.