CreateAppTag - Create application tag
Applicable editions | Centralized edition, region edition |
Endpoints and authorization
- Obtain the endpoint to replace the
{domain}placeholder in the API request syntax. - Obtain a personal access token.
- Obtain the organization ID: Required only for the centralized edition. Go to the organization management console and get the organization ID from the Basic Information page.
Product | Resource | Required permissions |
application delivery | application tag | Read/Write |
Request syntax
Centralized edition
POST https://{domain}/oapi/v1/appstack/organizations/{organizationId}/appTags
Region edition
POST https://{domain}/oapi/v1/appstack/appTags
Request headers
Parameter | Type | Required | Description | Example |
x-yunxiao-token | string | Yes | The personal access token. | pt-0fh3****0fbG_35af****0484 |
Request parameters
Parameter | Type | Location | Required | Description | Example |
organizationId | string | path |
| The organization ID. | ec766e63aee3437d9a51f334d6exe671 |
| - | object | body | Yes | The request body. | |
| color | string | body | Yes | The color of the application tag. Valid values are | #66acab |
| name | string | body | Yes | The application tag name. | mytag |
Request examples
Centralized edition
curl -X 'POST' \
'https://{domain}/oapi/v1/appstack/organizations/ec766e63aee3437d9a51f334d6exe671/appTags' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"color": "#66acab",
"name": "mytag"
}'
Region edition
curl -X 'POST' \
'https://{domain}/oapi/v1/appstack/appTags' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"color": "#66acab",
"name": "mytag"
}'
Response parameters
Parameter | Type | Description | Example |
| - | object | The response body. | |
| frontendStyle | string | The frontend style, provided as a JSON string that currently contains only the color information. | {"color":"#66acab"} |
| name | string | The application tag name. | mytag |
Response example
{
"frontendStyle": "{\"color\":\"#66acab\"}",
"name": "mytag"
}
Error codes
For API-related error codes, see the Error Code Center.