Get Multi-Domain Service Details
This API is used to get a multi-domain website acceleration service details. The service will have a primary domain name as the "name" field, and other domain name will be managed by "alternateDomainNames" field.
1. Request Definition
- API URL
https://cdn-api.swiftfederation.com/v3.0/domains/{serviceId}
- Request Method
GET
- Request Header
Refer to HTTP Request Headers
- Request Body
No request Body for this API.
2. Response Definition
- Response Header
Refer to HTTP Response Headers
- Response Body
Field | Type | Description |
---|---|---|
id | int | Service ID number. |
name | string | Domain name. |
alternateDomainNames | string[] | Array of alternate domain names. |
customerId | int | Customer ID of this domain. |
origins | Origin[] | List of Origin, need at least one Origin. and for multi Origin, the priority as the List sequence, there will be fallback is the front origin is fail. |
deliveryDomain | string | CName domain that the domain name has to point to. |
streamingService | boolean | To indicate if need to combine multiple requests as one request to origin server. true: Enabled, false: Disabled. Default is false. |
http2 | boolean | true: Enabled, false: Disabled. |
redirectHttpToHttps | boolean | Whether redirect all plain HTTP requests to HTTPS. true: Enabled, false: Disabled. Default is false. |
active | boolean | To indicate if service is enabled or disabled. true: Enabled, false: Disabled. Default is true. |
Origin Definition | ||
urlPrefix | string | The origin address. Has the following format: [http[s]://]hostname[:port][/path/prefix]. The bits in [] are optional. If the scheme (http/https) is explicitly specified then it is forced for all origin requests, otherwise (scheme is omitted) the protocol used by client is used to contact the origin. |
sni | string | The server name to send to the origin during SSL handshake, when missing the host name used in Origin URL is used. |
headers | Map | The Origin Headers containing extra headers to send to the origin. format: Dictionary {"HeaderName": "HeaderValue", ...}. E.g: {"Host": "origin.domain.com"} |
- Response Body Example
{
"id": 201,
"name": "www.website2.com",
"customerId": 11,
"origins":[
{
"urlPrefix":"https://origin.domain.com:8888/foo/bar",
"sni":"origin-a.domain.com",
"headers":{"Host":"origin-b.domain.com","X-Foo":"bar"}
}
],
"deliveryDomain": "edge.swiftserve.com",
"streamingService": true,
"http2":true,
"redirectHttpToHttps":true,
"active": true
}