# Node Config Controller Resource

The API allows you to list, view, edit and create node configurations.

### GET /node-configs

Returns list of node configurations.

Request Parameters
name | type | description
--- | --- | ---
backup-to-be-restored | query |
direction | query |
filter | query |
nameLike | query |
orderBy | query |
page | query |
size | query |

Response Body
media type | data type | description
--- | --- | ---
application/json | array of NodeConfigListRecord (JSON) | list of node configurations

#### Example

##### Request

    GET /node-configs
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

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

### POST /node-configs

Create a node configuration.

Request Body
media type | data type | description
--- | --- | ---
application/json | NodeConfigRequest (JSON) | specify data for new node configuration

Response Body
media type | data type | description
--- | --- | ---
application/json | NodeConfigDetails (JSON) | details of newly created node configuration

#### Example

##### Request

    POST /node-configs
    Content-Type: application/json
    Accept: application/json

    { }

##### Response

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

    { }

### GET /node-configs/default-settings

Returns default node configuration.

Response Body
media type | data type | description
--- | --- | ---
application/json | NodeConfigDetails (JSON) | default node configuration

#### Example

##### Request

    GET /node-configs/default-settings
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

    { }

### GET /node-configs/reduced

Returns list of the reduced node configurations.

Request Parameters
name | type | description
--- | --- | ---
backup-to-be-restored | query |
direction | query |
filter | query |
nameLike | query |
orderBy | query |
page | query |
size | query |

Response Body
media type | data type | description
--- | --- | ---
application/json | array of NodeConfigReducedListRecord (JSON) | list of the reduced node configurations

#### Example

##### Request

    GET /node-configs/reduced
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

    [ { } ]

### DELETE /node-configs/{guid}

Remove node configuration.

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

#### Example

##### Request

    DELETE /node-configs/{guid}
    Content-Type: */*

    ...

##### Response

    HTTP/1.1 204 No Content

### GET /node-configs/{guid}

Get a single node configuration.

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

Response Body
media type | data type | description
--- | --- | ---
application/json | NodeConfigDetails (JSON) | node configuration details

#### Example

##### Request

    GET /node-configs/{guid}
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

    { }

### PUT /node-configs/{guid}

Change node configuration details.

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

Request Body
media type | data type | description
--- | --- | ---
application/json | NodeConfigRequest (JSON) | specify node configuration details to update

Response Body
media type | data type | description
--- | --- | ---
application/json | NodeConfigDetails (JSON) | updated details of node configuration

#### Example

##### Request

    PUT /node-configs/{guid}
    Content-Type: application/json
    Accept: application/json

    { }

##### Response

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

    { }

### GET /node-configs/for-restore/{guid}

Get a single node configuration.

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

Response Body
media type | data type | description
--- | --- | ---
application/json | NodeConfigReducedListRecord (JSON) | node configuration details

#### Example

##### Request

    GET /node-configs/for-restore/{guid}
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

    { }

### GET /node-configs/reduced/{guid}

Returns list of node configurations for restore.

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

Response Body
media type | data type | description
--- | --- | ---
application/json | NodeConfigReducedListRecord (JSON) | list of node configurations for restore

#### Example

##### Request

    GET /node-configs/reduced/{guid}
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

    { }

### PUT /node-configs/{guid}/assign-nodes

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

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

#### Example

##### Request

    PUT /node-configs/{guid}/assign-nodes
    Content-Type: application/json

    { }

##### Response

    HTTP/1.1 204 No Content

### PUT /node-configs/{guid}/assign-os-agents

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

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

#### Example

##### Request

    PUT /node-configs/{guid}/assign-os-agents
    Content-Type: application/json

    { }

##### Response

    HTTP/1.1 204 No Content

### POST /node-configs/{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 | NodeConfigDetails (JSON) |

#### Example

##### Request

    POST /node-configs/{guid}/clone
    Content-Type: application/json
    Accept: application/json

    { }

##### Response

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

    { }

### GET /node-configs/{guid}/windows-password

Returns windows password for M365 settings.

Request Parameters
name | type | description
--- | --- | ---
guid | path | specify local unique identifier for node config

Response Body
media type | data type | description
--- | --- | ---
application/json | string (JSON) | windows password

#### Example

##### Request

    GET /node-configs/{guid}/windows-password
    Content-Type: application/json
    Accept: application/json

    ...

##### Response

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

    ...

### PUT /node-configs/{guid}/windows-password

Change windows password for M365 settings.

Request Parameters
name | type | description
--- | --- | ---
guid | path | specify local unique identifier for node config

Request Body
media type | data type | description
--- | --- | ---
application/json | StringDTO (JSON) | specify new windows password

#### Example

##### Request

    PUT /node-configs/{guid}/windows-password
    Content-Type: application/json

    { }

##### Response

    HTTP/1.1 204 No Content