Skip to main content
REST API reference
A newer release of this product is available.

Retrieve shadow copies

Retrieves shadow copies to view available versions of files or directories for recovery or review purposes.

HTTP method and endpoint

GET /protocols/cifs/shadow-copies

Introduced in

ONTAP 9.11

Usage notes

Retrieves Shadowcopies

  • vserver cifs shadowcopy show-shares

Parameters

Name Type In Required Description

files

string

query

False

Filter by files

client_uuid

string

query

False

Filter by client_uuid

svm.uuid

string

query

False

Filter by svm.uuid

svm.name

string

query

False

Filter by svm.name

share.name

string

query

False

Filter by share.name

uuid

string

query

False

Filter by uuid

shadowcopy_set.uuid

string

query

False

Filter by shadowcopy_set.uuid

order_by

array[string]

query

False

Order results by specified fields and optional [asc

desc] direction. Default direction is 'asc' for ascending.

fields

array[string]

query

False

Specify the fields to return.

max_records

integer

query

False

Limit the number of records returned.

return_records

boolean

query

False

The default is true for GET calls. When set to false, only the number of records is returned.

  • Default value: 1

return_timeout

integer

query

False

Response

Status: 200, Ok
Name Type Description

_links

_links

num_records

integer

Number of records

records

array[shadowcopy]

Example response
{
  "_links": {
    "next": {
      "href": "/api/resourcelink"
    },
    "self": {
      "href": "/api/resourcelink"
    }
  },
  "num_records": 1,
  "records": [
    {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "client_uuid": "abc13450-1f19-40ba-9b82-ebf277517e7e",
      "destination_dir": "/dir2",
      "files": [
        "/vhd1",
        "/vhd2"
      ],
      "shadowcopy_set": {
        "_links": {
          "self": {
            "href": "/api/resourcelink"
          }
        },
        "uuid": "5f4e19f3-5e2d-11ec-8766-005056a7c134"
      },
      "share": {
        "_links": {
          "self": {
            "href": "/api/resourcelink"
          }
        },
        "name": "sh1"
      },
      "source_dir": "/dir1",
      "svm": {
        "_links": {
          "self": {
            "href": "/api/resourcelink"
          }
        },
        "name": "svm1",
        "uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
      },
      "uuid": "fef32805-1f19-40ba-9b82-ebf277517e7e",
      "volume": {
        "_links": {
          "self": {
            "href": "/api/resourcelink"
          }
        },
        "name": "volume1",
        "uuid": "028baa66-41bd-11e9-81d5-00a0986138f7"
      }
    }
  ]
}

Error

Status: Default, Error
Name Type Description

error

returned_error

Example error
{
  "error": {
    "arguments": [
      {
        "code": "string",
        "message": "string"
      }
    ],
    "code": "4",
    "message": "entry doesn't exist",
    "target": "uuid"
  }
}

Definitions

See Definitions

href

Name Type Description

href

string

Name Type Description

next

href

self

href

Name Type Description

self

href

Name Type Description

self

href

shadowcopy_set

Name Type Description

_links

self_link

uuid

string

share

Name Type Description

_links

_links

name

string

Share name

svm

SVM, applies only to SVM-scoped objects.

Name Type Description

_links

_links

name

string

The name of the SVM. This field cannot be specified in a PATCH method.

uuid

string

The unique identifier of the SVM. This field cannot be specified in a PATCH method.

volume

The name of the volume where the source and destination directories reside.

Name Type Description

_links

_links

name

string

The name of the volume. This field cannot be specified in a POST or PATCH method.

uuid

string

Unique identifier for the volume. This corresponds to the instance-uuid that is exposed in the CLI and ONTAPI. It does not change due to a volume move.

  • example: 028baa66-41bd-11e9-81d5-00a0986138f7

  • Introduced in: 9.6

  • x-nullable: true

shadowcopy

Name Type Description

_links

_links

client_uuid

string

The universally-unique identifier of the client's shadow copy.

destination_dir

string

The path of the destination directory. The path is in UTF8 and uses forward slash as a directory separator. The path is relative to the root of the volume.

files

array[string]

The list of files to shadow copy in the share. The path is in UTF8 and uses forward slash as a directory separator. The path is relative to the root of the share.

shadowcopy_set

shadowcopy_set

share

share

source_dir

string

The path of the source directory. The path is in UTF8 and uses forward slash as a directory separator. The path is relative to the root of the volume.

svm

svm

SVM, applies only to SVM-scoped objects.

uuid

string

The universally-unique identifier of the storage's shadow copy.

volume

volume

The name of the volume where the source and destination directories reside.

with_content

boolean

Specifies what needs to be restored. False specifies the directory only. True indicates the directory and its content.

error_arguments

Name Type Description

code

string

Argument code

message

string

Message argument

returned_error

Name Type Description

arguments

array[error_arguments]

Message arguments

code

string

Error code

message

string

Error message

target

string

The target parameter that caused the error.