ListWritingStyles

Updated at:

Retrieves the list of writing styles.

Try it now

You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After the call succeeds, OpenAPI Explorer can automatically generate SDK code examples.

Try it now

Authorization information

The following table describes the authorization information of the API. You can use it in the Action element of a RAM permission policy statement to grant RAM users or RAM roles the permission to call this API. For more information, see the following:

  • Action: the specific permission point.

  • Access level: the access level of each operation. Valid values: Write, Read, or List.

  • Resource type: the resource types that support authorization in the operation. For more information, see the following:

    • Required resource types are marked with a leading *.
    • For operations that do not support resource-level authorization, All resources is used.
  • Condition key: the condition keys defined by the cloud service itself.

  • Dependent action: the other permissions required to successfully perform the operation. The caller must have the permissions of the dependent actions at the same time for the operation to succeed.

ActionAccess levelResource typeCondition keyDependent action
aimiaobi:ListWritingStyleslist
*All resources
*
    None
None

Request parameters

NameTypeRequiredDescriptionExample value
WorkspaceIdstringYesllm-xxxxx
ScenestringYes

Filters by writing scenario.

Valid values:
  • market: Marketing writing.
  • government: Official documents.
  • custom: Custom writing.
  • media: Media.
  • office: Business documents.
media
MaxResultsintegerNo

The maximum number of results to return.

100
NextTokenstringNo

Pagination token

next-page-token

Response elements

NameTypeDescriptionExample value
object

Schema of Response

RequestIdstring

Id of the request

1813ceee-7fe5-41b4-87e5-982a4d18cca5
TotalCountinteger

The total number of records.

58
MaxResultsinteger

The maximum number of results returned.

100
NextTokenstring

The next token.

next-page-token
Codestring

The error code.

successful
Messagestring

The error message.

Data does not exist
Successstring

Indicates whether the request was successful.

true
Dataarray<object>

The list of writing styles.

dataobject

The writing style object.

StyleNamestring

The name of the writing style.

Writing style name
StyleKeystring

The unique key of the writing style.

Unique key of the writing style
StyleDescriptionstring

The description of the writing style.

Writing style description
DistributeWritingboolean

Indicates whether step-by-step writing is supported.

false
StyleImagestring

The image of the writing style.

Writing style image
Emojistring

The small icon of the writing style (represented by a character symbol).

Small icon
TemplateDefineWritingStyleTemplateDefine

The template definition of the writing style.

DistributeStepTemplateDefineWritingStyleTemplateDefine

The template definition for step-by-step writing.

Examples

Success response

JSON format

{
  "RequestId": "1813ceee-7fe5-41b4-87e5-982a4d18cca5",
  "TotalCount": 58,
  "MaxResults": 100,
  "NextToken": "下一页token",
  "Code": "successful",
  "Message": "数据不存在",
  "Success": true,
  "Data": [
    {
      "StyleName": "文体名称",
      "StyleKey": "文体唯一标识",
      "StyleDescription": "文体描述",
      "DistributeWriting": false,
      "StyleImage": "文体图片\n\n",
      "Emoji": "小图标",
      "TemplateDefine": {
        "Fields": [
          {
            "MinItemLength": 1000,
            "Max": 2000,
            "MinLength": 20,
            "MaxLength": 2000,
            "MaxItemLength": 4000,
            "Name": "字段名称",
            "BuildIn": true,
            "Enums": [
              {
                "CascadingFields": [
                  "级联字段"
                ],
                "Key": "枚举KEY",
                "Name": "枚举名称"
              }
            ],
            "Min": 1,
            "Required": false,
            "MaxItem": 10,
            "InitialValue": "初始值",
            "CascadingFields": [
              {
                "MinItemLength": 1000,
                "Max": 2000,
                "MinLength": 20,
                "MaxLength": 2000,
                "MaxItemLength": 4000,
                "Name": "字段名称",
                "BuildIn": true,
                "Enums": [
                  {
                    "CascadingFields": [
                      "级联字段"
                    ],
                    "Key": "枚举KEY",
                    "Name": "枚举名称"
                  }
                ],
                "Min": 1,
                "Required": false,
                "MaxItem": 10,
                "InitialValue": "初始值",
                "CascadingFields": [
                  {
                    "MinItemLength": 1000,
                    "Max": 2000,
                    "MinLength": 20,
                    "MaxLength": 2000,
                    "MaxItemLength": 4000,
                    "Name": "字段名称",
                    "BuildIn": true,
                    "Enums": [
                      {
                        "CascadingFields": [
                          "级联字段"
                        ],
                        "Key": "枚举KEY",
                        "Name": "枚举名称"
                      }
                    ],
                    "Min": 1,
                    "Required": false,
                    "MaxItem": 10,
                    "InitialValue": "初始值",
                    "CascadingFields": [],
                    "Style": {
                      "Placeholder": "清输入Prompt",
                      "Type": "media",
                      "ShowTime": true,
                      "Suffix": "后缀",
                      "Description": "输入框提示文案",
                      "Format": "yyyy-mm-dd"
                    },
                    "Key": "topic"
                  }
                ],
                "Style": {
                  "Placeholder": "清输入Prompt",
                  "Type": "media",
                  "ShowTime": true,
                  "Suffix": "后缀",
                  "Description": "输入框提示文案",
                  "Format": "yyyy-mm-dd"
                },
                "Key": "topic"
              }
            ],
            "Style": {
              "Placeholder": "清输入Prompt",
              "Type": "media",
              "ShowTime": true,
              "Suffix": "后缀",
              "Description": "输入框提示文案",
              "Format": "yyyy-mm-dd"
            },
            "Key": "topic"
          }
        ],
        "Example": [
          {
            "Value": 123,
            "Key": "topic"
          }
        ]
      },
      "DistributeStepTemplateDefine": {
        "Fields": [],
        "Example": [
          {
            "Value": 123,
            "Key": "topic"
          }
        ]
      }
    }
  ]
}

Error codes

For more error codes, visit Error Center.