# Cloud Backup Rule Controller Resource

The API allows you to list, view, create and edit cloud backup rule.

### GET /rules/cloud-backup

Returns list of cloud backup rules filtered by specified query parameters.

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

Response Body
media type | data type | description
--- | --- | ---
application/json | array of CloudBackupRuleDetails (JSON) | list of cloud backup rules filtered by specified query parameters

#### Example

##### Request

    GET /rules/cloud-backup
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

    [ { } ]

### POST /rules/cloud-backup

Cloud machine backup rule.

Request Body
media type | data type | description
--- | --- | ---
application/json | CloudBackupRuleRequest (JSON) | specify details for new cloud backup rule

Response Body
media type | data type | description
--- | --- | ---
application/json | CloudBackupRuleDetails (JSON) | details of newly created cloud backup rule

#### Example

##### Request

    POST /rules/cloud-backup
    Content-Type: application/json
    Accept: application/json

    { }

##### Response

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

    { }

### DELETE /rules/cloud-backup/{guid}

Remove cloud backup rule.

Request Parameters
name | type | description
--- | --- | ---
guid | path | specify local unique identifier for cloud backup rule (use by vProtect)

#### Example

##### Request

    DELETE /rules/cloud-backup/{guid}
    Content-Type: */*

    ...

##### Response

    HTTP/1.1 204 No Content

### GET /rules/cloud-backup/{guid}

Get a single cloud backup rule.

Request Parameters
name | type | description
--- | --- | ---
guid | path | specify local unique identifier for cloud backup rule (use by vProtect)

Response Body
media type | data type | description
--- | --- | ---
application/json | CloudBackupRuleDetails (JSON) | a single cloud backup rule details

#### Example

##### Request

    GET /rules/cloud-backup/{guid}
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

    { }

### PUT /rules/cloud-backup/{guid}

Change cloud backup rule details.

Request Parameters
name | type | description
--- | --- | ---
guid | path | specify local unique identifier for cloud backup rule (use by vProtect)

Request Body
media type | data type | description
--- | --- | ---
application/json | CloudBackupRuleRequest (JSON) | specify cloud backup rule details to update

Response Body
media type | data type | description
--- | --- | ---
application/json | CloudBackupRuleDetails (JSON) | updated details of cloud backup rule

#### Example

##### Request

    PUT /rules/cloud-backup/{guid}
    Content-Type: application/json
    Accept: application/json

    { }

##### Response

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

    { }