# Method: organizations.locations.postures.extract

- [HTTP request](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.postures/extract#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.postures/extract#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.postures/extract#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.postures/extract#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.postures/extract#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.postures/extract#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.postures/extract#body.aspect_1)

Extracts existing policies from an organization, folder, or project, and applies them to another organization, folder, or project as a `https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.postures#Posture`.

If the other organization, folder, or project already has a posture, then the result of the long-running operation is an `https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/Code#ENUM_VALUES.ALREADY_EXISTS` error.

### HTTP request

`POST https://securityposture.googleapis.com/v1/{parent=organizations/*/locations/*}/postures:extract`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The parent resource name, in the format `organizations/{organization}/locations/global`. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "postureId": string, "workload": string } ``` |

| Fields ||
|---|---|
| `postureId` | `string` Required. An identifier for the posture. |
| `workload` | `string` Required. The organization, folder, or project from which policies are extracted. Must be within the organization defined in `https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.postures/extract#body.PATH_PARAMETERS.parent`. Use one of the following formats: - `organization/{organization_number}` - `folder/{folder_number}` - `project/{project_number}` |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/security-command-center/docs/reference/securityposture/rest/v1/organizations.locations.operations#Operation`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:

- `securityposture.postures.extract`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).