Creating an Application Template

Function

This API is used to create an application template.

URI

POST /v2/{project_id}/edgemgr/apps

Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Project ID. For details about how to obtain a project ID, see Obtaining a Project ID.

Request

Table 2 Parameters in the request body

Parameter

Mandatory

Type

Description

app

Yes

Table 3 object

Application template information.

Table 3 app

Parameter

Mandatory

Type

Description

name

Yes

String

Application template name. The value contains a maximum of 32 characters. Only letters, digits, and hyphens (-) are allowed. The value must begin and end with a digit or letter.

This parameter is mandatory and must be unique in the account.

alias

No

String

Application template alias. The value contains a maximum of 64 characters. Only letters, digits, hyphens (-), and underscores (_) are allowed.

description

No

String

Application template description. The value contains a maximum of 255 characters. The following characters are not allowed: ^~#$%&*<>()[]{}'"\

icon_url

No

String

URL of the application icon. The value contains a maximum of 2,083 characters.

tags

No

Array of Table 27 objects

Application template tags.

Request example:

{
	"app": {
		"name": "ief-application-test",
		"alias": "test",
		"description": "This is an application test",
		"icon_url": null,
		"tags": [
			{
				"key": "ief-application-type",
				"value": "test"
			}
		]
	}
}

Response

Response parameters
Table 4 Parameter description

Parameter

Type

Description

app

Table 5 object

Application template details.

Table 5 app

Parameter

Type

Description

id

String

Application template ID.

name

String

Application template name.

alias

String

Application template alias.

description

String

Application template description.

icon_url

String

URL of the application icon. The value contains a maximum of 2,083 characters.

created_at

String

Time when the application is created.

updated_at

String

Time when the application is updated.

project_id

String

Project ID.

svc_type

String

Cloud service type corresponding to the application template.

visibility

String

Template type.

app_versions

Table 17 object

Application version information.

Response example:

{
    "app":{
        "name":"test-app-1",
        "svc_type":"flink",
        "icon_url":null,
        "created_at":"2018-05-26T08:41:33",
        "updated_at":null,
        "visibility":null,
        "alias":null,
        "project_id":"{project_id}",
        "id":"6c2c5f97-5c1d-408e-a0ee-c35c287afefe",
        "description":"test",
        "app_versions":[

        ]
    }
}

Error Codes

For details, see Error Codes.