Manage Bucket Storage Targets
List Bucket Storage Targets
LogScale keeps a record of all the buckets that have ever been
configured, even if the bucket is not in the current configuration. For
the GET
form, this endpoint returns the
list of storage buckets that LogScale is aware of. The output
returns the list of known buckets, and a value for the storage used and
managed by LogScale within those buckets.
Description | Returns a list of the known buckets used for storage | |
Method | GET /api/v1/bucket-storage-target | |
Response Data | bucket | |
Authentication Required | yes | |
Return Codes | ||
200 | Request complete | |
400 | Bad authentication | |
500 | Request failed |
GET /api/v1/bucket-storage-target
curl -v -X GET $YOUR_LOGSCALE_URL/api/v1/bucket-storage-target \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"
[
{
"bucket": "bucket1",
"id": "1",
"keyPrefix": "logscale/",
"provider": "s3",
"readOnly": false,
"region": "us-east-1",
"segmentsUsingBucket": 1277,
"uploadedFilesUsingBucket": 1
}
]
The returned JSON has the following structure:
Table:
Field | Type | Description |
---|---|---|
bucket | string | The name of the storage bucket within the cluster |
id | integer | The ID of the storage bucket within the cluster |
keyPrefix | string | The prefix used for... |
provider | string | The provider for the storage bucket |
readOnly | boolean | If the storage bucket is read-only |
region | string | Region annotation for location of the storage bucket |
segmentsUsingBucket | integer | Number of segments using the storage bucket |
uploadedFilesUsingBucket | integer |
Number of files uploaded using the storage bucket. Includes
ReplicableFiles (class of uploaded files) and
SharedReplicableFiles (uploaded files that are
shared by all views and repos in the cluster) in the uploaded
files count.
|
Delete Bucket Storage Targets
To delete an entry for an unnecessary bucket, use the
DELETE
command, specifying the bucket
number (id from
the returned JSON). The command deletes the bucket entry if
LogScale thinks the bucket no longer contains data that is still
required by the cluster. To delete the bucket forcibly, for example,
when the bucket has been lost, set the
force
parameter to true. Note
that this will result in data loss.
Description | Deletes a bucket storage configuration | ||
Method | DELETE /api/v1/bucket-storage-target/ | ||
Authentication Required | yes | ||
Path Arguments | Description | Data type | Required? |
id | ID of the bucket storage configuration | string | required |
Query Arguments | Description | Data type | Required? |
force | Force deletion of the bucket storage configuration | boolean | optional |
Supported Values | |||
false | Deletes only if not used in an active configuration | ||
true | Force deletion even if used in an active configuration | ||
Return Codes | |||
200 | Request complete | ||
400 | Bad authentication | ||
500 | Request failed |
DELETE /api/v1/bucket-storage-target/1
DELETE /api/v1/bucket-storage-target/1?force=true
curl -v -X DELETE $YOUR_LOGSCALE_URL/api/v1/bucket-storage-target \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json"