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

Create a qtree in a FlexVol or FlexGroup volume

Contributors

POST /storage/qtrees

Creates a qtree in a FlexVol or a FlexGroup volume.

After a qtree is created, the new qtree is assigned an identifier. This identifier is obtained using a qtree GET request. This identifier is used in the API path for the qtree PATCH and DELETE operations.

Required properties

  • svm.uuid or svm.name - Existing SVM in which to create the qtree.

  • volume.uuid or volume.name - Existing volume in which to create the qtree.

  • name - Name for the qtree.

If not specified in POST, the values are inherited from the volume.

  • security_style - Security style for the qtree.

  • unix_permissions - UNIX permissions for the qtree.

  • export_policy.name or export_policy.id - Export policy of the SVM for the qtree.

  • qtree create

Learn more

Parameters

Name Type In Required Description

return_timeout

integer

query

False

The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202.

return_records

boolean

query

False

The default is false. If set to true, the records are returned.

Request Body

Name Type Description

_links

_links

export_policy

export_policy

Export Policy

id

integer

The identifier for the qtree, unique within the qtree's volume.

name

string

The name of the qtree. Required in POST; optional in PATCH.

path

string

Client visible path to the qtree. This field is not available if the volume does not have a junction-path configured. Not valid in POST or PATCH.

security_style

string

Security style. Valid in POST or PATCH.

svm

svm

Required in POST

unix_permissions

integer

The UNIX permissions for the qtree. Valid in POST or PATCH.

volume

volume

Required in POST

Example request
{
  "_links": {
    "self": {
      "href": "/api/resourcelink"
    }
  },
  "export_policy": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "id": 100,
    "name": "default"
  },
  "id": 1,
  "path": "/volume3/qtree1",
  "security_style": "unix",
  "svm": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "name": "svm1",
    "uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
  },
  "unix_permissions": 493,
  "volume": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "name": "volume1",
    "uuid": "028baa66-41bd-11e9-81d5-00a0986138f7"
  }
}

Response

Status: 202, Accepted
Name Type Description

job

job_link

Example response
{
  "job": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "uuid": "string"
  }
}

Error

Status: Default

ONTAP Error Response Codes

Error Code Description

917927

The specified volume was not found.

918232

Either volume.name or volume.uuid must be provided.

918236

The specified volume.uuid and volume.name refer to different volumes.

2621462

The specified SVM does not exist.

2621706

The specified svm.uuid and svm.name do not refer to the same SVM.

2621707

No SVM was specified. Either svm.name or svm.uuid must be supplied.

5242886

Failed to create qtree.

5242951

Export Policy supplied does not belong to the specified Export Policy ID.

5242952

Export Policy ID specified is invalid.

5242953

Qtree name must be provided.

Name Type Description

error

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

self

href

export_policy

Export Policy

Name Type Description

_links

_links

id

integer

name

string

svm

Required in POST

Name Type Description

_links

_links

name

string

The name of the SVM.

uuid

string

The unique identifier of the SVM.

volume

Required in POST

Name Type Description

_links

_links

name

string

The name of the volume.

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

qtree

A qtree is a directory at the top level of a volume to which a custom export policy (for fine-grained access control) and a quota rule can be applied, if required.

Name Type Description

_links

_links

export_policy

export_policy

Export Policy

id

integer

The identifier for the qtree, unique within the qtree's volume.

name

string

The name of the qtree. Required in POST; optional in PATCH.

path

string

Client visible path to the qtree. This field is not available if the volume does not have a junction-path configured. Not valid in POST or PATCH.

security_style

string

Security style. Valid in POST or PATCH.

svm

svm

Required in POST

unix_permissions

integer

The UNIX permissions for the qtree. Valid in POST or PATCH.

volume

volume

Required in POST

Name Type Description

_links

_links

uuid

string

The UUID of the asynchronous job that is triggered by a POST, PATCH, or DELETE operation.

error_arguments

Name Type Description

code

string

Argument code

message

string

Message argument

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.