English

Object storage APIs

Contributors ciarm dmp-netapp Download PDF of this page

This section provides the APIs to manage your object storage, object storage users, and object storage group.

The object storage workflow includes these tasks:

  • Create an object storage account.

  • Create an object storage group.

  • Create an object storage user.

  • Create an S3 key for user.

Object storage groups

Use the methods listed in the following table to retrieve, create, or modify object storage groups.

HTTP Method Path Description

GET

/v2.1/objectiam/groups

Retrieve object storage groups.

GET

/v2.1/objectiam/groups/{id}

Retrieve an object storage group by ID.

POST

/v2.1/objectiam/groups

Create an object storage identity access management group.

PUT

/v2.1/objectiam/groups/{id}

Modify an object storage group identified by ID.

DELETE

/v2.1/objectiam/groups/{id}

Delete an object storage group identified by ID.

Object storage group attributes

The following table lists the object storage attributes.

Attribute Type Description

id

String

The unique identifier for the object storage group.

name

String

The object storage group name.

subtenant

String

The name of the subtenant to which the group belongs.

subtenant_id

String

The identifier for the subtenant to which the group belongs.

tenant

String

The name of the tenant to which the group belongs.

tenant_id

String

The identifier for the tenant to which the group belongs.

s3_policy

S3 policy
For example:

"s3_policy": {
    "Statement": [
      {
        "Effect": "Allow",
        "Action": "s3:*",
        "Resource": "arn:aws:s3:::*"
      }
    ]
  }

Retrieve object storage groups

Use the method listed in the following table to retrieve all object storage groups or a subset of object storage groups. Specifying a subtenant_id will return only the object storage groups belonging to that subtenant.

HTTP Method Path Description Parameters

GET

/v2.1/objectiam/groups

Retrieve all object storage groups. Optionally, specify a subtenant ID to retrieve only the object storage groups associated with the subtenant.

subtenant_id (string): The subtenant ID associated with the Identity and Access Management (IAM) users/groups.

offset and limit– see Common Pagination

Required request body attributes: none

Request body example:

none

Response body example:

