Skip to content
Last updated

HPE GreenLake for File Storage

This page provides an introduction and quick start guide for the File Storage API:

  • Overview—See a high-level description of the API.
  • Developer guide—Review a quick start guide that helps you get started with the API.

Overview

The HPE GreenLake for File Storage REST APIs let you programmatically create, manage, and monitor file storage resources to support integration and automation. File Storage is a service in Data Services Cloud Console that handles file share and filesystem lifecycle management.

Features

  • Create, list, update and delete file shares
  • Configure file share properties such as additional file share expansion size and host access options
  • List and delete filesystems
  • Report filesystem capacity and performance history trends
  • List share-settings for file shares

Developer guide

HPE GreenLake for File Storage provides RESTful APIs to programmatically create, manage, and monitor file storage resources, enabling seamless integration and automation.

Prerequisites


Endpoints

Endpoints are the host URLs that you submit your API requests to. File Storage has unique endpoints in specific regions. Use the following list to identify your application endpoint.

Authentication

The File Storage API uses an access token for authentication. Instructions for obtaining an access token can be found on the Authentication page.

The HTTP Authorization request header is used to provide the access token in all API requests as a Bearer token.

  • Authorization:Bearer <access token>

Authorization

All API requests are authorized using permissions. The user owning the access token must have the required permissions assigned for the resources being accessed in order to be authorized.

Required permissions

To use the HPE GreenLake File Storage API, you need appropriate permissions based on your role:

  • file-storage.file-share.read for all GET and LIST requests on file share resources
  • file-storage.file-share.create for all POST requests on file share resources
  • file-storage.file-share.update for all PATCH requests on file share resources
  • file-storage.file-share.delete for all DELETE requests on file share resources
  • file-storage.file-system.read for all GET and LIST requests on filesystem resources
  • file-storage.file-system.delete for all DELETE requests on filesystem resources
  • file-storage.file-share-setting.read for all GET and LIST requests on file share-setting resources

For more information about roles and permissions, see the GreenLake Cloud User Guide.

Making it all work


General guidelines

  • For asynchronous operations that return HTTP status 201 or 202, use the Location header in the API response to track progress.
  • Replace the base URL in examples with the endpoint for your region.

Create a new file share

Create a file share for HPE Alletra MP B10000 Storage System identified by {systemId}. Provide the name, size of the file share in MiB, filesystem name, and share-setting name. The reduce field specifies whether compression and dedupe are enabled on the filesystem (example: false).

POST https://us-west.api.greenlake.hpe.com/file-storage/v1alpha1/devtype4-storage-systems/{systemId}/file-shares

Payload:

{
  "name": "myShareName",
  "filesystemName": "myFileSystemName",
  "protocol": [
    "NFS"
  ],
  "settingName": "myShareSettingName",
  "reduce": false,
  "sizeInMiB": 10240,
  "hostAccess": [
    {
      "access": "READ_WRITE",
      "options": "ROOT_SQUASH",
      "ipaddress": "*|10.168.10.1/15|10.31.51.21"
    }
  ]
}

Create a file share for HPE Alletra Storage X10000 System identified by {systemId}. Provide the filesystem name and a list of clients that can access the NFS share.

POST https://us-west.api.greenlake.hpe.com/file-storage/v1alpha1/devtype7-storage-systems/{systemId}/file-shares

Payload:

{
  "filesystemName": "myFileSystemName",
  "accessClients": [
    {
      "clients": "10.168.10.*"
    }
  ]
}

The endpoint https://us-west.api.greenlake.hpe.com is the endpoint for the US West application. If you are using HPE GreenLake for File Storage in a different region, replace the endpoint with the corresponding region endpoint.

Listing all file shares

List all file shares on HPE Alletra MP B10000 Storage System identified by {systemId}.

GET https://us-west.api.greenlake.hpe.com/file-storage/v1alpha1/devtype4-storage-systems/{systemId}/file-shares

List all file shares on HPE Alletra Storage X10000 System identified by {systemId}.

GET https://us-west.api.greenlake.hpe.com/file-storage/v1alpha1/devtype7-storage-systems/{systemId}/file-shares

