# Recovery Plan Policy Controller Resource

The API allows you to list, view, create and edit recovery plan policies.

### GET /policies/recovery-plan

Returns list of recovery plan policies.

Request Parameters
name | type | description
--- | --- | ---
direction | query |
filter | query |
nameLike | query |
orderBy | query |
page | query |
size | query |

Response Body
media type | data type | description
--- | --- | ---
application/json | array of RecoveryPlanPolicyListRecord (JSON) | list of recovery plan policies

#### Example

##### Request

    GET /policies/recovery-plan
    Content-Type: */*
    Accept: application/json

    ...

##### Response

    HTTP/1.1 200 OK
    Content-Type: application/json

    [ {
      "guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
      "priority" : 50
    } ]

### POST /policies/recovery-plan

Create recovery plan policy.

Request Body
media type | data type | description
--- | --- | ---
application/json | RecoveryPlanPolicyRequest (JSON) | specify details for new recovery plan policy

Response Body
media type | data type | description
--- | --- | ---
application/json | RecoveryPlanPolicyDetails (JSON) | details of newly created recovery plan policy

#### Example

##### Request

    POST /policies/recovery-plan
    Content-Type: application/json
    Accept: application/json

    {
      "priority" : 50
    }

##### Response

    HTTP/1.1 201 Created
    Content-Type: application/json

    {
      "guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
      "priority" : 50
    }

### GET /policies/recovery-plan/detailed

Returns detailed list of recovery plan policies.

Response Body
media type | data type | description
--- | --- | ---
application/json | array of RecoveryPlanPolicyDetails (JSON) | detailed list of recovery plan policies

#### Example

##### Request

    GET /policies/recovery-plan/detailed
    Content-Type: */*
    Accept: application/json

    ...

##### Response

    HTTP/1.1 200 OK
    Content-Type: application/json

    [ {
      "guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
      "priority" : 50
    } ]

### DELETE /policies/recovery-plan/{guid}

Remove recovery plan policy.

Request Parameters
name | type | description
--- | --- | ---
guid | path | specify local unique identifier for recovery plan policy (use by vProtect)

#### Example

##### Request

    DELETE /policies/recovery-plan/{guid}
    Content-Type: */*

    ...

##### Response

    HTTP/1.1 204 No Content

### GET /policies/recovery-plan/{guid}

Get a single recovery plan policy.

Request Parameters
name | type | description
--- | --- | ---
guid | path | specify local unique identifier for recovery plan policy (use by vProtect)

Response Body
media type | data type | description
--- | --- | ---
application/json | RecoveryPlanPolicyDetails (JSON) | a single recovery plan policy details

#### Example

##### Request

    GET /policies/recovery-plan/{guid}
    Content-Type: */*
    Accept: application/json

    ...

##### Response

    HTTP/1.1 200 OK
    Content-Type: application/json

    {
      "guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
      "priority" : 50
    }

### PUT /policies/recovery-plan/{guid}

Change recovery plan policy details.

Request Parameters
name | type | description
--- | --- | ---
guid | path | specify local unique identifier for recovery plan policy (use by vProtect)

Request Body
media type | data type | description
--- | --- | ---
application/json | RecoveryPlanPolicyRequest (JSON) | specify recovery plan policy details to update

Response Body
media type | data type | description
--- | --- | ---
application/json | RecoveryPlanPolicyDetails (JSON) | updated details of recovery plan policy

#### Example

##### Request

    PUT /policies/recovery-plan/{guid}
    Content-Type: application/json
    Accept: application/json

    {
      "priority" : 50
    }

##### Response

    HTTP/1.1 204 No Content
    Content-Type: application/json

    {
      "guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
      "priority" : 50
    }

### POST /policies/recovery-plan/{guid}/clone

Request Parameters
name | type | description
--- | --- | ---
guid | path |

Request Body
media type | data type
--- | ---
application/json | CloneDTO (JSON)

Response Body
media type | data type | description
--- | --- | ---
application/json | RecoveryPlanPolicyDetails (JSON) |

#### Example

##### Request

    POST /policies/recovery-plan/{guid}/clone
    Content-Type: application/json
    Accept: application/json

    { }

##### Response

    HTTP/1.1 201 Created
    Content-Type: application/json

    {
      "guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
      "priority" : 50
    }

### GET /policies/recovery-plan/{guid}/statistics

Returns architecture statistics for Recovery plan policy

Request Parameters
name | type | description | constraints
--- | --- | --- | ---
guid | path | unique identification series of selected Recovery plan policy |
compute-zone | query |  |
from | query |  | long
to | query |  | long

Response Body
media type | data type | description
--- | --- | ---
application/json | RecoveryPlanPolicyStatisticsDetails (JSON) | architecture statistics for Recovery plan policy

#### Example

##### Request

    GET /policies/recovery-plan/{guid}/statistics
    Content-Type: */*
    Accept: application/json

    ...

##### Response

    HTTP/1.1 200 OK
    Content-Type: application/json

    { }