Origin Status Code Report - GET /api/report/origin-status-code

Reports ››
Parent Previous Next

GET /api/report/origin-status-code

Get the HTTP status codes returned by your origin server from requests for your domains' objects.   Request parameters allow you to specify a time period.   An optional parameter lets you get status codes for HTTPS traffic only or HTTP traffic only.



Request Details


Request Headers


Header

Description

Required

Authorization

Authorization string for the request

Yes

Host

URI for the QUANTIL SDK (i.e., api.quantil.com)

Yes

Date

The date and time of the request.

Yes

Accept

Indicates the accepted format (i.e., application/xml)

Yes

Request Parameters

Parameter

Description

Required

datefrom

RFC3339 formatted date indicating the starting date. Example: 2013-01-01T22:30:00+08:00

Yes

dateto

RFC3339 formatted date indicating the ending date. Example: 2013-01-01T22:30:00+08:00

Yes

https

If true, return status codes for domains using SSL. If false, return status codes for domains not using SSL. If not specified, return all status codes  (SSL and non-SSL).

No


Request Body Elements

This request does not include an XML document in the request body.


Request Syntax:


GET /api/report/origin-status-code HTTP/1.1

Authorization: <authorization string>

Host: api.quantil.com

Date: <date>

Accept: application/xml


Here is the structure of a request using the curl utility.


curl -i --url https://api.quantil.com/api/report/origin-status-code ?datefrom = {date from} & dateto = {date to}& https = {https setting}

-X GET

-u {user}: {password}

-H 'Date: Fri, 26 Oct 2012 06:33:26 GMT'

-H 'Accept: application/xml'

Sample Request:


curl -i --url 'https://api.quantil.com/api/report/origin-status-code?datefrom=2014-08-01T00:00:00%2B09:00&dateto=2014-08-05T23:59:59%2B09:00' -u test:HKE1Mc6DMDkuq0211V7rD5xIybQ= -H 'Date: Fri, 08 Aug 2014 12:49:03 PDT' -H 'Accept: application/xml'

Response Details:


Response Headers:

HTTP/1.1 200 OK

Date: <date>

Content-Type: application/xml; charset = utf-8

x-cnc-request-id: {id string auto generated by the QUANTIL server}



Response Body Elements


Element

Description

status-code-report

container for status code information. It will contain zero or more <status-code-data> elements each describing the number of times a status code was returned.

status-code-data

a container object which includes one <status-code> element and one <hit> element indicating the number of times a status code was returned.

status-code

an HTTP status code. Example: 200

hit

indicates number of times the code was returned.

Sample Response:


HTTP/1.1 200 OK

Date: Wed, 18 Mar 2015 16:50:43 GMT

Accept-Ranges: bytes

Server: WS-web-server

x-cnc-request-id: 8225909

ContentType: application/xml;charset=UTF-8

Content-Type: application/xml;charset=UTF-8

Content-Length: 635


<status-code-report>

 <status-code-data>

   <status-code>200</status-code>

   <hit>108300</hit>

 </status-code-data>

 <status-code-data>

   <status-code>502</status-code>

   <hit>36407</hit>

 </status-code-data>

 <status-code-data>

   <status-code>400</status-code>

   <hit>35521</hit>

 </status-code-data>

 <status-code-data>

   <status-code>500</status-code>

   <hit>35450</hit>

 </status-code-data>

 <status-code-data>

   <status-code>0</status-code>

   <hit>35427</hit>

 </status-code-data>

 <status-code-data>

   <status-code>302</status-code>

   <hit>35279</hit>

 </status-code-data>

</status-code-report>


Error List


Error

Description

HTTP status code

InvalidDatePeriod

The date specified is invalid.

400

InvalidReportType

The report type specified is invalid.

400