# Cloud Teams Controller Resource

The API allows you to list and view cloud teams.

### GET /cloud-teams

Returns list of cloud teams filtered by specified query parameters.

Request Parameters
name | type | description | constraints | multivalued
--- | --- | --- | --- | ---
backupStatus | query |  | "IS_PROTECTED" or "NOT_PROTECTED" or "NO_SCHEDULE" | yes
cloud-service-provider | query |  |  | no
direction | query |  |  | no
filter | query |  |  | no
nameLike | query |  |  | no
orderBy | query |  |  | no
page | query |  |  | no
policy | query |  |  | yes
size | query |  |  | no
teams-group | query |  | boolean | no

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

#### Example

##### Request

    GET /cloud-teams
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

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

### POST /cloud-teams/assign-backup-policy

Assign groups to specified policy (or unassign if policy is null)

Request Body
media type | data type | description
--- | --- | ---
application/json | ProtectedEntityBackupPolicyAssignmentRequest (JSON) | containing policy and groups info

#### Example

##### Request

    POST /cloud-teams/assign-backup-policy
    Content-Type: application/json

    { }

##### Response

    HTTP/1.1 201 Created

### GET /cloud-teams/backup-cleanup

Returns list of protected entities for backup cleanup.

Request Parameters
name | type | description | constraints
--- | --- | --- | ---
backup-destination | query |  |
page | query |  | int
size | query |  | int

Response Body
media type | data type | description
--- | --- | ---
application/json | array of CloudGroupListRecord (JSON) | list of protected entities for backup cleanup

#### Example

##### Request

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

    ...

##### Response

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

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

### GET /cloud-teams/rbac-contexts

Returns list of cloud groups filtered by specified query parameters.

Request Parameters
name | type | description | constraints
--- | --- | --- | ---
app-cmd-exec-config | query |  |
cloud-service-provider | query |  |
cluster | query |  |
data-center | query |  |
direction | query |  |
filter | query |  |
hypervisor | query |  |
hypervisor-manager | query |  |
nameLike | query |  |
orderBy | query |  |
page | query |  |
project | query |  |
size | query |  |
storage-pool | query |  |
storage-provider | query |  |
teams-group | query |  | boolean

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

#### Example

##### Request

    GET /cloud-teams/rbac-contexts
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

    [ { } ]

### GET /cloud-teams/{guid}

Get a single cloud teams.

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

Response Body
media type | data type | description
--- | --- | ---
application/json | CloudGroupDetails (JSON) | cloud teams details

#### Example

##### Request

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

    ...

##### Response

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

    {
      "guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
      "lastBackup" : 1451649601000
    }