LogRequests resource (Data API 23.2)

Summary

Http Method Resource Description
POST /log_requests/ecdn Requests a LogFile-Fetching for the passed zone and time frame.
GET /log_requests/ecdn/{id} Retrieves the current execution status of the log file fetching.

Request Log File

Requests a LogFile-Fetching for the passed zone and time frame.

Url

POST https://hostname:port/dw/data/v23_2/log_requests/ecdn

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Request Document

EcdnLogFetchRequest

Response Document

EcdnLogFetchResponse

Sample

REQUEST:
POST /s/-/dw/data/v23_2/log_requests/ecdn HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Content-Type: application/json; charset=UTF-8
{
  "zone_name": "sitegenesis.com",
  "start_time": "21.2-09-14T16:48:07Z",
  "end_time": "21.2-09-14T16:53:07Z"
}

# in case of success:

RESPONSE:
HTTP/1.1 200 OK
Expires: Thu, 01-Jan-1970 00:00:00 GMT
{
  "_v" : "23.2",
  "_type": "ecdn_log_fetch_response",
  "id": "9f83cls0-d93d-llus-foo1-p8dsl3dkcpw0",
  "status": "pending"
}

# in case of finished log fetch operation:

RESPONSE:
HTTP/1.1 200 OK
Expires: Thu, 01-Jan-1970 00:00:00 GMT
{
  "_v" : "23.2",
  "_type": "ecdn_log_fetch_response",
  "id": "9f83cls0-d93d-llus-foo1-p8dsl3dkcpw0",
  "status": "finished",
  "link": "https://ecdn.commercecloud.salesforce.com/logs/sitegenesis_com_21.2_09_14.gz?token=3d03ekddsflk3m4fl3ekmdes"
}

# in case of zone not found:

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" : "23.2",
  "_type": "fault",
  "fault":
  {
    "arguments":
    {
      "id": "sitegenesis.com"
    }
    "type": "ZoneNotFoundException",
    "message": "No zone with name 'sitegenesis.com' was found."
  }
}

Read Logfetching Execution status

Retrieves the current execution status of the log file fetching.

Url

GET https://hostname:port/dw/data/v23_2/log_requests/ecdn/{id}

Formats

json, xml

Authentication

Name Description
OAuth Authentication via OAuth token.

Response Document

EcdnLogFetchResponse

Path Parameters

Parameter Type Description Constraints
id String ID of the log fetching execution mandatory=true, nullable=false

Sample

REQUEST:
GET /s/-/dw/data/v23_2/log_requests/ecdn/9f83cls0-d93d-llus-foo1-p8dsl3dkcpw0 HTTP/1.1
Host: example.com
Authorization: Bearer a5b6eb0d-8312-41a3-88f3-2c53c4507367
Content-Type: application/json; charset=UTF-8
{
  "zone_name": "sitegenesis.com",
  "start_time": "21.2-09-14T16:48:07Z",
  "end_time": "21.2-09-14T16:53:07Z"
}

# in case of success:

RESPONSE:
HTTP/1.1 200 OK
Expires: Thu, 01-Jan-1970 00:00:00 GMT
{
  "_v" : "23.2",
  "_type": "ecdn_log_fetch_response",
  "id": "9f83cls0-d93d-llus-foo1-p8dsl3dkcpw0",
  "status": "pending"
}

# in case of finished log fetch operation:

RESPONSE:
HTTP/1.1 200 OK
Expires: Thu, 01-Jan-1970 00:00:00 GMT
{
  "_v" : "23.2",
  "_type": "ecdn_log_fetch_response",
  "id": "9f83cls0-d93d-llus-foo1-p8dsl3dkcpw0",
  "status": "finished",
  "link": "https://ecdn.commercecloud.salesforce.com/logs/sitegenesis_com_21.2_09_14.gz?token=3d03ekddsflk3m4fl3ekmdes"
}

# in case of zone not found:

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" : "23.2",
  "_type": "fault",
  "fault":
  {
    "arguments":
    {
      "id": "9f83cls0-d93d-llus-foo1-p8dsl3dkcpw0"
    }
    "type": "EcdnLogFetchRequestNotFoundException",
    "message": "No log fetch operation request with ID '9f83cls0-d93d-llus-foo1-p8dsl3dkcpw0' was found."
  }
}
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.
Notifications pending to read 9