# Restore Jobs Controller Resource

The API allows you to list and view restore jobs.

### GET /restore-jobs

Returns list of restore jobs filtered by specified query parameters.

Request Parameters
name | type | description | constraints | multivalued
--- | --- | --- | --- | ---
backup-destination | query |  |  | no
cloud-service-provider | query |  |  | no
direction | query |  |  | no
filter | query |  |  | no
from | query |  | long | no
hypervisor | query |  |  | no
hypervisor-manager | query |  |  | no
nameLike | query |  |  | no
orderBy | query |  |  | no
page | query |  |  | no
project-uuid | query |  |  | no
protected-entity | query |  |  | yes
recovery-plan | query |  |  | no
restore-type | query |  | "RESTORE" or "RESTORE_AND_IMPORT" or "RESTORE_AND_MOUNT" | no
size | query |  |  | no
status | query |  | "FAILED" or "INPROGRESS" or "QUEUED" or "SUCCESS" | no
storage-provider | query |  |  | no
to | query |  | long | no

Response Body
media type | data type | description
--- | --- | ---
application/json | array of RestoreJobListRecord (JSON) | list of restore jobs filtered by specified query parameters

#### Example

##### Request

    GET /restore-jobs
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

    [ { } ]

### GET /restore-jobs/aggregated-statistics

Request Parameters
name | type | description | constraints | multivalued
--- | --- | --- | --- | ---
backup-destination | query |  |  | no
cloud-service-provider | query |  |  | no
direction | query |  |  | no
filter | query |  |  | no
from | query |  | long | no
hypervisor | query |  |  | no
hypervisor-manager | query |  |  | no
nameLike | query |  |  | no
orderBy | query |  |  | no
page | query |  |  | no
project-uuid | query |  |  | no
protected-entity | query |  |  | yes
recovery-plan | query |  |  | no
restore-type | query |  | "RESTORE" or "RESTORE_AND_IMPORT" or "RESTORE_AND_MOUNT" | no
size | query |  |  | no
status | query |  | "FAILED" or "INPROGRESS" or "QUEUED" or "SUCCESS" | no
storage-provider | query |  |  | no
to | query |  | long | no

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

#### Example

##### Request

    GET /restore-jobs/aggregated-statistics
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

    ...

### GET /restore-jobs/time-statistics

Request Parameters
name | type | description | constraints | multivalued
--- | --- | --- | --- | ---
backup-destination | query |  |  | no
cloud-service-provider | query |  |  | no
direction | query |  |  | no
filter | query |  |  | no
from | query |  | long | no
hypervisor | query |  |  | no
hypervisor-manager | query |  |  | no
nameLike | query |  |  | no
orderBy | query |  |  | no
page | query |  |  | no
project-uuid | query |  |  | no
protected-entity | query |  |  | yes
recovery-plan | query |  |  | no
restore-type | query |  | "RESTORE" or "RESTORE_AND_IMPORT" or "RESTORE_AND_MOUNT" | no
size | query |  |  | no
status | query |  | "FAILED" or "INPROGRESS" or "QUEUED" or "SUCCESS" | no
storage-provider | query |  |  | no
to | query |  | long | no

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

#### Example

##### Request

    GET /restore-jobs/time-statistics
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

    [ { } ]

### PUT /restore-jobs/warnings-acknowledged

Acknowledge warnings for specified restore jobs

Request Body
media type | data type | description
--- | --- | ---
application/json | WarningAcknowledgementRequest (JSON) | specify local unique identifier batch for restore jobs (use by vProtect)

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

#### Example

##### Request

    PUT /restore-jobs/warnings-acknowledged
    Content-Type: application/json
    Accept: application/json

    { }

##### Response

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

    [ { } ]

### GET /restore-jobs/{guid}

Get a single restore job details.

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

Response Body
media type | data type | description
--- | --- | ---
application/json | RestoreJobListRecord (JSON) | single restore job details

#### Example

##### Request

    GET /restore-jobs/{guid}
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

    { }

### PUT /restore-jobs/{guid}/update-size

Update size for specified restore job.

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

Request Body
media type | data type | description
--- | --- | ---
application/json | LongDTO (JSON) | specify size of the restore job

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

#### Example

##### Request

    PUT /restore-jobs/{guid}/update-size
    Content-Type: application/json
    Accept: application/json

    { }

##### Response

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

    { }

### PUT /restore-jobs/{guid}/warnings

Change warnings for specified restore job.

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

Request Body
media type | data type | description
--- | --- | ---
application/json | array of StringDTO (JSON) | specify warnings for restore job to change

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

#### Example

##### Request

    PUT /restore-jobs/{guid}/warnings
    Content-Type: application/json
    Accept: application/json

    [ { } ]

##### Response

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

    { }

### PUT /restore-jobs/{guid}/warnings-acknowledged

Change acknowledged warnings for specified restore job.

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

Request Body
media type | data type | description
--- | --- | ---
application/json | BooleanDTO (JSON) | specify whether restore job is acknowledged

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

#### Example

##### Request

    PUT /restore-jobs/{guid}/warnings-acknowledged
    Content-Type: application/json
    Accept: application/json

    { }

##### Response

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

    { }

### GET /restore-jobs/timeline/{type}/{guid}

Request Parameters
name | type | description | constraints
--- | --- | --- | ---
guid | path |  |
type | path |  |
from | query |  | long
to | query |  | long

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

#### Example

##### Request

    GET /restore-jobs/timeline/{type}/{guid}
    Content-Type: */*
    Accept: application/json

    ...

##### Response

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

    { }