Queries details about a namespace.

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-kmsiwlxxdcva****

The ID of the instance.

NamespaceName String Yes test

The name of the namespace.

RegionId String Yes cn-shanghai

The ID of the region.

NamespaceId String No crn-tiw8t3f8i5lta****

The ID of the namespace.

Response parameters

Parameter Type Example Description
AutoCreateRepo Boolean true

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

Code String success

The return value.

DefaultRepoType String PUBLIC

The default type of the repository. Valid values:

  • PUBLIC
  • PRIVATE
InstanceId String cri-kmsiwlxxdcva****

The ID of the instance.

IsSuccess Boolean true

Indicates whether the operation is successful.

NamespaceId String crn-tiw8t3f8i5lt****

The ID of the namespace.

NamespaceName String test

The name of the namespace.

NamespaceStatus String NORMAL

The status of the namespace.

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

The ID of the request.

Examples

Sample requests

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

Sample success responses

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>

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"
}

Error codes

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