Share via


Routes - Get

Gets an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/afdEndpoints/{endpointName}/routes/{routeName}?api-version=2025-04-15

URI Parameters

Name In Required Type Description
endpointName
path True

string

Name of the endpoint under the profile which is unique globally.

profileName
path True

string

minLength: 1
maxLength: 260
pattern: ^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$

Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

routeName
path True

string

Name of the routing rule.

subscriptionId
path True

string (uuid)

The ID of the target subscription. The value must be an UUID.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Responses

Name Type Description
200 OK

Route

OK

Other Status Codes

ErrorResponse

Azure Front Door error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Routes_Get

Sample request

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/afdEndpoints/endpoint1/routes/route1?api-version=2025-04-15

Sample response

{
  "name": "route1",
  "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/afdendpoints/endpoint1/routes/route1",
  "type": "Microsoft.Cdn/profiles/afdendpoints/routes",
  "properties": {
    "customDomains": [
      {
        "id": "/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/customDomains/domain1"
      }
    ],
    "originGroup": {
      "id": "/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/originGroups/originGroup1"
    },
    "originPath": null,
    "ruleSets": [
      {
        "id": "/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/ruleSets/ruleSet1"
      }
    ],
    "supportedProtocols": [
      "Https",
      "Http"
    ],
    "patternsToMatch": [
      "/*"
    ],
    "cacheConfiguration": {
      "compressionSettings": {
        "contentTypesToCompress": [
          "text/html",
          "application/octet-stream"
        ],
        "isCompressionEnabled": true
      },
      "queryStringCachingBehavior": "IgnoreQueryString",
      "queryParameters": null
    },
    "forwardingProtocol": "MatchRequest",
    "linkToDefaultDomain": "Enabled",
    "httpsRedirect": "Enabled",
    "enabledState": "Enabled",
    "provisioningState": "Succeeded",
    "deploymentStatus": "NotStarted"
  }
}

Definitions

Name Description
ActivatedResourceReference

Reference to another resource along with its state.

AFDEndpointProtocols

Supported protocols for the customer's endpoint.

AfdProvisioningState

Provisioning status

afdQueryStringCachingBehavior

Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.

AfdRouteCacheConfiguration

Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object.

CompressionSettings

settings for compression.

createdByType

The type of identity that created the resource.

DeploymentStatus
EnabledState

Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

ForwardingProtocol

Protocol this rule will use when forwarding traffic to backends.

httpsRedirect

Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed.

LinkToDefaultDomain

whether this route will be linked to the default endpoint domain.

ResourceReference

Reference to another resource.

Route

Friendly Routes name mapping to the any Routes or secret related information.

systemData

Metadata pertaining to creation and last modification of the resource.

ActivatedResourceReference

Reference to another resource along with its state.

Name Type Description
id

string

Resource ID.

isActive

boolean

Whether the resource is active or inactive

AFDEndpointProtocols

Supported protocols for the customer's endpoint.

Value Description
Http
Https

AfdProvisioningState

Provisioning status

Value Description
Succeeded
Failed
Updating
Deleting
Creating

afdQueryStringCachingBehavior

Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.

Value Description
IgnoreQueryString
UseQueryString
IgnoreSpecifiedQueryStrings
IncludeSpecifiedQueryStrings

AfdRouteCacheConfiguration

Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object.

Name Type Description
compressionSettings

CompressionSettings

compression settings.

queryParameters

string

query parameters to include or exclude (comma separated).

queryStringCachingBehavior

afdQueryStringCachingBehavior

Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings.

CompressionSettings

settings for compression.

Name Type Description
contentTypesToCompress

string[]

List of content types on which compression applies. The value should be a valid MIME type.

isCompressionEnabled

boolean

Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB.

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

DeploymentStatus

Value Description
NotStarted
InProgress
Succeeded
Failed

EnabledState

Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'

Value Description
Enabled
Disabled

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

ForwardingProtocol

Protocol this rule will use when forwarding traffic to backends.

Value Description
HttpOnly
HttpsOnly
MatchRequest

httpsRedirect

Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed.

Value Description
Enabled
Disabled

LinkToDefaultDomain

whether this route will be linked to the default endpoint domain.

Value Description
Enabled
Disabled

ResourceReference

Reference to another resource.

Name Type Description
id

string

Resource ID.

Route

Friendly Routes name mapping to the any Routes or secret related information.

Name Type Default value Description
id

string (arm-id)

Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

name

string

The name of the resource

properties.cacheConfiguration

AfdRouteCacheConfiguration

The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object.

properties.customDomains

ActivatedResourceReference[]

Domains referenced by this endpoint.

properties.deploymentStatus

DeploymentStatus

properties.enabledState

EnabledState

Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'

properties.endpointName

string

The name of the endpoint which holds the route.

properties.forwardingProtocol

ForwardingProtocol

MatchRequest

Protocol this rule will use when forwarding traffic to backends.

properties.httpsRedirect

httpsRedirect

Disabled

Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed.

properties.linkToDefaultDomain

LinkToDefaultDomain

Disabled

whether this route will be linked to the default endpoint domain.

properties.originGroup

ResourceReference

A reference to the origin group.

properties.originPath

string

A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.

properties.patternsToMatch

string[]

The route patterns of the rule.

properties.provisioningState

AfdProvisioningState

Provisioning status

properties.ruleSets

ResourceReference[]

rule sets referenced by this endpoint.

properties.supportedProtocols

AFDEndpointProtocols[]

[ "Http", "Https" ]

List of supported protocols for this route.

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.