Updated on 2022-09-15 GMT+08:00

Creating a Service Catalog

Description

This API is used to create a service catalog. The ID of the root directory is 0.

URL

  • URI format

    POST /v1/{project_id}/service/servicecatalogs

  • Parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID. For details about how to obtain the project ID, see Project ID and Account ID.

Request Message

  • Example request
    {
      "pid": "8c9850726a1ee050be2b67e43c688870",
      "name": "demo",
      "description": "this is a demo"
    }
  • Request parameter description

    Parameter

    Type

    Description

    pid

    String

    Parent catalog ID

    name

    String

    Catalog name. The value contains 1 to 64 characters and can contain letters, digits, and underscores (_).

    description

    String

    Description

Response

  • Example response
    {
      "catalog_id": "2847131b4d5a26c5bd4bfd9d8f63f577",
      "name": "demo",
      "description": "this is a demo",
      "create_time": 1578284788000,
      "create_user": "Tim",
      "update_time": 1578284788000,
      "update_user": "Tim"
    }
  • Response parameter description

    Parameter

    Type

    Description

    catalog_id

    String

    Catalog ID

    name

    String

    Catalog name

    description

    String

    Description

    create_time

    Long

    Time when the catalog was created, which is a 13-digit timestamp

    create_user

    String

    Name of the creator

    update_time

    Long

    Time when the catalog was updated, which is a 13-digit timestamp

    update_user

    String

    User who updated the catalog

Status Code

Status Code

Description

200

The catalog is created successfully.

For details about status codes, see Status Codes.