Lists all namespaces in a specified table bucket.
Usage notes
-
You can filter namespaces by name prefix with the
prefixparameter. -
The
maxNamespacesparameter controls the maximum number of namespaces per response. Default: 1000. -
A
continuationTokenin the response indicates more results are available. Pass it in the next request to paginate.
Permissions
|
API |
Action |
Description |
|
ListNamespaces |
oss:ListNamespaces |
Lists namespaces. |
Request syntax
GET /namespaces/{tableBucketARN} HTTP/1.1
Host: cn-hangzhou.oss-tables.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue
Request parameters
|
Parameter |
Type |
Required |
Example |
Description |
|
tableBucketARN |
String |
Yes |
acs:osstables:cn-hangzhou:1234567890:bucket/my-table-bucket |
The ARN of the table bucket. Format: |
|
continuationToken |
String |
No |
xxx |
Token from a previous truncated response. Use it to retrieve the next page. |
|
maxNamespaces |
Integer |
No |
10 |
Maximum number of namespaces to return. Valid values: 1 to 1000. Default: 1000. Query parameter. |
|
prefix |
String |
No |
my_ |
Filters results to namespaces whose names start with this prefix. Query parameter. |
Response parameters
|
Parameter |
Type |
Example |
Description |
|
namespaces |
Array |
- |
List of namespace objects. Each object contains |
|
continuationToken |
String |
xxx |
Returned only when results are truncated. Use this token to retrieve the next page. |
Examples
Request example
GET /namespaces/acs%3Aosstables%3Acn-hangzhou%3A1234567890%3Abucket%2Fmy-table-bucket?maxNamespaces=10 HTTP/1.1
Host: cn-hangzhou.oss-tables.aliyuncs.com
Date: Thu, 10 Apr 2025 08:00:00 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/osstables/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c****
Response example
HTTP/1.1 200 OK
Server: AliyunOSS
x-oss-request-id: 5C06A3B67B8B5A3DA422****
x-oss-server-time: 3
Content-Type: application/json
{
"continuationToken": "xxxxx",
"namespaces": [
{
"namespace": ["my_namespace"],
"namespaceId": "ns-xxxxxxxx",
"tableBucketId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"ownerAccountId": "1234567890",
"createdAt": "2024-01-01T00:00:00.000000Z",
"createdBy": "1234567890"
}
]
}
SDKs
Available SDKs:
ossutil CLI
The equivalent ossutil command is list-namespaces.
Error codes
|
Error code |
HTTP status code |
Description |
|
BadRequestException |
400 |
The request is invalid or malformed. |
|
ForbiddenException |
403 |
Access denied. The caller lacks the required permissions. |
|
NotFoundException |
404 |
The requested resource does not exist. |