Queries the information of a namespace in an instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetNamespace

The operation that you want to perform. Set the value to GetNamespace.

InstanceId String Yes cri-kmsiwlxxdcvaduwb

The ID of the instance.

NamespaceName String Yes test

The name of the namespace.

RegionId String Yes cn-shanghai

The ID of the region where the instance resides.

NamespaceId String No crn-tiw8t3f8i5lta4uv

The ID of the namespace.

Response parameters

Parameter Type Example Description
IsSuccess Boolean true

Indicates whether the operation is successful.

Code String success

The code returned for the request.

RequestId String E4BC9E21-8AA5-4582-83C1-C1209AB8196F

The ID of the request.

NamespaceName String test

The name of the namespace.

NamespaceStatus String NORMAL

The status of the namespace.

AutoCreateRepo Boolean true

Indicates whether a repository is automatically created when an image is pushed to the namespace.

DefaultRepoType String PUBLIC

The default type of the repository created in the namespace. Valid values: PUBLIC and PRIVATE.

InstanceId String cri-kmsiwlxxdcvaduwb

The ID of the instance.

NamespaceId String crn-tiw8t3f8i5lta4uv

The ID of the namespace.

Examples

Sample requests

http(s)://[Endpoint]/? Action=GetNamespace
&InstanceId=cri-kmsiwlxxdcvaduwb
&NamespaceName=test
&RegionId=cn-shanghai
&<Common request parameters>

Sample success responses

JSON format

{
    "AutoCreateRepo": "true",
    "Code": "success",
    "DefaultRepoType": "PUBLIC",
    "InstanceId": "cri-kmsiwlxxdcvaduwb",
    "IsSuccess": "true",
    "NamespaceName": "test",
    "NamespaceId": "crn-tiw8t3f8i5lta4uv",
    "NamespaceStatus": "NORMAL",
    "RequestId": "E4BC9E21-8AA5-4582-83C1-C1209AB8196F"
}

XML format

<AutoCreateRepo>true</AutoCreateRepo>
<Code>success</Code>
<DefaultRepoType>PUBLIC</DefaultRepoType>
<InstanceId>cri-kmsiwlxxdcvaduwb</InstanceId>
<IsSuccess>true</IsSuccess>
<NamespaceName>test</NamespaceName>
<NamespcaeId>crn-tiw8t3f8i5lta4uv</NamespcaeId>
<NamespaceStatus>NORMAL</NamespaceStatus>
<RequestId>E4BC9E21-8AA5-4582-83C1-C1209AB8196F</RequestId>

Error codes

For a list of error codes, visit the API Error Center.