Help Center/ Cloud Service Engine/ API Reference/ Nacos API/ Querying the nacos Namespace
Updated on 2025-12-01 GMT+08:00

Querying the nacos Namespace

Function

This API is used to query the nacos namespace.

Authorization Information

Each account has all of the permissions required to call all APIs, but IAM users must have the required permissions specifically assigned.

URI

GET /v1/{project_id}/nacos/v1/console/namespaces

Table 1 Path parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID, which must be unique. The value contains 1 to 64 characters.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

offset

Yes

Integer

Page number. The value starts from 0.

limit

Yes

Integer

Page size. 0 indicates that all results are displayed on one page.

Request

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

IAM token.

x-engine-id

Yes

String

Instance ID of an exclusive microservice engine.

X-Enterprise-Project-ID

Yes

String

Enterprise project ID.

Response

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

code

Integer

Response code

data

Array of Table 5

Namespace information list.

Table 5 ListData

Parameter

Type

Description

namespace

String

Namespace name.

namespaceShowName

String

Namespace display name.

quota

number

Namespace quota.

configCount

number

Number of configurations in the namespace.

type

number

Namespace type.

  • 0: Reserved namespace
  • 1: User-created namespace

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

detail

String

Location details.

Example Request

GET https://{endpoint}/v1/{project_id}/nacos/v1/console/namespaces

Example Response

{
  "code": 200,
  "message": null,
  "data": [
  {
   "namespace": "",
   "namespaceShowName": "public",
   "quota": 200,
   "configCount": 0,
   "type": 0
   }
  ] 
}

Status Code

Status Code

Description

200

OK

400

Bad Request

Error Code

See Error Codes.