Get edge

Prev Next

Available in Classic and VPC

Get details of an edge.

Request

This section describes the request format. The method and URI are as follows:

Method URI
GET /api/v1/cdn-edge/{edgeId}

Request headers

For information about the headers common to all Global Edge APIs, see Global Edge request headers.

Request path parameters

You can use the following path parameters with your request:

Field Type Required Description
edgeId Long Required Edge ID

Request example

The request example is as follows:

curl --location --request GET 'https://edge.apigw.ntruss.com/api/v1/cdn-edges/123' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'Content-Type: application/json'

Response

This section describes the response format.

Response body

The response body includes the following data:

Field Type Required Description
code String - Response code
message String - Response message
result Object - Response result

result

The following describes result.

Field Type Required Description
profileId Long - Profile ID
edgeName String - Edge name
distributionConfig Object - Deployment settings: CdnDistributionConfig
originalCopyConfig Object - Origin settings: CdnOriginalCopyConfig
cachingConfig Object - Cache settings: CdnCachingConfig
managedRule Object - Managed rule: ManagedRule
headerPolicies Array - Header settings: HeaderPolicy
  • Display the empty value [] if not set.
optimizationConfig Object - Optimization settings: OptimizationConfig
accessControl Object - Access control settings: AccessControl
productType String - Service classification code

CdnDistributionConfig

The following describes CdnDistributionConfig.

Field Type Required Description
protocolType String - Service protocol
regionType String - Service area
serviceDomain Object - Service domain settings
serviceDomain.domainType String - Service domain type
  • NCP_DOMAIN_AUTO | NCP_DOMAIN_CUSTOM | CUSTOM_DOMAIN
    • NCP_DOMAIN_AUTO: Automatically generated NAVER Cloud Platform domain
    • NCP_DOMAIN_CUSTOM: NAVER Cloud Platform domain including user input values
    • CUSTOM_DOMAIN: User-owned domain
serviceDomain.domainName String - Domain name
serviceDomain.certificate Object - Certificate
  • When the user-owned domain (CUSTOM_DOMAIN) is served as HTTPS, display including subinformation.
serviceDomain.certificate.id Number - Certificate slot ID
edgeLogging Object - Edge log settings
edgeLogging.enabled Boolean - Feature usage status
  • true | false
    • true: Enable.
    • false: Disable.
  • If true, display related information additionally.
edgeLogging.bucketPrefix String - Log storage path
edgeLogging.objectStorage Object - Log storage information
  • Bucket registered in Object Storage
edgeLogging.objectStorage.region String - Service Region
edgeLogging.objectStorage.bucketName String - Bucket name

CdnOriginalCopyConfig

The following describes CdnOriginalCopyConfig.

Field Type Required Description
originalCopyLocation Object - Origin server settings
originalCopyLocation.type String - Origin type
  • OBJECT_STORAGE | LOAD_BALANCER | API_GATEWAY | CUSTOM
    • OBJECT_STORAGE: NAVER Cloud Platform's Object Storage
    • LOAD_BALANCER: NAVER Cloud Platform's Load Balancer
    • API_GATEWAY: NAVER Cloud Platform's API Gateway
    • CUSTOM: External origin domain
originalCopyLocation.region String - Service Region
  • Display if originalCopyLocation.type is OBJECT_STORAGE or LOAD_BALANCER.
originalCopyLocation.bucketName String - Bucket name
  • Display if originalCopyLocation.type is OBJECT_STORAGE.
originalCopyLocation.customLocation String - Origin domain name
  • Display if originalCopyLocation.type is LOAD_BALANCER, API_GATEWAY, or CUSTOM.
forwardHostHeader Object - Host header forwarding settings
forwardHostHeader.type String - Forwarding type
  • INCOMING_HOST_HEADER | ORIGIN_HOSTNAME | CUSTOM
    • INCOMING_HOST_HEADER: Use header received from client.
    • ORIGIN_HOSTNAME: Replace header with a specific value.
    • CUSTOM: Specify header value.
forwardHostHeader.customHostHeader String - Host header value
  • Display if forwardHostHeader.type is CUSTOM.
originalCopyProtocol Object - Origin protocol settings
originalCopyProtocol.type String - Protocol type
  • HTTP | HTTPS
