Skip to main content

REST endpoints: Object stores and access keys

REST

These endpoints:endpoints mirror the CLI commands described in Object stores, Access keys. Each endpoint runs the CLI command named under its heading, so the behavior, defaults, and restrictions are the same; this page lists how to call it over REST.

Conventions that apply to every endpoint (request format, the async and outputType parameters, and the response envelope) are in Requests and responses. In the tables below, Required is Yes when the parameter must always be supplied, No when it is optional, and Depends when it is required only in some combinations (for example, either an application and volume, or a consistency group ID); the CLI chapter for the same command explains the combinations.

POST /applications/objects/access_keys/create

Create an object access key.

CLI command: applications objects access_keys create

Body fields (JSON)

Name Type Required Description AccessKey string Yes The name of the access key. SecretKey string Yes The secret key for the access key (at least 8 characters). Role string Yes The user's permissions: Admin (administrator) or Regular (r/w inside permitted buckets only).

DELETE /applications/objects/access_keys/delete

Delete an object access key.

CLI command: applications objects access_keys delete

Query parameters

Name Type Required Description name string Yes The access key to delete.

PUT /applications/objects/access_keys/edit

Edit an object access key.

CLI command: applications objects access_keys edit

Query parameters

Name Type Required Description accessKey string Yes The access key to edit.

Body fields (JSON)

Name Type Required Description AccessKey string Yes The access key to edit. SecretKey string No The new secret key (at least 8 characters). Leave empty to keep the current secret key. Role string No The new permissions: Admin or Regular. Leave empty to keep the current permissions. Force boolean No Skip the confirmation prompt when this access key is used by an object store.

GET /applications/objects/access_keys/list

List object access keys.

CLI command: applications objects access_keys list

Query parameters

Name Type Required Description accessKey string No Filter results by access key. showSecretKeys boolean No Show secret keys (requires the Admin role).

Response: a list of ObjectAccessKeyElement objects in Result.AccessKey, each with: AccessKey (string), Role (string), SecretKey (string), EncryptedSecretKey (string), Force (boolean).

PUT /applications/objects/stores/access_keys/add

Add access keys to an object store.

CLI command: applications objects stores access_keys add

Body fields (JSON)

Name Type Required Description Application string Yes The name of the application that contains the object store. Volume string Yes The name of the volume that contains the object store. AccessKeys array of string Yes The access keys to grant access to the object store.

DELETE /applications/objects/stores/access_keys/delete

Remove access keys from an object store.

CLI command: applications objects stores access_keys delete

Query parameters

Name Type Required Description application string Yes The name of the application that contains the object store. volume string Yes The name of the volume that contains the object store. accessKeys array of string Yes The access keys to remove from the object store.

POST /applications/objects/stores/create

Create an object store on a specific volume.

CLI command: applications objects stores create

Body fields (JSON)

Name Type Required Description ObjectProvider string No The underlying object storage engine/provider for this volume. Defaults to SeaWeedFS. Application string Yes The name of the application the object store will be created in. Volume string Yes The name of the volume on which the object store will be created. StripedVolumes array of string No Stripe this object store over additional volumes. FloatingIp string Yes The floating IP to use for this object store. Port integer Yes The TCP port for this object store. EnableSsl boolean No Enable using SSL. AdminAccessKeys array of string Yes Admin access keys with access to this object store. RegularAccessKeys array of string No Regular (non-admin) access keys with access to this object store. Support_iam_credentials boolean No Allow admin access keys to create IAM users that can connect to this object store. Editable_iam_credentials boolean No Allow IAM users to create, edit, delete, or assign policies.

PUT /applications/objects/stores/edit

Edit an object store.

CLI command: applications objects stores edit

Query parameters

Name Type Required Description application string Yes The name of the application that contains the object store. volume string Yes The name of the volume that contains the object store.

Body fields (JSON)

Name Type Required Description StripedVolumes array of string No Expand the object store with additional volumes. FloatingIp string No The new floating IP to use for this object store. Port integer No The new TCP port for this object store. EnableSsl boolean No Enable using SSL. In REST one field covers a pair of CLI flags: true applies --enableSsl, false applies --disableSsl, and omitting the field applies neither. AdminAccessKeys array of string No Admin access keys with access to this object store. RegularAccessKeys array of string No Regular (non-admin) access keys with access to this object store. Support_iam_credentials boolean No Allow admin access keys to create IAM users that can connect to this object store. In REST one field covers a pair of CLI flags: true applies --support_iam_credentials, false applies --do_not_support_iam_credentials, and omitting the field applies neither. Editable_iam_credentials boolean No Allow IAM users to create, edit, delete, or assign policies. In REST one field covers a pair of CLI flags: true applies --editable_iam_credentials, false applies --do_not_support_editable_iam_credentials, and omitting the field applies neither.

GET /applications/objects/stores/list

List object stores.

CLI command: applications objects stores list

Query parameters

Name Type Required Description application string No Filter by the application that contains the object store. volume string No Filter by the volume that contains the object store.

Response: a list of ObjectStoreElement objects in Result.Objects, each with: Application (string), Volume (string), ObjectProvider (string), StripedVolumes (array of string), IP (string), FloatingIp (string), Port (integer), EnableSsl (boolean), Support_iam_credentials (boolean), Editable_iam_credentials (boolean), AdminAccessKeys (array of string), RegularAccessKeys (array of string).

GET /applications/objects/stores/metrics

View metrics for an object store.

CLI command: applications objects stores metrics

Query parameters

Name Type Required Description application string Yes The name of the application that contains the object store. volume string Yes The name of the volume that contains the object store.

Response: a list of ObjectStoreElement objects in Result, each with: Application (string), Volume (string), ObjectProvider (string), StripedVolumes (array of string), IP (string), FloatingIp (string), Port (integer), EnableSsl (boolean), Support_iam_credentials (boolean), Editable_iam_credentials (boolean), AdminAccessKeys (array of string), RegularAccessKeys (array of string).


See also: Requests and responses - Authentication - Examples