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

Retrieve CIFS shares

Contributors

GET /protocols/cifs/shares

Introduced In: 9.6

Retrieves CIFS shares.

  • vserver cifs share show

  • vserver cifs share properties show

Parameters

Name Type In Required Description

browsable

boolean

query

False

Filter by browsable

  • Introduced in: 9.13

continuously_available

boolean

query

False

Filter by continuously_available

  • Introduced in: 9.10

path

string

query

False

Filter by path

  • maxLength: 256

  • minLength: 1

access_based_enumeration

boolean

query

False

Filter by access_based_enumeration

name

string

query

False

Filter by name

  • maxLength: 80

  • minLength: 1

show_snapshot

boolean

query

False

Filter by show_snapshot

  • Introduced in: 9.10

force_group_for_create

string

query

False

Filter by force_group_for_create

  • Introduced in: 9.10

acls.permission

string

query

False

Filter by acls.permission

acls.user_or_group

string

query

False

Filter by acls.user_or_group

acls.type

string

query

False

Filter by acls.type

oplocks

boolean

query

False

Filter by oplocks

unix_symlink

string

query

False

Filter by unix_symlink

dir_umask

integer

query

False

Filter by dir_umask

  • Introduced in: 9.10

volume.uuid

string

query

False

Filter by volume.uuid

volume.name

string

query

False

Filter by volume.name

home_directory

boolean

query

False

Filter by home_directory

change_notify

boolean

query

False

Filter by change_notify

comment

string

query

False

Filter by comment

  • maxLength: 256

  • minLength: 1

svm.uuid

string

query

False

Filter by svm.uuid

svm.name

string

query

False

Filter by svm.name

show_previous_versions

boolean

query

False

Filter by show_previous_versions

  • Introduced in: 9.13

encryption

boolean

query

False

Filter by encryption

namespace_caching

boolean

query

False

Filter by namespace_caching

  • Introduced in: 9.10

offline_files

string

query

False

Filter by offline_files

  • Introduced in: 9.10

file_umask

integer

query

False

Filter by file_umask

  • Introduced in: 9.10

vscan_profile

string

query

False

Filter by vscan_profile

  • Introduced in: 9.10

no_strict_security

boolean

query

False

Filter by no_strict_security

  • Introduced in: 9.9

allow_unencrypted_access

boolean

query

False

Filter by allow_unencrypted_access

  • Introduced in: 9.11

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

The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached.

  • Default value: 1

  • Max value: 120

  • Min value: 0

order_by

array[string]

query

False

Order results by specified fields and optional [asc

Response

Status: 200, Ok
Name Type Description

_links

_links

num_records

integer

Number of records

records

array[cifs_share]

Example response
{
  "_links": {
    "next": {
      "href": "/api/resourcelink"
    },
    "self": {
      "href": "/api/resourcelink"
    }
  },
  "num_records": 1,
  "records": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "acls": {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "permission": "no_access",
      "type": "windows",
      "user_or_group": "ENGDOMAIN\\ad_user"
    },
    "comment": "HR Department Share",
    "dir_umask": 18,
    "file_umask": 18,
    "name": "HR_SHARE",
    "offline_files": "none",
    "path": "/volume_1/eng_vol/",
    "svm": {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "name": "svm1",
      "uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
    },
    "unix_symlink": "local",
    "volume": {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "name": "volume1",
      "uuid": "028baa66-41bd-11e9-81d5-00a0986138f7"
    },
    "vscan_profile": "no_scan"
  }
}

Error

Status: Default, Error
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

next

href

self

href

Name Type Description

self

href

acls

The permissions that users and groups have on a CIFS share.

Name Type Description

_links

_links

permission

string

Specifies the access rights that a user or group has on the defined CIFS Share. The following values are allowed:

  • no_access - User does not have CIFS share access

  • read - User has only read access

  • change - User has change access

  • full_control - User has full_control access

type

string

Specifies the type of the user or group to add to the access control list of a CIFS share. The following values are allowed:

  • windows - Windows user or group

  • unix_user - UNIX user

  • unix_group - UNIX group

user_or_group

string

Specifies the user or group name to add to the access control list of a CIFS share.

svm

Name Type Description

_links

_links

name

string

The name of the SVM.

uuid

string

The unique identifier of the SVM.

volume

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

  • Introduced in: 9.6

  • x-nullable: true

cifs_share

