Websites - Toggle AFD Traffic Routing

Toggle AFD traffic routing for a Power Pages website.
Toggles traffic routing between Azure Front Door and web apps for a portal. When enableAFD is true, enables the AFD endpoint and adds service tag restrictions to web apps. When false, removes service tags and disables the AFD endpoint.

POST https://api.powerplatform.com/powerpages/environments/{environmentId}/websites/{id}/toggleAFDTrafficRouting?enableAFD={enableAFD}&api-version=2024-10-01

URI Parameters

Name In Required Type Description
environmentId
path True

string

The environment ID.

id
path True

string

Website unique identifier (ID).

api-version
query True

string

The API version.

enableAFD
query True

boolean

True to enable AFD routing, false to disable.

Responses

Name Type Description
200 OK

ToggleAFDTrafficRoutingResponse

Success

400 Bad Request

ErrorMessage

Bad Request

401 Unauthorized

ErrorMessage

Unauthorized

404 Not Found

ErrorMessage

Not Found

Security

oauth2

Microsoft Entra ID OAuth2

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize?resource=https://api.powerplatform.com

Scopes

Name Description
.default .default

Definitions

Name Description
Details
Error
ErrorMessage
ToggleAFDTrafficRoutingResponse

Details

Name Type Description
code

string

Error code

message

string

Error message

target

string

Target parameter

Error

Name Type Description
code

string

Error code

details

Details[]

message

string

Error message

target

string

Target parameter

ErrorMessage

Name Type Description
error

Error

ToggleAFDTrafficRoutingResponse

Name Type Description
message

string

Result message describing the outcome of the toggle operation.