originalCopyProtocol.port Integer - Port number
originalCopyPath String - Origin path
originFailoverConfig Object - Origin failover settings
originFailoverConfig.ruleName String - Failover rule name
originFailoverConfig.statusCodes Array - List of origin response codes
originFailoverConfig.originalCopyLocation Object - Backup origin server information to forward requests to
originFailoverConfig.originalCopyLocation.type String - Backup origin type
  • OBJECT_STORAGE | CUSTOM
    • OBJECT_STORAGE: Object Storage
    • CUSTOM: External domain
originFailoverConfig.originalCopyLocation.region String - Service Region
  • Display if originFailoverConfig.originalCopyLocation.type is OBJECT_STORAGE.
originFailoverConfig.originalCopyLocation.bucketName String - Bucket name
  • Display if originFailoverConfig.originalCopyLocation.type is OBJECT_STORAGE.
originFailoverConfig.originalCopyLocation.customLocation String - Domain name
  • Display if originFailoverConfig.originalCopyLocation.type is CUSTOM.

CdnCachingConfig

The following describes CdnCachingConfig.

Field Type Required Description
defaultCaching Object - Default cache settings
defaultCaching.enabled Boolean - Feature usage status
  • true | false
    • true: Enable.
    • false: Disable.
  • If true, display related information additionally.
defaultCaching.ruleDefinitionType String - Cache options
  • CACHING | BYPASS_CACHE | ORIGIN_CACHE_CONTROL_HEADER
    • CACHING: Cache
    • BYPASS_CACHE: Bypass to origin server
    • ORIGIN_CACHE_CONTROL_HEADER: Process based on origin cache-control header
defaultCaching.cacheRevalidateConfig Object - Set up revalidation of stale objects
  • Specify what to do when the cache expires and the origin can't be used.
defaultCaching.cacheRevalidateConfig.type String - Revalidation type
  • IF_POSSIBLE | ALWAYS
    • IF_POSSIBLE: Serve stale objects if validation can't be done.
    • ALWAYS: Always validates origin.
defaultCaching.cacheRevalidateConfig.ageType String - Maximum cache retention period unit
defaultCaching.cacheRevalidateConfig.age Integer - Maximum cache retention period
negativeTtl Boolean - Whether to use negative TTL
  • true | false
    • true: Enable.
    • false: Disable.
  • Cache response when the origin server returns an error response.
bypassQueryString Object - Bypass query string settings
  • Specify a condition string to bypass to the origin server without caching.
bypassQueryString.enabled Boolean - Feature usage status
  • true | false
    • true: Enable.
    • false: Disable.
  • If true, display related information additionally.
bypassQueryString.queryStrings Array - Target string list
cacheKeyHostname String - Cache key host name type
  • INCOMING_HOST_HEADER | ORIGIN_HOSTNAME
    • INCOMING_HOST_HEADER: Include service domain in cache key.
    • ORIGIN_HOSTNAME: Include host name of origin server in cache key.
cacheKeyIgnoreQueryString Object - Cache key query string settings
  • Specify how query strings are included/ignored when generating cache keys.
cacheKeyIgnoreQueryString.type String - Setting type
  • ALL_IGNORED | ALL_ALLOWED | ALLOW_SPECIFIC_STRING
    • ALL_IGNORED: Ignore all.
    • ALL_ALLOWED: Allow all.
    • ALLOW_SPECIFIC_STRING: Allow specific string.
cacheKeyIgnoreQueryString.queryStrings Array - Target string list
  • Display if cacheKeyIgnoreQueryString.type is ALLOW_SPECIFIC_STRING.
urlLetterCaseIgnoreUse Boolean - Whether to ignore cache key case sensitivity
  • true | false
    • true: Ignore
    • false: Not ignore
  • URLs and file names can be cached ignoring case if the origin is case insensitive.
removeVaryHeader Boolean - Whether to remove the Vary header
  • true | false
    • true: Enable.
    • false: Disable.
  • Cache after removing Vary headers other than Accept-Encoding in origin server responses when enabled.
edgeAuth Object - Request authentication settings
  • Respond only if the request is authenticated with a token and passed.
edgeAuth.enabled Boolean - Feature usage status
  • true | false
    • true: Enable.
    • false: Disable.
  • If true, display related information additionally.
edgeAuth.type String - Authentication type
  • SIGNED_URL | JWT | MEDIA_VAULT
    • SIGNED_URL: Include authentication information in the URL.
    • JWT: Create a JSON token to include in the HTTP header.
    • MEDIA_VAULT: Include authentication information in the URL.