CIFS share is a named access point in a volume. Before users and applications can access data on the CIFS server over SMB, a CIFS share must be created with sufficient share permission. CIFS shares are tied to the CIFS server on the SVM. When a CIFS share is created, ONTAP creates a default ACL for the share with Full Control permissions for Everyone.

Name Type Description

_links

_links

access_based_enumeration

boolean

If enabled, all folders inside this share are visible to a user based on that individual user access right; prevents the display of folders or other shared resources that the user does not have access to.

acls

array[acls]

allow_unencrypted_access

boolean

Specifies whether or not the SMB2 clients are allowed to access the encrypted share.

browsable

boolean

Specifies whether or not the Windows clients can browse the share.

change_notify

boolean

Specifies whether CIFS clients can request for change notifications for directories on this share.

comment

string

Specify the CIFS share descriptions.

continuously_available

boolean

Specifies whether or not the clients connecting to this share can open files in a persistent manner. Files opened in this way are protected from disruptive events, such as, failover and giveback.

dir_umask

integer

Directory Mode Creation Mask to be viewed as an octal number.

encryption

boolean

Specifies that SMB encryption must be used when accessing this share. Clients that do not support encryption are not able to access this share.

file_umask

integer

File Mode Creation Mask to be viewed as an octal number.

force_group_for_create

string

Specifies that all files that CIFS users create in a specific share belong to the same group (also called the "force-group"). The "force-group" must be a predefined group in the UNIX group database. This setting has no effect unless the security style of the volume is UNIX or mixed security style.

home_directory

boolean

Specifies whether or not the share is a home directory share, where the share and path names are dynamic. ONTAP home directory functionality automatically offer each user a dynamic share to their home directory without creating an individual SMB share for each user. The ONTAP CIFS home directory feature enable us to configure a share that maps to different directories based on the user that connects to it. Instead of creating a separate shares for each user, a single share with a home directory parameters can be created. In a home directory share, ONTAP dynamically generates the share-name and share-path by substituting %w, %u, and %d variables with the corresponding Windows user name, UNIX user name, and domain name, respectively.

  • Default value:

  • Introduced in: 9.6

  • readCreate: 1

  • x-nullable: true

name

string

Specifies the name of the CIFS share that you want to create. If this is a home directory share then the share name includes the pattern as %w (Windows user name), %u (UNIX user name) and %d (Windows domain name) variables in any combination with this parameter to generate shares dynamically.

namespace_caching

boolean

Specifies whether or not the SMB clients connecting to this share can cache the directory enumeration results returned by the CIFS servers.

no_strict_security

boolean

Specifies whether or not CIFS clients can follow a unix symlinks outside the share boundaries.

offline_files

string

Offline Files The supported values are:

  • none - Clients are not permitted to cache files for offline access.

  • manual - Clients may cache files that are explicitly selected by the user for offline access.

  • documents - Clients may automatically cache files that are used by the user for offline access.

  • programs - Clients may automatically cache files that are used by the user for offline access and may use those files in an offline mode even if the share is available.

oplocks

boolean

Specify whether opportunistic locks are enabled on this share. "Oplocks" allow clients to lock files and cache content locally, which can increase performance for file operations.

path

string

The fully-qualified pathname in the owning SVM namespace that is shared through this share. If this is a home directory share then the path should be dynamic by specifying the pattern %w (Windows user name), %u (UNIX user name), or %d (domain name) variables in any combination. ONTAP generates the path dynamically for the connected user and this path is appended to each search path to find the full Home Directory path.

  • example: /volume_1/eng_vol/

  • maxLength: 256

  • minLength: 1

  • Introduced in: 9.6

  • x-nullable: true

show_previous_versions

boolean

Specifies that the previous version can be viewed and restored from the client.

show_snapshot

boolean

Specifies whether or not the Snapshot copies can be viewed and traversed by clients.

svm

svm

unix_symlink

string

Controls the access of UNIX symbolic links to CIFS clients. The supported values are:

  • local - Enables only local symbolic links which is within the same CIFS share.

  • widelink - Enables both local symlinks and widelinks.

  • disable - Disables local symlinks and widelinks.

volume

volume

vscan_profile

string

Vscan File-Operations Profile The supported values are:

  • no_scan - Virus scans are never triggered for accesses to this share.

  • standard - Virus scans can be triggered by open, close, and rename operations.

  • strict - Virus scans can be triggered by open, read, close, and rename operations.

  • writes_only - Virus scans can be triggered only when a file that has been modified is closed.

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.