All Products
Search
Document Center

Object Storage Service:Query the information about a bucket

Last Updated:Mar 20, 2026

Retrieves configuration and metadata for a specified bucket.

Prerequisites

Before you begin, ensure that you have:

Syntax

ossutil api get-bucket-info --bucket <value> [--output-format <value>] [flags]

Parameters

ParameterTypeRequiredDefaultDescription
--bucketstringYesThe name of the bucket.

For global flags (such as --profile, --endpoint, and --region), see Command-line options.

Examples

Query bucket information in the default table format:

ossutil api get-bucket-info --bucket examplebucket

Query bucket information in JSON format:

ossutil api get-bucket-info --bucket examplebucket --output-format json

Query bucket information in YAML format:

ossutil api get-bucket-info --bucket examplebucket --output-format yaml

Usage notes

  • Only the bucket owner can query bucket information. You can run this command from any Object Storage Service (OSS) endpoint.