Site Resource (Shop API 16.2)

Summary

Http Method Resource Description
GET /Site Access site information, like site status and site content URLs.

Get Site

Access site information, like site status and site content URLs.

Url

GET http://hostname:port/dw/shop/v16_2/site

Formats

json, xml

Authentication

Name Description
None No authentication.

Response Document

Site

Customization

This Resource supports server-side customization.

Extension Point Method Detail
dw.ocapi.shop.site.afterGET

afterGET (doc : Document) : Status

The function is called after the request has been processed.

Parameters:
doc - the document
Returns:
  • Status.OK for success.
  • Status.ERROR in case something went wrong.

Sample

REQUEST:
GET /dw/shop/v16_2/site HTTP/1.1
Host: demo.ocapi.demandware.net
Accept: application/json

RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
Content-Length: 818
{
  "_v" : "16.2",
  "_type" : "site",
  "currency" : "USD",
  "default_locale" : "default",
  "http_hostname" : "demo.ocapi.demandware.net",
  "http_library_content_url" : "http://demo.ocapi.demandware.net/on/demandware.static/Sites-SiteGenesis-Site/Sites-SiteGenesis-Library/default/v1345174669086",
  "https_hostname" : "demo.ocapi.demandware.net",
  "http_site_content_url" : "http://demo.ocapi.demandware.net/on/demandware.static/Sites-SiteGenesis-Site/-/default/v1345174669086",
  "https_library_content_url" : "https://demo.ocapi.demandware.net/on/demandware.static/Sites-SiteGenesis-Site/Sites-SiteGenesis-Library/default/v1345174669086",
  "https_site_content_url" : "https://demo.ocapi.demandware.net/on/demandware.static/Sites-SiteGenesis-Site/-/default/v1345174669086",
  "id" : "SiteGenesis",
  "name" : "Site Genesis",
  "status" : "online",
  "timezone" : "Etc/UTC",
  "timezone_offset" : 0
}