Environment Copy - Copy Environment

Copy the environment from the specified source to the target (Preview).

POST https://api.powerplatform.com/environmentmanagement/environments/{targetEnvironmentId}/copy?api-version=2022-03-01-preview
POST https://api.powerplatform.com/environmentmanagement/environments/{targetEnvironmentId}/copy?ValidateOnly={ValidateOnly}&ValidateProperties={ValidateProperties}&api-version=2022-03-01-preview

URI Parameters

Name In Required Type Description
targetEnvironmentId
path True

string

The target environment will be overwritten.

api-version
query True

string

The API version.

ValidateOnly
query

boolean

The value which indicates whether the operation is a validated only request. Examples:

validateOnly=true with validateProperties non-empty: Validate only the listed properties, ignoring others even if present in the body.

validateOnly=true with empty/absent validateProperties: Validate the entire body (equivalent to full validation).

validateOnly=false or omitted: Process the full request(validate and execute).
ValidateProperties
query

string

The value which indicates what properties should be validated. Need to work together with ValidateOnly. Properties should be separated by ','. Example: "property1,property2,property3".

Request Body

Media Types: "application/json", "text/json", "application/*+json"

Name Required Type Description
copyType True

CopyType

Represents the type of copy operation.

sourceEnvironmentId True

string

Source environment ID to copy from.

copyOptions

CopyRequestOptions

Optional inputs for copy request.

Responses

Name Type Description
202 Accepted

Accepted

Media Types: "text/plain", "application/json", "text/json"

400 Bad Request

ValidationResponse

Bad Request

Media Types: "text/plain", "application/json", "text/json"

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
CopyRequest

Represents request to copy to a target environment from source environment.

CopyRequestOptions

Optional inputs for copy request.

CopyType

Represents the type of copy operation.

ErrorInfo

Represents error information for an operation.

ValidationResponse

Represents the response for validation of an operation.

CopyRequest

Represents request to copy to a target environment from source environment.

Name Type Description
copyOptions

CopyRequestOptions

Optional inputs for copy request.

copyType

CopyType

Represents the type of copy operation.

sourceEnvironmentId

string

Source environment ID to copy from.

CopyRequestOptions

Optional inputs for copy request.

Name Type Description
environmentNameToOverride

string

Environment name to override on target environment.

executeAdvancedCopyForFinanceAndOperations

boolean

Boolean flag to execute advanced copy for Finance and Operation data.

securityGroupIdToOverride

string

Security group ID to override on target environment.

skipAuditData

boolean

Boolean flag to skip audit data for copy.

CopyType

Represents the type of copy operation.

Value Description
Minimal
Full

ErrorInfo

Represents error information for an operation.

Name Type Description
code

string

The error Code.

fieldErrors

object

The detailed error.

ValidationResponse

Represents the response for validation of an operation.

Name Type Description
errorDetail

ErrorInfo

Represents error information for an operation.