Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
You can edit the source station domain name or host header by using the API. The value of the host string is the HTTP request header if the host header indicates the return-to-source Content Delivery Network. This value is generally a character string in the form of a domain name. The source station uses this domain name to identify whether it is the same as the domain name that was configured on the source station.
Method | Request URI
|
---|---|
PUT | https://restapi.cdn.azure.cn/subscriptions/{subscriptionId}/endpoints/{endpointId}?apiVersion=1.0 |
Parameter name | Description
|
---|---|
subscriptionId | Subscription unique identifier |
endpointId | Target node unique identifier |
Request header | Description |
---|---|
x-azurecdn-request-date | Required. Enter the current UTC request time in yyyy-MM-dd hh:mm:ss format. |
Authorization | Required. Refer to CDN API signing mechanism for authorization headers. |
content-type | Required. application/json |
Update source station:
{
"EndpointSettings": {
"Origin": {
"Addresses": [
"www.neworigin.com"
]
}
},
"UpdateFlag": "Origin"
}
Update return-to-source host header:
{
"EndpointSettings": {
"Host": "www.newhost.com"
},
"UpdateFlag": "HostHeader"
}
Simultaneously update origin domain and return-to-Source-Host header
{
"EndpointSettings": {
"Host": "www.newhost.com",
"Origin": {
"Addresses": [
"www.neworigin.com"
]
}
},
"UpdateFlag": "Origin,HostHeader"
}
Parameter name | Description |
---|---|
Host | Return-to-source host header |
Addresses | Return-to-source address collection |
UpdateFlag | Update flag
|
A response comprises a status code, response headers, and a response body.
Status code | Description |
---|---|
202 | Indicates that the server has successfully accepted the request. |
Other | General response indicating that an error has occurred. |
Response header | Description |
---|---|
X-Correlation-Id | The request's unique identifier, which is used to track request information. |
JSON example for request succeeded:
{
"Succeeded": true,
"IsAsync": true,
"AsyncInfo": {
"TaskTrackId": "b520c544-ec34-4ac4-86f5-5394363919c3",
"TaskStatus": "Processing"
}
}
Parameter name | Description |
---|---|
TaskTrackId | The update operation's unique identifier, which can be used to query update progress. |
TaskStatus | Task status
|
JSON example for request failed:
{
"Succeeded": false,
"ErrorInfo": {
"Type": "MissingAuthorizationHeader",
"Message": "Missing authorization header."
}
}
Parameter name | Description |
---|---|
Type | Error type
|
Message | Error information |