Get the HTTP status codes returned for requests for a domain's objects. Domain-id is a unique ID representing a domain. It is returned when you create a domain. Specify multiple domains by entering their IDs separated only by commas. Request parameters allow you to specify a time period.
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 |
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 |
This request does not include an XML document in the request body.
GET /api/report/{domain-id}/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/ {domain-ID} /status-code ?datefrom = {date from} & dateto = {date to}
-X GET
-u {user}: {password}
-H 'Date: Fri, 26 Oct 2012 06:33:26 GMT'
-H 'Accept: application/xml'
curl -i --url 'https://api.quantil.com/api/report/3487/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'
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}
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. |
HTTP/1.1 200 OK
Date: Fri, 08 Aug 2014 19:49:02 GMT
Accept-Ranges: bytes
Server: WS-web-server
x-cnc-request-id: 1147473
ContentType: application/xml;charset=UTF-8
Content-Type: application/xml;charset=UTF-8
Content-Length: 823
<status-code-report>
<status-code-data>
<status-code>504</status-code>
<hit>2122</hit>
</status-code-data>
<status-code-data>
<status-code>0</status-code>
<hit>1527</hit>
</status-code-data>
<status-code-data>
<status-code>302</status-code>
<hit>2186</hit>
</status-code-data>
<status-code-data>
<status-code>404</status-code>
<hit>847</hit>
</status-code-data>
<status-code-data>
<status-code>200</status-code>
<hit>177409</hit>
</status-code-data>
<status-code-data>
<status-code>400</status-code>
<hit>524</hit>
</status-code-data>
<status-code-data>
<status-code>502</status-code>
<hit>652</hit>
</status-code-data>
<status-code-data>
<status-code>500</status-code>
<hit>1837</hit>
</status-code-data>
</status-code-report>
Error |
Description |
HTTP status code |
InvalidDatePeriod |
The date specified is invalid. |
400 |
InvalidReportType |
The report type specified is invalid. |
400 |
NoSuchDomain |
The specified domain does not exist. |
404 |