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

Updating the nacos Namespace

Function

This API is used to update 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.

  • If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
  • If you are using identity policy-based authorization, the permission listed below is required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependency

    cse:namespace:update

    read

    engine

    cse:namespace:write

    -

URI

PUT /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

namespace

Yes

String

Namespace ID.

namespace_show_name

Yes

String

Namespace name. The value can contain a maximum of 128 characters, excluding @, #, $, %, ^, &, and *.

namespace_desc

Yes

String

Namespace description. The value can contain a maximum of 256 characters.

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

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

detail

String

Location details.

Example Request

Request form data example:

PUT https://{endpoint}/v1/{project_id}/nacos/v1/console/namespaces
customNamespaceId=namespace_id&namespaceName=namespace_name&namespaceDesc=&namespaceId=

Example Response

true

Status Code

Status Code

Description

200

OK

400

Bad Request

Error Code

See Error Codes.