Get origin configuration
GET
/
cloud-cdn
/
distributions
/
configurations
/
origin
Get origin configuration
curl --request GET \
--url https://api.aptranet.com/cloud-cdn/distributions/configurations/origin \
--header 'Aptranet-Secret: <api-key>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aptranet.com/cloud-cdn/distributions/configurations/origin"
headers = {
"Authorization": "Bearer <token>",
"Aptranet-Secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Aptranet-Secret': '<api-key>'}
};
fetch('https://api.aptranet.com/cloud-cdn/distributions/configurations/origin', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aptranet.com/cloud-cdn/distributions/configurations/origin"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Aptranet-Secret", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"origin_protocol": "http",
"follow_origin_redirection": true,
"follow_redirect_codes": [
301
],
"connection_timeout": 1,
"read_timeout": 1,
"rewrite": {
"enabled": true,
"flag": "break",
"body": "<string>"
},
"force_return": {
"enabled": true,
"code": 349,
"body": "<string>"
},
"origin_group": {
"id": 123,
"name": "<string>",
"connected_distributions_count": 1,
"use_next_upstream": true,
"next_upstream_cases": {
"on_error": true,
"on_timeout": true,
"on_invalid_header": true,
"on_http_403": true,
"on_http_404": true,
"on_http_429": true,
"on_http_500": true,
"on_http_502": true,
"on_http_503": true,
"on_http_504": true
},
"aws_v4_auth": {
"bucket_name": "<string>",
"region": "<string>"
}
}
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}Authorizations
Access key beginning with APTRANET_.
Current secret paired with the access key.
Query Parameters
Distribution identifier.
Required range:
x >= 1Response
Origin configuration.
Available options:
http, https, match Available options:
301, 302, 303, 307, 308 Required range:
x >= 0Required range:
x >= 0Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Get origin configuration
curl --request GET \
--url https://api.aptranet.com/cloud-cdn/distributions/configurations/origin \
--header 'Aptranet-Secret: <api-key>' \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aptranet.com/cloud-cdn/distributions/configurations/origin"
headers = {
"Authorization": "Bearer <token>",
"Aptranet-Secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Aptranet-Secret': '<api-key>'}
};
fetch('https://api.aptranet.com/cloud-cdn/distributions/configurations/origin', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aptranet.com/cloud-cdn/distributions/configurations/origin"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Aptranet-Secret", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"origin_protocol": "http",
"follow_origin_redirection": true,
"follow_redirect_codes": [
301
],
"connection_timeout": 1,
"read_timeout": 1,
"rewrite": {
"enabled": true,
"flag": "break",
"body": "<string>"
},
"force_return": {
"enabled": true,
"code": 349,
"body": "<string>"
},
"origin_group": {
"id": 123,
"name": "<string>",
"connected_distributions_count": 1,
"use_next_upstream": true,
"next_upstream_cases": {
"on_error": true,
"on_timeout": true,
"on_invalid_header": true,
"on_http_403": true,
"on_http_404": true,
"on_http_429": true,
"on_http_500": true,
"on_http_502": true,
"on_http_503": true,
"on_http_504": true
},
"aws_v4_auth": {
"bucket_name": "<string>",
"region": "<string>"
}
}
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}{
"error_code": "<string>",
"error": "<string>",
"error_description": "<string>",
"trace_id": "<string>"
}