GetNamespace

更新时间:
复制 MD 格式

Retrieves details of a specified namespace in a table bucket.

Permissions

API

Action

Description

GetNamespace

oss:GetNamespace

Retrieves namespace information.

Request syntax

GET /namespaces/{tableBucketARN}/{namespace} 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 Table Bucket ARN. Format: acs:osstables:{region}:{accountId}:bucket/{bucketName}.

namespace

string

Yes

my_namespace

The name of the namespace.

Response parameters

Parameter

Type

Example

Description

namespace

array

["my_namespace"]

The namespace name, returned as an array.

namespaceId

string

26104520-f117-401a-9c09-94b031352251

Unique ID of the namespace.

tableBucketId

string

9cd83fc6-5f1b-420f-b1e0-f77024b7c225

Unique ID of the parent Table Bucket.

ownerAccountId

string

1234567890

Alibaba Cloud account ID of the owner.

createdAt

string

2026-01-01T00:00:00.000000+00:00

Namespace creation time in ISO 8601 format.

createdBy

string

1234567890

Alibaba Cloud account ID of the creator.

Examples

Request example

GET /namespaces/acs%3Aosstables%3Acn-hangzhou%3A1234567890%3Abucket%2Fmy-table-bucket/my_namespace 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


{
   "namespace": ["my_namespace"],
   "namespaceId": "ns-xxxxxxxx",
   "tableBucketId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
   "ownerAccountId": "1234567890",
   "createdAt": "2024-01-01T00:00:00.000000Z",
   "createdBy": "1234567890"
}

SDK

GetNamespace is available in the following SDKs:

Ossutil CLI

Equivalent ossutil command: get-namespace.

Error codes

Error code

HTTP status code

Description

ForbiddenException

403

The caller lacks the required permissions for this request.

NotFoundException

404

The requested resource does not exist.