CreateAppTag - Create application tag

Updated at:

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

  • Yes: centralized edition

  • No: region edition

The organization ID.

ec766e63aee3437d9a51f334d6exe671

-

object

body

Yes

The request body.

color

string

body

Yes

The color of the application tag. Valid values are #66acab (teal), #7b9ab4 (blue-gray), #698cd4 (bright blue), #4676e5 (vivid blue), #5c68c1 (deep blue-violet), #9f76dA (purple), #6bAe3f (green), #ae9e6b (khaki), #a7bc60 (light green), #ae785e (brown), #eb933e (orange), and #d75644 (red).

#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.