UpdateCommand - 修改自定义指令

修改自定义指令。

服务接入点与授权信息

产品 资源 所需权限
通义灵码 自定义指令 读写

请求语法

PUT https://{domain}/oapi/v1/lingma/organizations/{organizationId}/commands/{commandId}

请求头

参数 类型 是否必填 描述 示例值
x-yunxiao-token string 个人访问令牌。 pt-0fh3****0fbG_35af****0484

请求参数

参数 类型 位置 是否必填 描述 示例值
organizationId string path 所属企业ID。
commandId string path 修改指令id。
- object body
      operatorId string body 指令操作人id
      command object body 修改指令详情
            displayName string body 指令名称。
            name string body 指令英文名称。
            description string body 指令描述。
            imageUrl string body 指令图标。
            type string body 指令类型。 prompt
            visibility string body 可见性。 public/private
            contexts array[] body 指令上下文。
                  - object body
                        identifier string body 上下文id。
                        optional string body 是否必选。 N/Y
            config string body 指令配置(prompt对应JSON字符串)。

请求示例

curl -X 'PUT' \
  'https://test.rdc.aliyuncs.com/oapi/v1/lingma/organizations/{organizationId}/commands/{commandId}' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
  --data '{
            "operatorId": "",
            "command": {
                "displayName": "",
                "name": "",
                "description": "",
                "imageUrl": "",
                "type": "",
                "visibility": "",
                "contexts": [
                    {
                        "identifier": "",
                        "optional": ""
                    }
                ],
                "config": ""
            }
        }'

返回参数

参数 类型 描述 示例值
- object
      success boolean 是否成功。

返回示例

{
    "success": true
}

错误码

访问错误码中心查看 API 相关错误码。

results matching ""

    No results matching ""