Skip to content
Last updated

HPE GreenLake for Object Storage Developer Guide

HPE GreenLake for Object Storage offers RESTful APIs for Object Storage, enabling management and configuration of buckets, users, and group and access policies.

Prerequisites


Endpoints

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

Authentication

The Object 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. The required permissions are documented in the following guide pages.

Features

The Object Storage APIs are broadly categorized into the following feature areas:

  • Create, list, update and delete object storage buckets
  • Configure bucket properties including versioning, object locking, and lifecycle policies
  • Report bucket capacity and performance
  • Manage bucket metadata
  • Manage bucket access control lists (ACLs)
  • Manage users and user groups

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 bucket

Create a bucket on an HPE Alletra Storage MP X10000 device. Provide name, optional bucketTags (array of key/value pairs), and compression (example: DISABLED). Replace {systemId} with your system identifier.

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

Payload:

{
  "bucketTags": [
    {
      "key": "Location",
      "value": ""
    }
  ],
  "compression": "DISABLED",
  "name": "myBucketName"
}

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

Listing all buckets

Retrieve the list of buckets for the specified HPE Alletra Storage MP X10000 device. Replace {systemId} with your system identifier.

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

Delete a bucket

Delete the specified bucket on the given HPE Alletra Storage MP X10000 device. Replace {systemId} and {bucketId} with actual IDs.

DELETE https://us-west.api.greenlake.hpe.com/object-storage/v1alpha1/devtype7-storage-systems/{systemId}/buckets/{bucketId}

Create a new user

Create a user on an HPE Alletra Storage MP X10000 device. Provide the username in the payload. Replace {systemId} with your system identifier.

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

Payload:

{
  "name": "NewUser"
}

Listing all users

Retrieve the list of users for the specified HPE Alletra Storage MP X10000 device. Replace {systemId} with your system identifier.

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

Delete a user

Delete the specified user from the given HPE Alletra Storage MP X10000 device. Replace {systemId} and {userId} with actual IDs.

DELETE https://us-west.api.greenlake.hpe.com/object-storage/v1alpha1/devtype7-storage-systems/{systemId}/users/{userId}

Create a new group

Create a group on an HPE Alletra Storage MP X10000 device. Provide group name and optional users array (member names). Replace {systemId} with your system identifier.

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

Payload:

{
  "name": "NewGroup1",
  "users": [
    "MyUser"
  ]
}

Listing all groups

Retrieve the list of groups for the specified HPE Alletra Storage MP X10000 device. Replace {systemId} with your system identifier.

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

Delete a group

Delete the specified group on the given HPE Alletra Storage MP X10000 device. Replace {systemId} and {groupId} with actual IDs.

DELETE https://us-west.api.greenlake.hpe.com/object-storage/v1alpha1/devtype7-storage-systems/{systemId}/groups/{groupId}