Start a legal-hold operation
POST /storage/snaplock/litigations
Introduced In: 9.7
Starts a Legal-Hold.
Required properties
- 
path- Path of the file. - 
name- Litigation name. - 
volume.nameorvolume.uuid- Name or UUID of the volume. 
Related ONTAP commands
- 
snaplock legal-hold begin 
Example
POST "/api/storage/snaplock/litigations" '{"volume.name":"SLC1","name":"l3","path":"/b.txt"}'
Learn more
Parameters
| Name | Type | In | Required | Description | 
|---|---|---|---|---|
return_records  | 
boolean  | 
query  | 
False  | 
The default is false. If set to true, the records are returned. 
  | 
Request Body
| Name | Type | Description | 
|---|---|---|
id  | 
string  | 
Specifies the litigation ID.  | 
name  | 
string  | 
Specifies the legal-hold litigation name.  | 
operations  | 
||
path  | 
string  | 
Specifies the path on which legal-hold operation has to be applied.  | 
svm  | 
SVM, applies only to SVM-scoped objects.  | 
|
volume  | 
Example request
{
  "id": "string",
  "name": "lit1",
  "operations": [
    {
      "id": 16842759,
      "num_files_failed": 0,
      "num_files_processed": 30,
      "num_files_skipped": 10,
      "num_inodes_ignored": 10,
      "path": "/dir1",
      "state": "completed",
      "type": "begin"
    }
  ],
  "path": "/dir1",
  "svm": {
    "name": "svm1",
    "uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
  },
  "volume": {
    "name": "volume1",
    "uuid": "028baa66-41bd-11e9-81d5-00a0986138f7"
  }
}
Response
Status: 201, Created
Headers
| Name | Description | Type | 
|---|---|---|
Location  | 
Useful for tracking the resource location  | 
string  | 
Error
Status: Default
ONTAP Error Response codes
| Error code | Description | 
|---|---|
13762586  | 
Volume is not a SnapLock Compliance volume  | 
13763162  | 
Audit logging is not configured for the SVM  | 
13763280  | 
Only a user with security login role "vsadmin-snaplock" is allowed to perform this operation.  | 
14090346  | 
Internal Error. Wait a few minutes, then try the command again  | 
14090340  | 
{field} is a required field  | 
14090343  | 
Invalid Field  | 
14090641  | 
The specified volume.name and volume.uuid refer to different volumes  | 
Definitions
See Definitions
href
| Name | Type | Description | 
|---|---|---|
href  | 
string  | 
_links
snaplock_legal_hold_operation
| Name | Type | Description | 
|---|---|---|
id  | 
integer  | 
Operation ID.  | 
num_files_failed  | 
string  | 
Specifies the number of files on which legal-hold operation failed.  | 
num_files_processed  | 
string  | 
Specifies the number of files on which legal-hold operation was successful.  | 
num_files_skipped  | 
string  | 
Specifies the number of files on which legal-hold begin operation was skipped. The legal-hold begin operation is skipped on a file if it is already under hold for a given litigation.  | 
num_inodes_ignored  | 
string  | 
Specifies the number of inodes on which the legal-hold operation was not attempted because they were not regular files.  | 
path  | 
string  | 
Specifies the path on which legal-hold operation is applied.  | 
state  | 
string  | 
Specifies the status of legal-hold operation.  | 
type  | 
string  | 
Specifies the type of legal-hold operation.  | 
svm
SVM, applies only to SVM-scoped objects.
| Name | Type | Description | 
|---|---|---|
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
| Name | Type | Description | 
|---|---|---|
name  | 
string  | 
The name of the volume. This field cannot be specified in a 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. 
  | 
snaplock_litigation
| Name | Type | Description | 
|---|---|---|
id  | 
string  | 
Specifies the litigation ID.  | 
name  | 
string  | 
Specifies the legal-hold litigation name.  | 
operations  | 
||
path  | 
string  | 
Specifies the path on which legal-hold operation has to be applied.  | 
svm  | 
SVM, applies only to SVM-scoped objects.  | 
|
volume  | 
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.  |