Copy Environment Async
Changed onCopy environment
This endpoint either duplicates an existing environment to a new environment in the same project, or copies from an existing environment to another existing environment.
The scope object controls which objects will be copied to the target environment.
To clone to a new environment, the user must have write permissions to the containing project. To clone into an existing environment, the user must have write permissions to the target environment, and, with delete_target_only_condition_sets, permission to delete its condition sets. In an environment protected by a policy guard, the copy task fails with 403 when it would change or delete an object the guard protects (the error is in the task's result), and the request itself answers 503, enqueueing nothing, when the guard's decision point cannot be reached.
Poll the task's result through this same environment.
Copying environments across projects or organizations is not allowed.
Request
- Base URLhttps://api.permit.io (the document declares no server; this is the origin it was published from)
- AuthHTTP bearer
Path parameters
Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").
Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").
Query parameters
Time in seconds to wait for the task to complete. Default is 0, means no wait. At most 60: a larger value waits that long.
Request body
Response
Successful Response
Changes
- warning
added the new
CONDITION_SET_OVER_DEPTHenum value to the//response property for the response status
- warning
- info
added the new optional request property
- info
added the new optional request property
////// - info
added the non-success response with the status
- info
added the optional property
////to the response with the status
- info