Slots resource (Data API 19.10)

Summary

Http Method Resource Description
GET /sites/{site_id}/slots Action to get all the slots with no filtering.
GET /sites/{site_id}/slots/{slot_id}/{context_type} Action to get slot information.

Get Slots

Action to get all the slots with no filtering.

Url

GET https://hostname:port/dw/data/v19_10/sites/{site_id}/slots?start={Integer}&count={Integer}&select={String}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Response Document

Slots

Path Parameters

Parameter Type Description Constraints
site_id String The id of the site. minLength=1

Query Parameters

Parameter Type Description Constraints
count Integer Optional count for retrieving only a subset of the items (default is 25).  
select String The property selector.  
start Integer Optional start index for retrieving the items from a given index (default 0).  

Sample

REQUEST:
GET  /s/-/dw/data/v19_10/sites/SiteGenesis/slots?select=(**) HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Content-Type: application/json; charset=UTF-8

# in case of success:
 
RESPONSE:
HTTP/1.1 200 OK
Content-Length: 67
Content-Type: application/json; charset=UTF-8
{
  "_v" : "19.10",
  "count" : 2,
  "data" : [ {
           "_v" : "19.10",
           "context_type" : "global",
           "description" : "description for slot"
           "link" : "https:/URL/s/-/dw/data/v19_10/sites/my-site/slots/my-slot/global",
           "slot_configurations" :
                [

                    {
                       "_type" : "slot_configuration_content",
                       "configuration_id" : "404-banner",
                       "default" : false,
                       "enabled" : true,
                       "uuid" : "cw6YLaOace0MUqwcsju07iKn3j"
                    }
                 ],
           "slot_id" : "my-slot"
       },
       {
           "_v" : "19.10",
           "context_type" : "category",
           "description" : "a slot for the htmlcategory"
           "link" : "https:/URL/s/-/dw/data/v19_10/sites/my-site/slots/htmlcategory/category",
           "slot_configurations" :
                [

                    {
                       "_type" : "slot_configuration_content",
                       "configuration_id" : "htmlcategory_config",
                       "default" : false,
                       "enabled" : true,
                       "uuid" : "cw6YLaOace0MUqwcsju07iKn3j"
                    }
                 ],
           "slot_id" : "htmlcategory"
       },
  ],
  "select": "**",
  "start" : 0,
  "total" : 2
}

Get Slot

Action to get slot information.

Url

GET https://hostname:port/dw/data/v19_10/sites/{site_id}/slots/{slot_id}/{context_type}?select={String}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Response Document

Slot

Path Parameters

Parameter Type Description Constraints
context_type String The context type (folder, global, category).  
site_id String The site context. minLength=1
slot_id String The id of the requested slot. minLength=1

Query Parameters

Parameter Type Description Constraints
select String The property selector. If not passed, then the default selector will be used.  

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
404 SlotNotFoundException

slotId (String)

contextType (Enum {global, category, folder})

siteId (String)

Indicates the slot does not exist matching the given id.

Sample

REQUEST:
GET /s/-/dw/data/v19_10/sites/SiteGenesis/slots/my-slot/global HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Content-Type: application/json; charset=UTF-8

# in case of success:
 
RESPONSE:
HTTP/1.1 200 OK
Expires: Thu, 01-Aug-2014 00:00:00 GMT
{
   "_v" : "19.10",
   "_resource_state" : "860cde3040519cce439cd99e209f8a87c3ad0b7e2813edbf6f5501f763b73bd5",
   "_type" : "slot",
   "context_type" : "global",
   "description" : "description for slot"
   "link" : "https://example.com/s/-/dw/data/v19_10/sites/SiteGenesis/slots/my-slot/global",
   "slot_configurations" : 
            {
               "_type" : "slot_configuration",
               "assignment_information" : 
               {
                   "_type" : "slot_configuration_assignment_information",
                   "active" : false,
                   "enabled" : false,
                   "schedule_type" : "none"
               },
               "configuration_id" : "my-config",
               "context" : "global",
               "default" : false,
               "enabled" : true,
               "link" : "https://example.com/s/-/dw/data/v19_10/sites/SiteGenesis/slots/my-slot/slot_configurations/Account%20Banner",
               "slot_content" : 
               {
                   "_type" : "slot_content",
                "type" : "html"
               },
               "slot_id" : "my-slot",
               "template" : "slots/html/htmlslotcontainer.isml",
               "uuid" : "cw6YLaOace0MUqwcsju07iKn3j"
            }
         ],
   "slot_id" : "my-slot"
}

# in case of failure:
 
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
  "_v":"19.10",
  "fault":{
    "type":"SlotNotFoundException",
    "message":"No slot with ID 'my-slot' and context type 'GLOBAL' for site 'SiteGenesis' was found."
  }
}