File services APIs

Contributors netapp-reenu ciarm netapp-manini dmp-netapp Download PDF of this page

You can use File Services APIs to view and manage your file servers and file shares.

Before you create file shares, you have to create file servers to host them.

File Servers APIs

You can use File Servers APIs to view and manage your file servers. For more information on file servers, see Create a file server.

HTTP Verb Path Description Mandatory parameters/Request body

GET

/v2.1/fileservers

You can retrieve the details of all your file servers. Retrieves details of the file servers, such as file server ID, name, region, zone, tenant, and tags.

offset: The number of items to skip before starting to collect the result set.
limit: The numbers of items to return.

GET

/v2.1/fileservers/{id}

You can retrieve the details of a specific file server. Retrieves details of the file server, such as name, region, zone, tenant, and tags based on the entered ID.

id: The ID of the file server.

POST

/v2.1/fileservers

You can create a file server. Add the values in the request body to create a file server with the specified parameters, such as name, subtenant ID, zone, subnet ID.

name: The name of the file server.
subtenant_id: The ID of the subtenant.
zone: The name of the zone.
subnet_id: The ID of the subnet.

POST

/v2.1/fileservers/{id}/
tags

You can create or replace tags for a file server. Add the ID of the file server and the values for the tags in the "key:value pair" format in the request body.

id: The ID of the file server.

PUT

/v2.1/fileservers/{id}

You can modify any file server based on its ID. Add the ID of the file server, and the values that you want to modify in the request body, such as such as name, protocol, zone, region, and tags.

id: The ID of the file server.

DELETE

/v2.1/fileservers/{id}

You can delete any file server by its ID.

id: The ID of the file server.

Before you delete a file server, you should delete all the file shares mapped to it.

After deleting CIFS-enabled file servers, the Active Directory computer object remains. Ask your Active Directory admin to manually remove the computer object for the deleted file server from Active Directory.

File Shares APIs

You can use File Shares APIs to view and manage your file shares. For more information on file shares, see Create a file share.

HTTP Verb Path Description Mandatory parameters/Request body

GET

/v2.1/fileshares

You can retrieve the details of all your file shares. Retrieves details of the file shares, such as ID, name, snapshot policy, protocols, file server IP, and tags.

offset: The number of items to skip before starting to collect the result set.
limit: The numbers of items to return.

GET

/v2.1/fileshares/{id}

You can retrieve the details of a specific file share. Retrieves details of the file share, such as such as ID, name, snapshot policy, protocols, file server IP, and tags based on the entered ID.

id: The ID of the file share.

POST

/v2.1/fileshares

You can create a file share. Add the values in the request body to create a file share with the specified parameters, such as ID, name, snapshot policy, protocols, file server IP, and tags.

name: The name of the file share.
share_path: The path of the file share.
fileserver_id: The ID of the file server.
size_gb: The size of the file share in GBs.
service_level: The service level name applicable: Standard, Premium, Premium-Tiering, Extreme, or Extreme-Tiering.
protocol: The protocol used to access the file share (NFS, CIFS, or multi-protocol).
security_style: The security style (Unix or NTFS).
export_policy: The export policy of the file share.

POST

/v2.1/fileshares/{id}/
snapshot/{name}

You can create a snapshot of a file share.

id: The ID of the file share.
name: The name of the snapshot.

POST

/v2.1/fileshares/{id}/
tags

You can create or replace tags for a file share. Add the ID of the file share and the values for the tags in the "key:value pair" format in the request body.

id: The ID of the file share.

PUT

/v2.1/fileshares/{id}

You can modify any file share based on its ID. Add the ID of the file server and the values that you want to modify in the request body, such as such as name, protocol, snapshot policy, backup policy, and tags.

id: The ID of the file share.
name: The name of the file share.
size_gb: The size of the file share in GBs.
service_level: The service level name applicable: Standard, Premium, Premium-Tiering, Extreme, or Extreme-Tiering.
protocol: The protocol used to access the file share (NFS, CIFS, or multi-protocol).
export_policy: The export policy of the file share.

DELETE

/v2.1/fileshares/{id}

You can delete any file share by its ID.

id: The ID of the file share.

DELETE

/v2.1/fileshares/{id}/
snapshot/{name}

You can delete any snapshot of a file share by the ID of the file share and the name of the snapshot.

id: The ID of the file share.
name: The name of the snapshot.

For CIFS shares, adding a $ character to the end of the share path will make it a hidden share, for example, pathtomyhiddenshare$.