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 相关错误码。