Update callback rules¶
Update a saved callback rule.
PATCH https://moi.matrixorigin.cn/newmoi/workspaces/{workspace_id}/callback-rules/{callback_rule_id}
Before you call¶
The examples below use $AI_STUDIO_API_KEY, $WORKSPACE_ID, and $CALLBACK_RULE_ID.
Request example¶
curl -X PATCH "https://moi.matrixorigin.cn/newmoi/workspaces/$WORKSPACE_ID/callback-rules/$CALLBACK_RULE_ID" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"name": "Issue 回调",
"version": 1
}'
Request body¶
Parameters |
Type |
Is it required |
Description |
|---|---|---|---|
|
string |
No |
Callback rule name. |
|
string |
No |
Callback rule description. |
|
boolean |
No |
Whether to enable the rule. |
|
integer |
No |
Match priority. |
|
object |
No |
Matching criteria, which can include |
|
string |
No |
Callback target type. |
|
object |
No |
Callback target configuration. |
|
boolean |
No |
Whether to stop matching after hitting this rule. |
|
integer |
Yes |
The rule version to update. |
Successful response¶
Returns 200 and updated rules on success.
{"code":0,"data":{"id":"rule_01"}}
The response fields are as follows.
Field |
Type |
Description |
|---|---|---|
|
string |
Callback rule ID. |
Error response¶
{"code":5,"message":"callback rule not found"}
Last updated on