UpdateApplication - Update application
Applicable editions | Centralized Edition, Regional Edition |
Service endpoint and authorization
- Obtain a service endpoint to replace
{domain}in the API request syntax. - Obtain a personal access token.
- Obtain an organization ID: Required only for the Centralized Edition. Go to the Basic Information page in the Organization Management console to get your organization ID.
Product | Resource | Required permission |
application delivery | application | Read/Write |
Request syntax
Centralized Edition
PUT https://{domain}/oapi/v1/appstack/organizations/{organizationId}/apps/{appName}
Regional Edition
PUT https://{domain}/oapi/v1/appstack/apps/{appName}
Request headers
Parameter | Type | Required | Description | Example |
x-yunxiao-token | string | Yes | Your personal access token. | pt-0fh3****0fbG_35af****0484 |
Request parameters
Parameter | Type | Location | Required | Description | Example |
appName | string | path | Yes | The application name. | my-web-service |
organizationId | string | path |
| The organization ID. | ec766e63aee3437d9a51f334d6exe671 |
| - | object | body | No | The application properties to update. | |
| description | string | body | No | The application description. | This is a Java backend application. |
| ownerAccountId | string | body | No | The account ID of the application owner. | 240592939923074161 |
| ownerId | string | body | No | The ID of the application owner. | bd9e3c6d-624f-4580-af7d-c5e26f1ed0f0 |
| tags | array[string] | body | No | The tags to apply to the application. This parameter performs a full replacement. To keep existing tags, omit this parameter. To clear all tags, pass an empty array ( | ["Backend service", "Java"] |
Request examples
Centralized Edition
curl -X 'PUT' \
'https://{domain}/oapi/v1/appstack/organizations/ec766e63aee3437d9a51f334d6exe671/apps/my-web-service' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"description": "This is a Java backend application.",
"ownerAccountId": "240592939923074161",
"ownerId": "bd9e3c6d-624f-4580-af7d-c5e26f1ed0f0",
"tags": ["Backend service", "Java"]
}'
Regional Edition
curl -X 'PUT' \
'https://{domain}/oapi/v1/appstack/apps/my-web-service' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"description": "This is a Java backend application.",
"ownerAccountId": "240592939923074161",
"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 of the application. | description |
| gmtCreate | string | The time the application was created. | 2024-09-01 00:00:00 |
| name | string | The application name. | app-name |
| tags | array[string] | The application's 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 a list of API error codes, see the Error Code Center.