Get the HTTP status codes returned for requests for all of 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.
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 |
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 |
This request does not include an XML document in the request body.
GET /api/report/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/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'
curl -i --url 'https://api.quantil.com/api/report/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:57:30 GMT
Accept-Ranges: bytes
Server: WS-web-server
x-cnc-request-id: 1147524
ContentType: application/xml;charset=UTF-8
Content-Type: application/xml;charset=UTF-8
Content-Length: 826
<status-code-report>
<status-code-data>
<status-code>504</status-code>
<hit>2667</hit>
</status-code-data>
<status-code-data>
<status-code>0</status-code>
<hit>2655</hit>
</status-code-data>
<status-code-data>
<status-code>302</status-code>
<hit>3224</hit>
</status-code-data>
<status-code-data>
<status-code>404</status-code>
<hit>2400</hit>
</status-code-data>
<status-code-data>
<status-code>200</status-code>
<hit>284490</hit>
</status-code-data>
<status-code-data>
<status-code>400</status-code>
<hit>1113</hit>
</status-code-data>
<status-code-data>
<status-code>502</status-code>
<hit>1603</hit>
</status-code-data>
<status-code-data>
<status-code>500</status-code>
<hit>2684</hit>
</status-code-data>
Error |
Description |
HTTP status code |
InvalidDatePeriod |
The date specified is invalid. |
400 |
InvalidReportType |
The report type specified is invalid. |
400 |