{
  "status": {
    "user_message": "Okay. Returned 1 record.",
    "verbose_message": "",
    "code": 200
  },
  "result": {
    "returned_records": 1,
    "total_records": 1,
    "sort_by": "created",
    "order_by": "desc",
    "offset": 0,
    "limit": 20,
    "records": [
      {
        "id": "5eb1eff8bc5c0300011c989c",
        "name": "MyGroup",
        "tenant_id": "5e7c3af7aab46c00014ce877",
        "tenant": "MyTenant",
        "subtenant_id": "5e7c3af8aab46c00014ce878",
        "subtenant": "MySubtenant",
        "s3_policy": {
          "Statement": [
            {
              "Action": [
                "s3:*"
              ],
              "Effect": "Allow",
              "Resource": "arn:aws:s3:::*"
            }
          ]
        }
      }
    ]

Retrieve an object storage group by ID

Use the method listed in the following table to retrieve an object storage group by ID.

HTTP Method Path Description Parameters

GET

/v2.1/objectiam/groups/{id}

Retrieve an object storage group by ID.

id (string): The unique identifier of the object storage group.

Required request body attributes: none

Request body example:

none

Response body example:

{
  "status": {
    "user_message": "Okay. Returned 1 record.",
    "verbose_message": "",
    "code": 200
  },
  "result": {
    "returned_records": 1,
    "records": [
      {
        "id": "5eb1eff8bc5c0300011c989c",
        "name": "MyGroup",
        "tenant_id": "5e7c3af7aab46c00014ce877",
        "tenant": "MyTenant",
        "subtenant_id": "5e7c3af8aab46c00014ce878",
        "subtenant": "MySubtenant",
        "s3_policy": {
          "Statement": [
            {
              "Action": [
                "s3:*"
              ],
              "Effect": "Allow",
              "Resource": "arn:aws:s3:::*"
            }
          ]
        }
      }
    ]
  }

Create an object storage group

Use the method listed in the following to create an object storage group.

HTTP Method Path Description Parameters

POST

/v2.1/objectiam/groups/

Create a new object storage group service to host object storage users.

None

Required request body attributes: name, subtenant_id, s3Policy

Request body example:

{
  "name": "MyNewGroup",
  "subtenant_id": "5e7c3af8aab46c00014ce878",
  "s3_policy": {
    "Statement": [
      {
        "Effect": "Allow",
        "Action": "s3:*",
        "Resource": "arn:aws:s3:::*"
      }
    ]
  }
}

Response body example:

{
  "status": {
    "user_message": "Okay. Accepted for processing.",
    "verbose_message": "",
    "code": 202
  },
  "result": {
    "returned_records": 1,
    "records": [
      {
        "id": "5ed5fa312c356a0001a73841",
        "action": "create",
        "job_summary": "Create request is successfully submitted",
        "created": "2020-06-02T07:05:21.130260774Z",
        "updated": "2020-06-02T07:05:21.130260774Z",
        "object_id": "5ed5fa312c356a0001a73840",
        "object_type": "sg_groups",
        "object_name": "MyNewGroup",
        "status": "pending",
        "status_detail": "",
        "last_error": "",
        "user_id": "5ec626c0f038943eb46b0af1",
        "job_tasks": null
      }
    ]
  }
}

Modify an object storage group

Use the method listed in the following table to modify an object storage group.

HTTP Method Path Description Parameters

PUT

/v2.1/objectiam/groups/{id}

Modify an object storage group.

id (string): The unique identifier of the object storage group.

Required request body attributes: name, subtenant_id, s3Policy

Request body example:

{
  "s3_policy": {
    "Statement": [
        {
        "Action": [
            "s3:ListAllMyBuckets",
            "s3:ListBucket",
            "s3:ListBucketVersions",
            "s3:GetObject",
            "s3:GetObjectTagging",
            "s3:GetObjectVersion",
            "s3:GetObjectVersionTagging"
        ],
        "Effect": "Allow",
        "Resource": "arn:aws:s3:::*"
        }
    ]
  }
}

Response body example:

{
  "status": {
    "user_message": "Okay. Accepted for processing.",
    "verbose_message": "",
    "code": 202
  },
  "result": {
    "returned_records": 1,
    "records": [
      {
        "id": "5ed5fe822c356a0001a73859",
        "action": "update",
        "job_summary": "Update request is successfully submitted",
        "created": "2020-06-02T07:23:46.43550235Z",
        "updated": "2020-06-02T07:23:46.43550235Z",
        "object_id": "5ed5fa312c356a0001a73840",
        "object_type": "sg_groups",
        "object_name": "MyNewGroup",
        "status": "pending",
        "status_detail": "",
        "last_error": "",
        "user_id": "5ec626c0f038943eb46b0af1",
        "job_tasks": null
      }
    ]
  }
}

Delete an object storage group by ID

Use the method listed in the following table to delete an object storage group by ID.

HTTP Method Path Description Parameters

Delete

/v2.1/objectiam/groups/{id}

Delete an object storage group by ID.

id (string): The unique identifier of the object storage group.

Required request body attributes: none

Request body example:

none

Response body example:

{
  "status": {
    "user_message": "Okay. Returned 1 record.",
    "verbose_message": "",
    "code": 200
  },
  "result": {
    "returned_records": 1,
    "records": [
      {
        "id": "5eb1eff8bc5c0300011c989c",
        "name": "MyGroup",
        "tenant_id": "5e7c3af7aab46c00014ce877",
        "tenant": "MyTenant",
        "subtenant_id": "5e7c3af8aab46c00014ce878",
        "subtenant": "MySubtenant",
        "s3_policy": {
          "Statement": [
            {
              "Action": [
                "s3:*"
              ],
              "Effect": "Allow",
              "Resource": "arn:aws:s3:::*"
            }
          ]
        }
      }
    ]
  }

Object storage users

Use the methods listed in the following table to perform the following tasks:

  • Retrieve, create, or modify object storage users.

  • Create S3 keys, retrieve S3 keys for a user, or retrieve keys by key ID.

HTTP Method Path Description

GET

/v2.1/objectiam/users

Retrieve object storage users.

GET

/v2.1/objectiam/users/{id}

Retrieve an object storage user by ID.

POST

/v2.1/objectiam/users

Create an object storage user.

PUT

/v2.1/objectiam/users/{id}

Modify an object storage user identified by ID.

DELETE

/v2.1/objectiam/users/{id}

Delete an object storage user by ID.

GET

/v2.1/objectiam/users/{user_id}/s3keys

Get all S3 keys mapped to a user.

POST

/v2.1/objectiam/users/{user_id}/s3keys

Create S3 keys.

GET

/v2.1/objectiam/users/{user_id}/s3keys/{key_id}

Get S3 keys by key ID.

DELETE

/v2.1/objectiam/users/{user_id}/s3keys/{key_id}

Delete S3 keys by key ID.

Object storage user attributes

The following table lists the object storage user attributes.

Attribute Type Description

id

String

The unique identifier for the object storage user.

display_name

String

The display name of the user.

subtenant

String

The name of the subtenant to which the user belongs.

subtenant_id

String

The identifier for the subtenant to which the user belongs.

tenant

String

The name of the tenant to which the user belongs.

tenant_id

String

The identifier for the tenant to which the user belongs.

objectiam_user_urn

String

The URN.

sg_group_membership

String

NetApp StorageGRID group memberships.
For example:
"sg_group_membership": [
"5d2fb0fb4f47df00015274e3"
]

Retrieve object storage users

Use the method listed in the following table to retrieve all object storage users or a subset of object storage users. Specifying a subtenant_id will return only the object storage groups belonging to that subtenant.

HTTP Method Path Description Parameters

GET

/v2.1/objectiam/users

Retrieve all object storage users.

subtenant_id (string): The subtenant ID associated with the IAM users/groups.

offset and limit – see Common Pagination

Required request body attributes: none

Request body example:

none

Response body example:

{
  "status": {
    "user_message": "Okay. Returned 1 record.",
    "verbose_message": "",
    "code": 200
  },
  "result": {
    "returned_records": 1,
    "total_records": 1,
    "sort_by": "created",
    "order_by": "desc",
    "offset": 0,
    "limit": 20,
    "records": [
      {
        "id": "5eb2212d1cbe3b000134762e",
        "display_name": "MyUser",
        "subtenant": "MySubtenant",
        "subtenant_id": "5e7c3af8aab46c00014ce878",
        "tenant_id": "5e7c3af7aab46c00014ce877",
        "tenant": "MyTenant",
        "objectiam_user_urn": "urn:sgws:identity::96465636379595351967:user/myuser",
        "sg_group_membership": [
          "5eb1eff8bc5c0300011c989c"
        ]
      }
    ]
  }
}

Retrieve an object storage user by ID

Use the method listed in the following table to retrieve an object storage use by ID.

HTTP Method Path Description Parameters

GET

/v2.1/objectiam/users{id}

Retrieve an object storage user by ID.

id: The object storage account ID.

Required request body attributes: none

Request body example:

none

Response body example:

{
  "status": {
    "user_message": "Okay. Returned 1 record.",
    "verbose_message": "",
    "code": 200
  },
  "result": {
    "returned_records": 1,
    "records": [
      {
        "id": "5eb2212d1cbe3b000134762e",
        "display_name": "MyUser",
        "subtenant": "MySubtenant",
        "subtenant_id": "5e7c3af8aab46c00014ce878",
        "tenant_id": "5e7c3af7aab46c00014ce877",
        "tenant": "MyTenant",
        "objectiam_user_urn": "urn:sgws:identity::96465636379595351967:user/myuser",
        "sg_group_membership": [
          "5eb1eff8bc5c0300011c989c"
        ]
      }
    ]
  }
}

Create an object storage user

Use the method listed in the following table to create an object storage user.

HTTP Method Path Description Parameters

POST

/v2.1/objectiam/users

Create a new object storage user.

None

Required request body attributes: display_name, subtenant_id, sg_group_membership

Request body example:

{
  "display_name": "MyUserName",
  "subtenant_id": "5e7c3af8aab46c00014ce878",
  "sg_group_membership": [
    "5ed5fa312c356a0001a73840"
  ]
}

Response body example:

{
  "status": {
    "user_message": "Okay. Accepted for processing.",
    "verbose_message": "",
    "code": 202
  },
  "result": {
    "returned_records": 1,
    "records": [
      {
        "id": "5ed603712c356a0001a7386c",
        "action": "create",
        "job_summary": "Activate request is successfully submitted",
        "created": "2020-06-02T07:44:49.647815816Z",
        "updated": "2020-06-02T07:44:49.647815816Z",
        "object_id": "5ed603712c356a0001a7386d",
        "object_type": "sg_users",
        "object_name": "MyUserName",
        "status": "pending",
        "status_detail": "",
        "last_error": "",
        "user_id": "5ec626c0f038943eb46b0af1",
        "job_tasks": null
      }
    ]
  }
}

Modify an object storage user

Use the method listed in the following table to modify an object storage user.

HTTP Method Path Description Parameters

PUT

/v2.1/objectiam/users/{id}

Modify an object storage user identified by ID.

id: The object storage user ID.

Required request body attributes: display_name, subtenant_id, sg_group_membership

Request body example:

{
  "display_name": "MyModifiedObjectStorageUser",
  "subtenant_id": "5e57a465896bd80001dd4961",
  "sg_group_membership": [
    "5e60754f9b64790001fe937b"
  ]
}

Response body example:

{
  "status": {
    "user_message": "Okay. Accepted for processing.",
    "verbose_message": "",
    "code": 202
  },
  "result": {
    "returned_records": 1,
    "records": [
      {
        "id": "5ed604002c356a0001a73880",
        "action": "update",
        "job_summary": "Update request is successfully submitted",
        "created": "2020-06-02T07:47:12.205889873Z",
        "updated": "2020-06-02T07:47:12.205889873Z",
        "object_id": "5ed603712c356a0001a7386d",
        "object_type": "sg_users",
        "object_name": "MyUserName",
        "status": "pending",
        "status_detail": "",
        "last_error": "",
        "user_id": "5ec626c0f038943eb46b0af1",
        "job_tasks": null
      }
    ]
  }
}

Map all S3 keys to an object storage user

Use the method listed in the following table to map all S3 keys to an object storage user.

HTTP Method Path Description Parameters

GET

/v2.1/objectiam/users/{user_id}/s3keys

Create an S3 key for an object storage user.

user_id (string): The object storage user identifier.

Required request body attributes: none

Request body example:

none

Response body example:

{
  "status": {
    "user_message": "Okay. Returned 1 record.",
    "verbose_message": "",
    "code": 200
  },
  "result": {
    "returned_records": 1,
    "records": [
      {
        "id": "5e66de2509a74c0001b895e7",
        "display_name": "****************HNDE",
        "subtenant_id": "5e57a465896bd80001dd4961",
        "subtenant": "BProject",
        "objectiam_user_id": "5e66c77809a74c0001b89598",
        "objectiam_user": "MyNewObjectStorageUser",
        "objectiam_user_urn": "urn:sgws:identity::09936502886898621050:user/mynewobjectstorageuser",
        "expires": "2020-04-07T10:40:52Z"
      }
    ]

Create an S3 key for an object storage user

Use the method listed in the following to create an S3 key for an object storage user.

HTTP Method Path Description Parameters

POST

/v2.1/objectiam/users/{user_id}/s3keys

Create an S3 key for an object storage user.

user_id (string): The object storage user identifier.

Required request body attributes: expires (string)

The key expiry date/time is set in UTC—it must be set in the future.

Request body example:

{
  "expires": "2020-04-07T10:40:52Z"
}

Response body example:

  "status": {
    "user_message": "Okay. Returned 1 record.",
    "verbose_message": "",
    "code": 200
  },
  "result": {
    "total_records": 1,
    "records": [
      {
        "id": "5e66de2509a74c0001b895e7",
        "display_name": "****************HNDE",
        "subtenant_id": "5e57a465896bd80001dd4961",
        "subtenant": "BProject",
        "objectiam_user_id": "5e66c77809a74c0001b89598",
        "objectiam_user": "MyNewObjectStorageUser",
        "objectiam_user_urn": "urn:sgws:identity::09936502886898621050:user/mynewobjectstorageuser",
        "expires": "2020-04-07T10:40:52Z",
        "access_key": "PL86KPEBN6XT4T7UHNDE",
        "secret_key": "FlD/YWAM7JMr9gG8pumU8dzvcTLMzLYtUe2lNzcA"
      }
    ]
  }
}

Get S3 keys for an object storage user by key ID

Use the method listed in the following table to get S3 keys for an object storage user by key ID.

HTTP Method Path Description Parameters

GET

/v2.1/objectiam/users/{user_id}/s3keys/{key_id}

Get S3 keys by key ID.

  • user_id (string): The object storage user ID. For example: 5e66c77809a74c0001b89598

  • key_id (string): S3 key For example: 5e66de2509a74c0001b895e7

Required request body attributes: none

Request body example:

none

Response body example:

{
  "status": {
    "user_message": "Okay. Returned 1 record.",
    "verbose_message": "",
    "code": 200
  },
  "result": {
    "returned_records": 1,
    "records": [
      {
        "id": "5ecc7bb9b5d2730001f798fb",
        "display_name": "****************XCXD",
        "subtenant_id": "5e7c3af8aab46c00014ce878",
        "subtenant": "MySubtenant",
        "objectiam_user_id": "5eb2212d1cbe3b000134762e",
        "objectiam_user": "MyUser",
        "objectiam_user_urn": "urn:sgws:identity::96465636379595351967:user/myuser",
        "expires": "2020-05-27T00:00:00Z"
      }
    ]
  }
}

Delete an S3 key by key ID

Use the method listed in the following table to delete an S3 key by key ID.

HTTP Method Path Description Parameters

Delete

/v2.1/objectiam/users/{user_id}/s3keys/{key_id}

Delete S3 key by key ID.

  • user_id (string): The object storage user ID.
    For example: 5e66c77809a74c0001b89598

  • key_id (string): S3 key For example: 5e66de2509a74c0001b895e7

Required request body attributes: none

Request body example:

none

Response body example:

No content to return for succesful execution

Object storage accounts

Use the methods listed in the following table to perform the following tasks:

  • Retrieve, activate, or modify object storage accounts.

  • Create S3 buckets.

HTTP Method Path Description

GET

/v2.1/objectstorage/accounts

Retrieve object storage accounts.

GET

/v2.1/objectstorage/accounts/{id}

Retrieve an object storage account by ID.

POST

/v2.1/objectstorage/accounts

Create an object storage account.

PUT

/v2.1/objectstorage/accounts/{id}

Modify an object storage account identified by ID.

DELETE

/v2.1/objectstorage/accounts/{id}

Modify an object storage account identified by ID.

GET

/v2.1/objectstorage/buckets

Get S3 buckets.

POST

/v2.1/objectstorage/buckets

Create S3 buckets.

Object storage account attributes

The following table lists the object storage account attributes.

Attribute Type Description

id

String

The unique identifier of the object storage user.

subtenant_id

String

The identifier of the instance of a subtenant object.

quota_gb

Integer

The size of the share or disk.

Retrieve all object storage accounts

Use the method listed in the following table to retrieve all object storage accounts or a subset of object storage accounts.

HTTP Method Path Description Parameters

GET

/v2.1/objectstorage/accounts

Retrieve all object storage users.

offset and limit– .
see Common Pagination

Required request body attributes: none

Request body example:

none

Response body example

{
  "status": {
    "user_message": "Okay. Returned 1 record.",
    "verbose_message": "",
    "code": 200
  },
  "result": {
    "returned_records": 1,
    "total_records": 19,
    "sort_by": "created",
    "order_by": "desc",
    "offset": 3,
    "limit": 1,
    "records": [
      {
        "id": "5ec6119e6344d000014cdc41",
        "name": "MyTenant - MySubtenant",
        "subtenant": " MySubtenant",
        "subtenant_id": "5ea8c5e083a9f80001b9d705",
        "tenant": "E- MyTenant",
        "tenant_id": "5d914499869caefed0f39eee",
        "sg_account_id": "29420999312809208626",
        "quota_gb": 100,
        "sg_instance_name": "NSE StorageGRID Dev1",
        "sg_instance_id": "5e3ba2840271823644cb8ab6"
      }
    ]
  }
}

Retrieve an object storage account by ID

Use the method listed in the following table to retrieve an object storage account by ID.

HTTP Method Path Description Parameters

GET

/v2.1/objectstorage/accounts/{id}

Retrieve an object storage account by ID.

id: The object storage account ID.

Required request body attributes: none

Request body example:

none

Response body example:

{
  "status": {
    "user_message": "Okay. Returned 1 record.",
    "verbose_message": "",
    "code": 200
  },
  "result": {
    "returned_records": 1,
    "records": [
      {
        "id": "5ec6119e6344d000014cdc41",
        "name": "MyTenant - MySubtennant",
        "subtenant": " MySubtennant",
        "subtenant_id": "5ea8c5e083a9f80001b9d705",
        "tenant": " MyTenant",
        "tenant_id": "5d914499869caefed0f39eee",
        "sg_account_id": "29420999312809208626",
        "quota_gb": 100,
        "sg_instance_name": "NSE StorageGRID Dev1",
        "sg_instance_id": "5e3ba2840271823644cb8ab6"
      }
    ]
  }

Activate an object storage account

Use the method listed in the following table to activate an object storage account.

HTTP Method Path Description Parameters

POST

/v2.1/objectstorage/accounts

Activate an object storage service.

None

Required request body attributes: subtenant_id, quota_gb

Request body example:

{
  "subtenant_id": "5ecefbbef418b40001f20bd6",
  "quota_gb": 20
}

Response body example:

{
  "status": {
    "user_message": "Okay. Accepted for processing.",
    "verbose_message": "",
    "code": 202
  },
  "result": {
    "returned_records": 1,
    "records": [
      {
        "id": "5ed608542c356a0001a73893",
        "action": "create",
        "job_summary": "Activate request for Sub Tenant MyNewSubtenant is successfully submitted",
        "created": "2020-06-02T08:05:40.017362022Z",
        "updated": "2020-06-02T08:05:40.017362022Z",
        "object_id": "5ed608542c356a0001a73894",
        "object_type": "sg_accounts",
        "object_name": "MyTenant - MyNewSubtenant",
        "status": "pending",
        "status_detail": "",
        "last_error": "",
        "user_id": "5ec626c0f038943eb46b0af1",
        "job_tasks": null
      }
    ]
  }
}

Modify an object storage account

Use the method listed in the following table to modify an object storage account.

HTTP Method Path Description Parameters

PUT

/v2.1/objectstorage/accounts/{id}

Modify an object storage service (such as, change the quota).

id (string): The object storage account ID.

Required request body attributes: name, subtenant_id, quota_gb

Request body example:

{
  "name": "MyTenant - MyNewSubtenant",
  "subtenant_id": "5ecefbbef418b40001f20bd6",
  "quota_gb": 30
}

Response body example:

{
  "status": {
    "user_message": "Okay. Accepted for processing.",
    "verbose_message": "",
    "code": 202
  },
  "result": {
    "returned_records": 1,
    "records": [
      {
        "id": "5ed609162c356a0001a73899",
        "action": "update",
        "job_summary": "Update request is successfully submitted",
        "created": "2020-06-02T08:08:54.841652098Z",
        "updated": "2020-06-02T08:08:54.841652098Z",
        "object_id": "5ed608542c356a0001a73894",
        "object_type": "sg_accounts",
        "object_name": "MyTenant - MyNewSubtenant",
        "status": "pending",
        "status_detail": "",
        "last_error": "",
        "user_id": "5ec626c0f038943eb46b0af1",
        "job_tasks": null
      }
    ]
  }
}

Delete an object storage account

Before you can delete an object storage account, you must first delete all associated groups, users, and buckets. Use the method listed in the following table to delete an object storage account.

Use your S3 compatible utility to delete buckets. It is not possible to delete buckets from NetApp Service Engine.
HTTP Method Path Description Parameters

Delete

/v2.1/objectstorage/accounts/{id}

Delete an object storage account.

id (string): The object storage account ID.

Required request body attributes: none

Request body example:

{
  "name": "MyTenant - MyNewSubtenant",
  "subtenant_id": "5ecefbbef418b40001f20bd6",
  "quota_gb": 30
}

Response body example:

{
  "status": {
    "user_message": "string",
    "verbose_message": "string",
    "code": "string"
  },
  "result": {
    "returned_records": 1,
    "records": [
      {
        "id": "5d2fb0fb4f47df00015274e3",
        "action": "string",
        "object_id": "5d2fb0fb4f47df00015274e3",
        "object_type": "string",
        "status": "string",
        "status_detail": "string",
        "last_error": "string",
        "user_id": "5d2fb0fb4f47df00015274e3",
        "link": "string"
      }
    ]
  }
}

Object storage buckets

Use the APIs in the following table to create and retrieve object storage buckets.

HTTP Method Path Description

GET

/v2.1/objectstorage/buckets

Retrieve object storage buckets.

POST

/v2.1/objectstorage/buckets

Create an object storage bucket.

Object storage bucket attributes

The following table lists the object storage bucket attributes.

Attribute Type Description

id

String

The unique identifier for the object storage user.

Name

String

The bucket name.

subtenant_id

String

The identifier of the subtenant to which the bucket belongs.

Retrieve S3 buckets

Use the method listed in the following table to retrieve S3 buckets.

HTTP Method Path Description Parameters

GET

/v2.1/objectstorage/buckets

Retrieve S3 buckets.

Subtenant_id: The subtenant that owns the bucket.

Required request body attributes: none

Request body example:

none

Response body example:

{
  "status": {
    "user_message": "Okay. Returned 1 record.",
    "verbose_message": "",
    "code": 200
  },
  "result": {
    "returned_records": 1,
    "records": [
      {
        "creationTime": "2020-06-02T08:13:25.695Z",
        "name": "mybucket"
      }
    ]
  }
}

Create S3 buckets

Use the method listed in the following table to create an S3 bucket.

Before you can create a bucket, an object storage account for the subtenant must exist.
HTTP Method Path Description Parameters

POST

/v2.1/objectstorage/buckets

Create an S3 bucket.

None

Required request body attributes:

  • name (string): S3 bucket name (lowercase or numeric characters only)

  • subtenant_id (string): ID of the subtenant to which the S3 bucket belongs

Request body example:

{
  "name": "mybucket",
  "subtenant_id": "5ecefbbef418b40001f20bd6"
}

Response body example:

{
  "status": {
    "user_message": "Okay. Accepted for processing.",
    "verbose_message": "",
    "code": 202
  },
  "result": {
    "returned_records": 1,
    "records": [
      {
        "id": "5ed60a232c356a0001a7389e",
        "action": "create",
        "job_summary": "Create request is successfully submitted",
        "created": "2020-06-02T08:13:23.105015108Z",
        "updated": "2020-06-02T08:13:23.105015108Z",
        "object_id": "5ed60a232c356a0001a7389f",
        "object_type": "sg_buckets",
        "object_name": "mybucket",
        "status": "pending",
        "status_detail": "",
        "last_error": "",
        "user_id": "5ec626c0f038943eb46b0af1",
        "job_tasks": null
      }
    ]
  }
}