# Openstack Controller Resource

The API allows you to get, update openstack export and import settings.

### GET /openstack/export-settings

Request Parameters
name | type | description
--- | --- | ---
security-group-guid | query |

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

#### Example

##### Request

    GET /openstack/export-settings
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

    [ { } ]

### GET /openstack/restore-settings

Get settings for the specified policy using its GUID.

Request Parameters
name | type | description
--- | --- | ---
backup-guid | query | The unique identifier of the policy for which settings are being requested.
cluster-guid | query |
hvm-guid | query |
project-guid | query |

Response Body
media type | data type | description
--- | --- | ---
application/json | RestoreSettingsResponse (JSON) | Returns an ExportSettingsResponse object containing the settings for the specified policy.

#### Example

##### Request

    GET /openstack/restore-settings
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

    { }

### GET /openstack/export-settings/default

Retrieve the default export settings.

Response Body
media type | data type | description
--- | --- | ---
application/json | ExportSettingsResponse (JSON) | Returns an ExportSettingsResponse object containing the default export settings.

#### Example

##### Request

    GET /openstack/export-settings/default
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

    { }

### GET /openstack/export-settings/snapshot-types

Fetches a list of available snapshot types.

Response Body
media type | data type | description
--- | --- | ---
application/json | array of SnapshotType (JSON) | Returns a list of SnapshotType objects representing the available types of snapshots.

#### Example

##### Request

    GET /openstack/export-settings/snapshot-types
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

    "GENERIC_SNAPSHOT"

### GET /openstack/export-settings/{guid}

Get settings for the specified policy using its GUID.

Request Parameters
name | type | description
--- | --- | ---
guid | path | The unique identifier of the policy for which settings are being requested.

Response Body
media type | data type | description
--- | --- | ---
application/json | ExportSettingsResponse (JSON) | Returns an ExportSettingsResponse object containing the settings for the specified policy.

#### Example

##### Request

    GET /openstack/export-settings/{guid}
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

    { }

### POST /openstack/export-settings/{guid}

Creates new export settings for a specific virtual machine policy identified by the GUID. This endpoint allows clients to define custom settings for backups related to a particular policy.

Request Parameters
name | type | description
--- | --- | ---
guid | path | The unique identifier of the virtual machine policy for which to create the export settings.

Request Body
media type | data type | description
--- | --- | ---
application/json | ExportSettingsRequest (JSON) | The export settings details to be created, encapsulated within an ExportSettingsRequest object.

Response Body
media type | data type | description
--- | --- | ---
application/json | ExportSettingsResponse (JSON) | ExportSettingsResponse object containing the newly created export settings details.

#### Example

##### Request

    POST /openstack/export-settings/{guid}
    Content-Type: application/json
    Accept: application/json

    {
      "snapshotType" : {
        "name" : "...",
        "description" : "..."
      },
      "sourceSettingType" : "..."
    }

##### Response

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

    { }

### PUT /openstack/export-settings/{guid}

Updates the existing export settings for a specific virtual machine policy identified by the GUID. This endpoint allows clients to modify existing settings to adjust to new requirements or correct previous configurations.

Request Parameters
name | type | description
--- | --- | ---
guid | path | The unique identifier of the virtual machine policy for which the export settings are to be updated.

Request Body
media type | data type | description
--- | --- | ---
application/json | ExportSettingsRequest (JSON) | The new export settings details, provided as an ExportSettingsRequest object, which will replace the existing settings.

Response Body
media type | data type | description
--- | --- | ---
application/json | ExportSettingsResponse (JSON) | ExportSettingsResponse object containing the updated export settings details.

#### Example

##### Request

    PUT /openstack/export-settings/{guid}
    Content-Type: application/json
    Accept: application/json

    {
      "snapshotType" : {
        "name" : "...",
        "description" : "..."
      },
      "sourceSettingType" : "..."
    }

##### Response

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

    { }

### POST /openstack/security-groups/delete

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

#### Example

##### Request

    POST /openstack/security-groups/delete
    Content-Type: application/json

    { }

##### Response

    HTTP/1.1 201 Created

### GET /openstack/{guid}/security-groups

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

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

#### Example

##### Request

    GET /openstack/{guid}/security-groups
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

    ...

### GET /openstack/instant-restore-settings/{virtual-machine-guid}/targets

Get instant restore settings for the specified virtual instance using its GUID

Request Parameters
name | type | description
--- | --- | ---
virtual-machine-guid | path | to specify the virtual instance guid to fetch instant restore settings for

Response Body
media type | data type | description
--- | --- | ---
application/json | OpenstackInstantRestoreTargetSettingsDto (JSON) | Returns an ExportSettingsResponse object containing the settings for the specified policy

#### Example

##### Request

    GET /openstack/instant-restore-settings/{virtual-machine-guid}/targets
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

    { }

### GET /openstack/inventory-sync/{guid}/vms-for-disks

Request Parameters
name | type | description
--- | --- | ---
guid | path |
authentication-domain-guid | query |

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

#### Example

##### Request

    GET /openstack/inventory-sync/{guid}/vms-for-disks
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

    { }

### GET /openstack/restore-settings/{virtual-machine-guid}/targets

Get settings for the specified policy using its GUID.

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

Response Body
media type | data type | description
--- | --- | ---
application/json | OpenstackRestoreTargetSettingsDto (JSON) | Returns an ExportSettingsResponse object containing the settings for the specified policy.

#### Example

##### Request

    GET /openstack/restore-settings/{virtual-machine-guid}/targets
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

    { }