You can call this operation to create an application.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

This operation only uses common request headers. For more information, see the Common request parameters topic.

Request syntax

POST /pop/v5/changeorder/co_create_app HTTPS|HTTP

Request parameters

Parameter Type Required Example Description
ApplicationName String Yes test

The name of the application that you want to create.

BuildPackId Integer Yes 54

The version of Enterprise Distributed Application Service (EDAS) Container where the application will be running. You can call the ListBuildPack operation to query the container version.

ClusterId String No 0d247b93-8d62-4e34**************

The ID of the cluster where you want to create the application. If you do not specify this parameter, the default cluster is used. You can call the ListCluster operation to query the cluster ID.

Description String No test api

The description of the application that you want to create.

ReservedPortStr String No ""

The reserved port for the application that you want to create. Separate multiple port numbers with commas (,). (The specified port cannot be used by other applications.)

EcuInfo String No 4f1fb6f5-6769-4bd6************

The ID of the Elastic Compute Unit (ECU) where you want to deploy the to-be-created application. Separate multiple ECU IDs with commas (,). You can call the ListScaleOutEcu operation to query the ECU ID.

Cpu Integer No 1

The number of CPUs in the ECU where you want to deploy the to-be-created application.

Mem Integer No 299

The amount of memory in the ECU where you want to deploy the to-be-created application. Unit: MB

HealthCheckURL String No ""

The URL for performing health check on the application.

LogicalRegionId String No ""

The ID of the namespace where you want to create the application. You can call the ListUserDefineRegion operation to query the namespace ID.

Jdk String No ""

The version of the Java developer's kit (JDK) that is used to create the application. Valid values: 7 and 8. Default value: 8.

WebContainer String No ""

The web container for which you want to create the application.

PackageType String No ""

The type of the package for the deployment of the application that you want to create. Valid values: WAR and JAR. We strongly recommend that you set this parameter when creating the application.

Response parameters

Parameter Type Example Description
Code Integer 200

The returned code.

Message String success

The returned message.

RequestId String DR43-F3GV******************
ApplicationInfo Struct

The information about the application that was created.

AppName String test

The name of the application that was created.

AppId String 1b8bb262-0989-4c67-****-************

The ID of the application that was created.

UserId String ""

The primary account of the user who created the application.

Owner String edas_com***_****@******-*****. ***

The account under which the application was created.

Dockerize Boolean false

Indicates whether the application is a Docker application.

Port Integer 8080

The port number of the application that was created.

RegionName String ""

The name of the region where the application is located.

ChangeOrderId String b406a3d9-f95c-4273-****-************

The ID of the change process corresponding to the application creation. You can use this ID to call the GetChangeOrderInfo operation to query details about the application creation.

Examples

Sample requests

POST /pop/v5/changeorder/co_create_app HTTP/1.1
Common request headers
{
  "ApplicationName": ""
  "BuildPackId": 
}

Sample success responses

JSON format

{
    "Message": "success",
    "ApplicationInfo": {
    "Owner": "edas_com***_****@******-*****. ***",
    "Port": 8080,
    "Dockerize": false,
    "AppId": "1b8bb262-0989-4c67-****-************",
    "ChangeOrderId": "b406a3d9-f95c-4273-****-************",
    "AppName": "testPopApi22"
},
    "Code": 200
}

XML format

<Message>success</Message>
<ApplicationInfo>
    <Owner>edas_com***_****@******-*****. ***</Owner>
    <Port>8080</Port>
    <Dockerize>false</Dockerize>
    <AppId>1b8bb262-0989-4c67-****-************</AppId>
    <ChangeOrderId>b406a3d9-f95c-4273-****-************</ChangeOrderId>
    <AppName>testPopApi22</AppName>
</ApplicationInfo>
<Code>200</Code>

Error codes

For a list of error codes, visit the API Error Center.