All Products
Search
Document Center

Create a namespace

Last Updated: May 28, 2018

Description

Create a namespace.

Request information

Request line

  1. PUT /namespace HTTP/1.1

Request line parameters (URI parameters)

None.

Special request header

None.

Request body

Request body is as follows:

  1. {
  2. "Namespace": {
  3. "Namespace": "String",
  4. }
  5. }

Request body explanation

Name Type Required Description
Namespace String Yes The name of the namespace to be created. The name can be 2-30 characters in length, and contain lowercase letters, numbers, hyphens (-), and underscores (_). The name cannot start with hyphens and underscores.

Response information

Response line

  1. HTTP/1.1 200 OK

Special response header

None.

Response body

  1. {
  2. "data":{
  3. "namespaceId":Long
  4. },
  5. "requestId":"String"
  6. }

Example

Request example

  1. PUT /namespace HTTP/1.1
  2. <Common request header>
  3. {
  4. "Namespace": {
  5. "Namespace": "aliyun",
  6. }
  7. }

Response example

  1. HTTP/1.1 200 OK
  2. <Common response header>
  3. {
  4. "data": {},
  5. "requestId": "589EA3A1-9A67-4B82-95E5-11B1740178D1"
  6. }