edgeAuth.tokenName String - Token name
edgeAuth.tokenKey String - Token key value
edgeAuth.bypassValues Array - List of authentication exclusion extensions
edgeAuth.tokenBypassValues Array - List of extensions that pass authentication values to origin
cachingRules Array - Cache detailed rule settings: CachingRule
  • Display including subinformation when a rule exists.

CachingRule

The following describes CachingRule.

Field Type Required Description
ruleName String - Cache detailed rule name
ruleType String - Rule condition type
  • DIRECTORY | FILE_EXTENSION | ADVANCED
    • DIRECTORY: Directory
    • FILE_EXTENSION: File extension
    • ADVANCED: Directory and file extension
ruleConditions Array - List of rule conditions
ruleDefinitionType String - Cache options
  • CACHING | BYPASS_CACHE | ORIGIN_CACHE_CONTROL_HEADER
    • CACHING: Cache
    • BYPASS_CACHE: Bypass to origin server
    • ORIGIN_CACHE_CONTROL_HEADER: Process based on origin cache-control header
cacheRevalidateConfig Object - Set up revalidation of stale objects
  • Specify what to do when the cache expires and the origin can't be used.
cacheRevalidateConfig.type String - Revalidation type
  • IF_POSSIBLE | ALWAYS
    • IF_POSSIBLE: Serve stale objects if validation can't be done.
    • ALWAYS: Always validates origin.
cacheRevalidateConfig.ageType String - Maximum cache retention period unit
cacheRevalidateConfig.age String - Maximum cache retention period
ruleBasedRoutingConfig Object - Rule-based origin routing settings
  • Routes origin to a specified location if rule conditions are met.
ruleBasedRoutingConfig.enabled Boolean - Feature usage status
  • true | false
    • true: Enable.
    • false: Disable.
  • If true, display related information additionally.
ruleBasedRoutingConfig.originalCopyLocation Object - Origin server settings
ruleBasedRoutingConfig.originalCopyLocation.type String - Origin type
  • OBJECT_STORAGE | CUSTOM
    • OBJECT_STORAGE: Object Storage
    • CUSTOM: External domain
ruleBasedRoutingConfig.originalCopyLocation.region String - Service Region
  • Display if ruleBasedRoutingConfig.originalCopyLocation.type is OBJECT_STORAGE.
ruleBasedRoutingConfig.originalCopyLocation.bucketName String - Bucket name
  • Display if ruleBasedRoutingConfig.originalCopyLocation.type is OBJECT_STORAGE.
ruleBasedRoutingConfig.originalCopyLocation.customLocation String - Domain name
  • Display if ruleBasedRoutingConfig.originalCopyLocation.type is CUSTOM.
browserCache Object - Browser cache settings
  • Specify the caching behavior sent to the client in edge.
browserCache.enabled Boolean - Feature usage status
  • true | false
    • true: Enable.
    • false: Disable.
  • If true, display related information additionally.
browserCache.type String - Browser cache allowance type
  • ALLOW_CACHE | NO_CACHE
    • ALLOW_CACHE: Allow cache.
    • NO_CACHE: Not allow cache.
browserCache.ageType String - Maximum cache retention period unit
browserCache.age Integer - Maximum cache retention period
cacheKeyQueryParameter Object - Cache key query parameter settings
  • Specify how query strings are included/ignored when generating cache keys.
cacheKeyQueryParameter.enabled Boolean - Feature usage status
  • true | false
    • true: Enable.
    • false: Disable.
  • If true, display related information additionally.
cacheKeyQueryParameter.type String - Setting type
  • ALL_IGNORED | ALL_ALLOWED | IGNORE_SPECIFIC_STRING | ALLOW_SPECIFIC_STRING
    • ALL_IGNORED: Ignore all.
    • ALL_ALLOWED: Allow all.
    • IGNORE_SPECIFIC_STRING: Ignore specific string.
    • ALLOW_SPECIFIC_STRING: Allow specific string.
cacheKeyQueryParameter.queryParameters Array - Target string list
  • Display if cacheKeyQueryParameter.type is ALLOW_SPECIFIC_STRING or IGNORE_SPECIFIC_STRING.
accessDeny Boolean - Whether to block access to rule conditions (ruleConditions)
  • true | false
    • true: Block
    • false: Not block