Update a file share's properties

Update properties of the file share identified by {fileShareId} on HPE Alletra MP B10000 storage system identified by {systemId}.

PATCH https://us-west.api.greenlake.hpe.com/file-storage/v1alpha1/devtype4-storage-systems/{systemId}/file-shares/{fileShareId}

Payload:

{
  "additionalSizeInMiB": 1024,
  "hostAccess": [
    {
      "access": "READ_WRITE",
      "options": "ROOT_SQUASH",
      "ipaddress": "*|10.168.10.1/15|10.31.51.21"
    }
  ]
}

Update properties of the file share identified by {fileShareId} on HPE Alletra Storage X10000 system identified by {systemId}.

PATCH https://us-west.api.greenlake.hpe.com/file-storage/v1alpha1/devtype7-storage-systems/{systemId}/file-shares/{fileShareId}

Payload:

{
  "accessClients": [
    {
      "clients": "10.168.10.*"
    }
  ]
}

Delete a file share

Delete file share identified by {fileShareId} from HPE Alletra MP B10000 storage system identified by {systemId}. File share delete will remove the associated filesystem and share settings.

DELETE https://us-west.api.greenlake.hpe.com/file-storage/v1alpha1/devtype4-storage-systems/{systemId}/file-shares/{fileShareId}

Delete a file share identified by {fileShareId} from HPE Alletra Storage X10000 system identified by {systemId}.

DELETE https://us-west.api.greenlake.hpe.com/file-storage/v1alpha1/devtype7-storage-systems/{systemId}/file-shares/{fileShareId}

Listing all filesystems

List all the filesystems on HPE Alletra MP B10000 Storage System identified by {systemId}.

GET https://us-west.api.greenlake.hpe.com/file-storage/v1alpha1/devtype4-storage-systems/{systemId}/filesystems

List all the filesystems on HPE Alletra Storage X10000 System identified by {systemId}.

GET https://us-west.api.greenlake.hpe.com/file-storage/v1alpha1/devtype7-storage-systems/{systemId}/filesystems

Delete a filesystem

Delete a filesystem identified by {filesystemId} on an HPE Alletra MP B10000 storage system identified by {systemId}.

DELETE https://us-west.api.greenlake.hpe.com/file-storage/v1alpha1/devtype4-storage-systems/{systemId}/filesystems/{filesystemId}

Delete a filesystem identified by {filesystemId} on an HPE Alletra Storage X10000 system identified by {systemId}.

DELETE https://us-west.api.greenlake.hpe.com/file-storage/v1alpha1/devtype7-storage-systems/{systemId}/filesystems/{filesystemId}

Get filesystem capacity history trend

Get file system capacity trend data for the filesystem identified by {filesystemId} on HPE Alletra MP B10000 Storage System identified by {systemId}.

GET https://us-west.api.greenlake.hpe.com/file-storage/v1alpha1/devtype4-storage-systems/{systemId}/filesystems/{filesystemId}/capacity-history

Get the filesystem capacity trend data of the filesystem identified by {filesystemId} on HPE Alletra Storage X10000 System identified by {systemId}.

GET https://us-west.api.greenlake.hpe.com/file-storage/v1alpha1/devtype7-storage-systems/{systemId}/filesystems/{filesystemId}/capacity-history

Get filesystem performance history trend

Get performance trend data for the filesystem identified by {filesystemId} on HPE Alletra MP B10000 Storage System identified by {systemId}.

GET https://us-west.api.greenlake.hpe.com/file-storage/v1alpha1/devtype4-storage-systems/{systemId}/filesystems/{filesystemId}/performance-history

Get performance trend data of filesystem identified by {filesystemId} on HPE Alletra Storage X10000 System identified by {systemId}.

GET https://us-west.api.greenlake.hpe.com/file-storage/v1alpha1/devtype7-storage-systems/{systemId}/filesystems/{filesystemId}/performance-history

Listing all share-settings

List all the share-settings associated with HPE Alletra MP B10000 storage system identified by {systemId}.

GET https://us-west.api.greenlake.hpe.com/file-storage/v1alpha1/devtype4-storage-systems/{systemId}/share-settings