SwitchCommand - 启用/禁用自定义指令
启用/禁用自定义指令。
服务接入点与授权信息
请求语法
PUT https://{domain}/oapi/v1/lingma/organizations/{organizationId}/commands/{commandId}/switch
请求头
参数 |
类型 |
是否必填 |
描述 |
示例值 |
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 |
是 |
启用/禁用指令。 |
|
status |
string |
body |
是 |
指令状态。 |
enabled/disabled |
请求示例
curl -X PUT \
'https://test.rdc.aliyuncs.com/oapi/v1/lingma/organizations/{organizationId}/commands/{commandId}/switch' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '{
"operatorId": "",
"command": {
"status": ""
}
}'
返回参数
参数 |
类型 |
描述 |
示例值 |
- |
object |
|
|
success |
boolean |
是否成功。 |
|
返回示例
{
"success": true
}
错误码
访问错误码中心查看 API 相关错误码。