urlRedirect Object - URL redirection settings
  • Respond with a redirect instead of the origin server if rule conditions are met.
urlRedirect.enabled Boolean - Feature usage status
  • true | false
    • true: Enable.
    • false: Disable.
  • If true, display related information additionally.
urlRedirect.destinationProtocol String - Redirect destination protocol
  • HTTP | HTTPS
urlRedirect.destinationHostname String - Redirection destination host
urlRedirect.destinationPath String - Redirection destination detailed path
urlRedirect.responseCode String - Redirection status code
  • MOVED_PERMANENTLY_301 | FOUND_302
    • MOVED_PERMANENTLY_301: Permanent URL move
    • FOUND_302: Temporary URL move
urlRewrite Object - URL rewriting settings
  • Automatically edits URLs in requests when rule conditions are met.
urlRewrite.enabled Boolean - Feature usage status
  • true | false
    • true: Enable.
    • false: Disable.
  • If true, display related information additionally.
urlRewrite.rewriteTarget String - Destination detailed path

ManagedRule

The following describes ManagedRule.

Field Type Required Description
cors Boolean - Whether to add the cross origin resource sharing header (CORS header)
  • true | false
    • true: Add.
    • false: Not add.
corsPolicy Object Conditional Cross-Origin Resource Sharing (CORS) header details
corsPolicy.allowOrigin String Required Access-Control-Allow-Origin settings
  • Access-Control-Allow-Origin: * and Access-Control-Allow-Credentials: true can't be set at the same time.
corsPolicy.allowMethods Array Conditional Access-Control-Allow-Methods settings
  • GET | POST | OPTIONS
  • If not set, enter the empty value [].
corsPolicy.allowHeaders Array Conditional Access-Control-Allow-Headers settings
  • If not set, enter the empty value [].
corsPolicy.allowCredentials Boolean Conditional Access-Control-Allow-Credentials settings
  • true | false
  • Access-Control-Allow-Origin: * and Access-Control-Allow-Credentials: true can't be set at the same time.
corsPolicy.useMaxAge Boolean Conditional Access-Control-Max-Age settings
  • true | false
    • true: 86400
    • false: Disable
http2 Boolean - Whether to use open network protocol (HTTP/2)
  • true | false
    • true: Enable
    • false: Disable
trueClientIpHeader Boolean - Whether to add client IP header to headers when forwarding requests to origin server
  • true | false
    • true: Add
    • false: Not add
hsts Boolean - Whether to use HTTPS for browser connections
  • true | false
    • true: Enable
    • false: Disable

HeaderPolicy

The following describes HeaderPolicy.

Field Type Required Description
type String - Header type
  • ORIGIN_REQUEST | CLIENT_RESPONSE
    • ORIGIN_REQUEST: Request header forwarded to the origin server
    • CLIENT_RESPONSE: Response header sent from the server to the client
ruleName String - Header setting name
header Object - Header detailed settings
header.type String - Action type
  • ADD | MODIFY | REMOVE
    • ADD: Add
    • MODIFY: Edit
    • REMOVE: Delete
header.name String - Header name
header.value String - Header value
  • Display if header.type is ADD or MODIFY.

OptimizationConfig

The following describes OptimizationConfig.

Field Type Required Description
httpCompression Boolean - Whether to use Gzip or Brotli compressed transfers
  • true | false
    • true: Enable
    • false: Disable
  • Faster response times when enabled
largeFileOptimization Boolean - Whether to enable large file transfer
  • true | false
    • true: Enable.
    • false: Disable.
  • Optimize large file transfer performance and reliability when enabled.
headerMaxSize Object Conditional Request Header Size settings
headerMaxSize.singleSize String Required Single Header Size settings
  • SIZE_8KB | SIZE_16KB | SIZE_32KB
    • SIZE_8KB: 8192
    • SIZE_16KB: 16384
    • SIZE_32KB: 32768
headerMaxSize.totalSize String Required Total Header Size settings
  • SIZE_8KB | SIZE_16KB | SIZE_32KB
    • SIZE_8KB: 8192
    • SIZE_16KB: 16384
    • SIZE_32KB: 32768

AccessControl

The following describes AccessControl.

Field Type Required Description
type String - Access control type
  • WHITELIST | BLACKLIST
    • WHITELIST: Whitelist
    • BLACKLIST: Blacklist
