# Hypervisor Clusters Controller Resource

The API allows you to list, view, edit and create hypervisor clusters.

### GET /hypervisor-clusters

Returns list of hypervisor clusters filtered by specified query parameters.

Request Parameters
name | type | description | constraints
--- | --- | --- | ---
compute-zone | query |  | boolean
dataCenter | query |  |
direction | query |  |
filter | query |  |
hypervisor | query |  |
hypervisor-manager | query |  |
nameLike | query |  |
orderBy | query |  |
page | query |  |
project-uuid | query |  |
size | query |  |
storage-provider | query |  |
uuid | query |  |

Response Body
media type | data type | description
--- | --- | ---
application/json | array of HypervisorClusterListRecord (JSON) | list of hypervisor clusters filtered by specified query parameters

#### Example

##### Request

    GET /hypervisor-clusters
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

    [ { } ]

### POST /hypervisor-clusters

Create hypervisor cluster.

Request Body
media type | data type | description
--- | --- | ---
application/json | HypervisorClusterRequest (JSON) | specify details for new hypervisor cluster

Response Body
media type | data type | description
--- | --- | ---
application/json | HypervisorClusterListRecord (JSON) | details of newly created hypervisor cluster

#### Example

##### Request

    POST /hypervisor-clusters
    Content-Type: application/json
    Accept: application/json

    { }

##### Response

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

    { }

### GET /hypervisor-clusters/for-restore

Returns list of clusters filtered by specified query parameters for restore operation

Request Parameters
name | type | description | constraints
--- | --- | --- | ---
compute-zone | query |  | boolean
dataCenter | query |  |
direction | query |  |
filter | query |  |
hypervisor | query |  |
hypervisor-manager | query |  |
nameLike | query |  |
orderBy | query |  |
page | query |  |
project-uuid | query |  |
size | query |  |
storage-provider | query |  |
uuid | query |  |

Response Body
media type | data type | description
--- | --- | ---
application/json | array of HypervisorClusterListRecord (JSON) | list of cluster infos for restore filtered by specified query parameters

#### Example

##### Request

    GET /hypervisor-clusters/for-restore
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

    [ { } ]

### PUT /hypervisor-clusters/node-config

Change node for specified list of hypervisor clusters.

Request Body
media type | data type | description
--- | --- | ---
application/json | HypervisorClusterBatchUpdate (JSON) | specify node and guids of hypervisor clusters

Response Body
media type | data type | description
--- | --- | ---
application/json | BatchResponse (JSON) | list of successful and unsuccessful updates of node

#### Example

##### Request

    PUT /hypervisor-clusters/node-config
    Content-Type: application/json
    Accept: application/json

    { }

##### Response

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

    { }

### GET /hypervisor-clusters/rbac-contexts

Returns list of hypervisor clusters 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 hypervisor clusters filtered by specified query parameters

#### Example

##### Request

    GET /hypervisor-clusters/rbac-contexts
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

    [ { } ]

### DELETE /hypervisor-clusters/{guid}

Remove hypervisor cluster.

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

#### Example

##### Request

    DELETE /hypervisor-clusters/{guid}
    Content-Type: */*

    ...

##### Response

    HTTP/1.1 204 No Content

### GET /hypervisor-clusters/{guid}

Get a single hypervisor cluster.

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

Response Body
media type | data type | description
--- | --- | ---
application/json | HypervisorClusterListRecord (JSON) | hypervisor cluster details

#### Example

##### Request

    GET /hypervisor-clusters/{guid}
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

    { }

### PUT /hypervisor-clusters/{guid}

Change hypervisor cluster details.

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

Request Body
media type | data type | description
--- | --- | ---
application/json | HypervisorClusterUpdate (JSON) | specify hypervisor cluster details to update

Response Body
media type | data type | description
--- | --- | ---
application/json | HypervisorClusterListRecord (JSON) | updated details of hypervisor cluster

#### Example

##### Request

    PUT /hypervisor-clusters/{guid}
    Content-Type: application/json
    Accept: application/json

    { }

##### Response

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

    { }

### PUT /hypervisor-clusters/validation/{guid}

Check if hypervisor cluster update will make some auto-assignment settings invalid

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

Request Body
media type | data type | description
--- | --- | ---
application/json | HypervisorClusterUpdate (JSON) | specify hypervisor cluster details to update

Response Body
media type | data type | description
--- | --- | ---
application/json | array of PolicyProjectAndClusterScopeValidationResultListRecord (JSON) | validation results

#### Example

##### Request

    PUT /hypervisor-clusters/validation/{guid}
    Content-Type: application/json
    Accept: application/json

    { }

##### Response

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

    [ { } ]