Creating an Application Template
Function
This API is used to create an application template.
URI
POST /v2/{project_id}/edgemgr/apps
Parameter |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Project ID. For details about how to obtain a project ID, see Obtaining a Project ID. |
Request
Request parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
Yes |
String |
Message body type (format). The default value application/json is recommended. |
X-Auth-Token |
Yes |
String |
User token. The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
app |
Yes |
Table 4 object |
Application template information. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Application template name. The value contains a maximum of 32 characters starting and ending with a letter or digit. Only lowercase letters, digits, and hyphens (-) are allowed. 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. |
Example request
{ "app": { "name": "ief-application-test", "alias": "test", "description": "This is an application test", "icon_url": null, "tags": [ { "key": "ief-application-type", "value": "test" } ] } }
Response
Parameter |
Type |
Description |
---|---|---|
app |
Table 6 object |
Application template details. |
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. |
project_id |
String |
Project ID. |
visibility |
String |
Template type. |
app_versions |
Table 17 object |
Application version information. |
Example response
{ "app": { "name": "test-app-1", "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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot