Updated on 2025-10-24 GMT+08:00

Create an Application

Function

An application groups identical or similar components based on service requirements.

After an application is created, you can add sub-applications and components to it.

Authorization Information

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

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    coc:application:create

    Write

    application *

    -

    -

    -

URI

POST /v1/applications

Request Parameters

Table 1 Request body parameters

Parameter

Mandatory

Type

Description

name

Yes

String

Definition:

Application name.

Constraints:

The value consists of letters, digits, hyphens (-), and underscores (_).

Value Range:

The value is a string with 3 to 50 characters.

Default value:

N/A

parent_id

No

String

Definition:

Parent node ID.

Constraints:

N/A

Value Range:

If you query the projects created by yourself, the project ID of the region is returned.

Default value:

N/A

description

No

String

Definition:

Description.

Constraints:

N/A

Value Range:

The value can be customized and contains 1 to 256 characters.

Default value:

N/A

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

data

String

Definition:

UUID allocated by COC-CMDB.

Value Range:

N/A

Example Requests

This API is used to create an application in the application management module.

POST https://{Endpoint}/v1/applications

{
  "parent_id" : "67e3b885ef614c77c8b76f49",
  "name" : "Test application",
  "description" : "Test application"
}

Example Responses

Status code: 200

The application is created.

{
  "data" : {
    "id" : "685d07b102a50263fb2c209d",
    "name" : "Test application",
    "code" : null,
    "domainId" : "dc2d76541f754d68a4c8d150262d92c2",
    "description" : "Test application",
    "parentId" : "67e3b885ef614c77c8b76f49",
    "path" : "6835d67559221e2d9a6bfa1b.6895bab5e86fed4474120a77",
    "isCollection" : null,
    "collectionUserIdList" : null,
    "createTime" : "2025-08-08T08:52:05.949+00:00",
    "updateTime" : "2025-08-08T08:52:05.949+00:00"
  }
}

Status Codes

Status Code

Description

200

The application is created.

Error Codes

See Error Codes.