CreateApplication - Create an application

Updated at:

Applicable versions

Central Edition, Region Edition

Endpoint and authorization information

  • Obtain an endpoint. Replace the {domain} placeholder in the API request syntax with the endpoint.
  • Obtain a personal access token.
  • Obtain the organizationId. This is required only for the Central Edition. You can obtain the organization ID on the Basic Information page in the Tenant Management console.

Product

Resource

Required permission

Application Delivery

Application

Read/Write

Request syntax

Central Edition

POST https://{domain}/oapi/v1/appstack/organizations/{organizationId}/apps

Region Edition

POST https://{domain}/oapi/v1/appstack/apps

Request headers

Parameter

Type

Required

Description

Example

x-yunxiao-token

string

Yes

Personal access token.

pt-0fh3****0fbG_35af****0484

Request parameters

Parameter

Type

Location

Required

Description

Example

organizationId

string

path

  • Yes: Central Edition

  • No: Region Edition

Organization ID.

ec766e63aee3437d9a51f334d6exe671

-

object

body

No

Application creation request.

appTemplateName

string

body

No

The unique name of the application template.

my-app-template

description

string

body

No

The description of the application.

This is an application description

name

string

body

Yes

The name of the application.

my-web-service

ownerId

string

body

No

The ID of the application owner.

bd9e3c6d-624f-4580-af7d-c5e26f1ed0f0

tags

array[string]

body

No

The application tags. This parameter overwrites all existing tags. Omit this parameter if you do not want to update the tags. An empty list clears all tags.

["backend service", "Java"]

Request examples

Central Edition

curl -X 'POST' \
  'https://{domain}/oapi/v1/appstack/organizations/ec766e63aee3437d9a51f334d6exe671/apps' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
  --data '
    {
        "appTemplateName": "my-app-template",
        "description": "This is an application description",
        "name": "my-web-service",
        "ownerId": "bd9e3c6d-624f-4580-af7d-c5e26f1ed0f0",
        "tags": ["backend service", "Java"]
    }'

Region Edition

curl -X 'POST' \
  'https://{domain}/oapi/v1/appstack/apps' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
  --data '
    {
        "appTemplateName": "my-app-template",
        "description": "This is an application description",
        "name": "my-web-service",
        "ownerId": "bd9e3c6d-624f-4580-af7d-c5e26f1ed0f0",
        "tags": ["backend service", "Java"]
    }'

Response parameters

Parameter

Type

Description

Example

-

object

The AppStack application model.

appTemplateDisplayName

string

The display name of the application template.

app-template-display-name

appTemplateName

string

The name of the application template.

app-template-name

creatorId

string

The ID of the application creator.

bd9e3c6d-624f-4580-af7d-c5e26f1ed0f0

description

string

The description.

description

gmtCreate

string

The time when the application was created.

2024-09-01 00:00:00

name

string

The name of the application.

app-name

tags

array[string]

The tags.

['java']

Response example

{
    "appTemplateDisplayName": "app-template-display-name",
    "appTemplateName": "app-template-name",
    "creatorId": "bd9e3c6d-624f-4580-af7d-c5e26f1ed0f0",
    "description": "description",
    "gmtCreate": "2024-09-01 00:00:00",
    "name": "app-name",
    "tags": ['java']
}

Error codes

For information about API error codes, see the Error Code Center.