Get Domain Configuration - GET /api/domain/{domain-id}

Parent Previous Next

GET /api/domain/{domain-id}

Get a domain's configuration.  Domain-id is a unique id representing a domain. It is returned when you create a domain. This API can be called for domains of the Web Acceleration, Website Acceleration - Static only,  Download Acceleration, and Video Acceleration products.

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 Body Elements

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


Request Syntax:


GET /api/domain/<domain-id> HTTP/1.1

Authorization: Basic <authorization string>

Host: api.quantil.com

Date: <date>

Accept: application/xml


Here is the structure of a request using the curl utility.   The domain-id is the unique ID which is returned to you when you created the domain.


curl -i --url https://api.quantil.com/api/domain/{domain-id}

-X GET

-u {user}: {password}

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

-H 'Accept: application / xml'


Sample Request:


The following example using the curl command-line tool to obtain a domain's configuration.


curl -i --url 'https://api.quantil.com/api/domain/5442' -X GET -u test:pXoktxJQnUEkaOurDbJ02Y0axzE= -H 'Date: Wed, 06 Aug 2014 14:12:25 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

domain

container for  information from the QUANTIL server.  The XML body can contain all of the elements available when creating a domain.  However, if you have not defined custom rules and other configuration, then the response will only contain a subset of elements. In addition, several child elements <cdn-service-status>, <enabled> , and <status> will indicate the status of your domain.

service-type

type of service that the domain is using. Example: web, wsa, download, or vodstream. Please refer to this mapping of the service names to QUANTIL's products.

cname

the domain name generated by the QUANTIL service. You need to cname your domain to this value.

cdn-service-status

true or false to indicate whether QUANTIL's servers will be used to serve content. If false, the users' requests for content will be directed to your origin server.

enabled

If false, a user request to the domain will result in an error response such as HTTP status code 500. If true, the request will be handled normally.

status

Its values can be InProgress or Deployed.  InProgress means we have received your configuration request, but it has not been deployed to all cache servers around the world.  Deployed means the configuration is fully deployed, so all users should see the benefits of QUANTIL's acceleration.




Sample Response:


HTTP/1.1 200 OK

Date: Wed, 06 Aug 2014 21:12:23 GMT

Accept-Ranges: bytes

Server: WS-web-server

x-cnc-request-id: 1114001

ContentType: application/xml;charset=UTF-8

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

Content-Length: 495


<?xml version="1.0" encoding="UTF-8"?><domain>

 <domain-name>mynewtestdomain1.com</domain-name>

 <service-type>web</service-type>

 <cname>kmi6qlgd000or3.wscloudcdn.com</cname>

 <cdn-service-status>true</cdn-service-status>

 <enabled>true</enabled>

 <status>Deployed</status>

<version>1.0.0</version><origin-config> <origin-ips>9.8.7.6</origin-ips> </origin-config><service-areas>cn</service-areas><log-option><log-storage-day>7</log-storage-day><timezone>7</timezone></log-option></domain>




Error List

Error

Description

HTTP status code

NoSuchDomain

The specified domain does not exist.

404