ipPolicies Array - Client IP or CIDR block
  • IP format.
  • Display the empty value [] if not set.
geoPolicies Array - Client country code
  • ISO 3166-1 alpha-2 country code standard.
  • Display the empty value [] if not set.
refererPolicies Array - HTTP request referrer header
  • Domain format.
  • Display the empty value [] if not set.

Response status codes

For information about the HTTP status codes common to all Global Edge APIs, see Global Edge response status codes.

Response example

The response example is as follows:

{
    "code": "0000",
    "message": "Success",
    "result": {
        "profileId": 4207,
        "edgeName": "edge2",
        "distributionConfig": {
            "protocolType": "HTTP",
            "regionType": "KOREA",
            "serviceDomain": {
                "domainType": "NCP_DOMAIN_AUTO",
                "domainName": "jze******.edge.naverncp.com"
            },
            "edgeLogging": {
                "enabled": false
            }
        },
        "originalCopyConfig": {
            "originalCopyLocation": {
                "type": "LOAD_BALANCER",
                "region": "KR",
                "customLocation": "LB-********.kr.lb.naverncp.com"
            },
            "forwardHostHeader": {
                "type": "INCOMING_HOST_HEADER",
                "customHostHeader": ""
            },
            "originalCopyProtocol": {
                "type": "HTTP",
                "port": 80
            },
            "originalCopyPath": ""
        },
        "cachingConfig": {
            "defaultCaching": {
                "enabled": true,
                "ruleDefinitionType": "CACHING",
                "cacheRevalidateConfig": {
                    "type": "ALWAYS",
                    "ageType": "DAYS",
                    "age": 30
                }
            },
            "negativeTtl": true,
            "bypassQueryString": {
                "enabled": false
            },
            "cacheKeyHostname": "INCOMING_HOST_HEADER",
            "cacheKeyIgnoreQueryString": {
                "type": "ALL_IGNORED"
            },
            "urlLetterCaseIgnoreUse": false,
            "removeVaryHeader": true,
            "edgeAuth": {
                "enabled": false
            },
            "cachingRules": [
                {
                    "ruleName": "cachedetailrule",
                    "ruleType": "DIRECTORY",
                    "ruleConditions": [
                        "/dir/*"
                    ],
                    "ruleDefinitionType": "CACHING",
                    "cacheRevalidateConfig": {
                        "type": "IF_POSSIBLE",
                        "ageType": "DAYS",
                        "age": 30
                    },
                    "ruleBasedRoutingConfig": {
                        "enabled": true,
                        "originalCopyLocation": {
                            "type": "CUSTOM",
                            "customLocation": "admin.example.com"
                        }
                    },
                    "browserCache": {
                        "enabled": true,
                        "type": "ALLOW_CACHE",
                        "ageType": "MINUTES",
                        "age": 1
                    },
                    "cacheKeyQueryParameter": {
                        "enabled": true,
                        "type": "IGNORE_SPECIFIC_STRING",
                        "queryParameters": [
                            "param"
                        ]
                    },
                    "accessDeny": true,
                    "urlRedirect": {
                        "enabled": true,
                        "destinationProtocol": "HTTP",
                        "destinationHostname": "host.com",
                        "destinationPath": "/directory",
                        "responseCode": "FOUND_302"
                    },
                    "urlRewrite": {
                        "enabled": false
                    }
                }
            ]
        },
        "managedRule": {
            "cors": false,
            "corsPolicy": {
                "allowOrigin": "*",
                "allowMethods": [
                    "GET",
                    "POST",
                    "OPTIONS"
                ],
                "allowHeaders": [
                    "origin"
                ],
                "allowCredentials": false,
                "useMaxAge": true
            },
            "http2": false,
            "trueClientIpHeader": false,
            "hsts": false
        },
        "headerPolicies": [],
        "optimizationConfig": {
            "httpCompression": true,
            "largeFileOptimization": true,
            "headerMaxSize": {
                "singleSize": "SIZE_16KB",
                "totalSize": "SIZE_32KB"
            }
        },
        "accessControl": {
            "type": "WHITELIST",
            "ipPolicies": [
                "1**.***.***.**0"
            ],
            "geoPolicies": [
                "AF",
                "AL"
            ],
            "refererPolicies": [
                "*.test.com"
            ]
        },
        "productType": "GLOBAL_EDGE"
    }
}