Disable rule
POST
/api/automation/rules/{ruleId}/disableQuản trị viên
Tham số đường dẫn
| Tên | Kiểu | Bắt buộc | Ghi chú |
|---|---|---|---|
ruleId | string (uuid) | Bắt buộc |
Response
Thành công: 200
| Trường | Kiểu | Bắt buộc | Ghi chú |
|---|---|---|---|
id | string (uuid) | Tùy chọn | |
name | string | Tùy chọn | |
triggerType | enum TriggerType | Tùy chọn | RELEASE_PUBLISHEDMANUALSCHEDULED_CRONUPCOMING_RELEASE_REMINDEREXTERNAL_WEBHOOK |
projectId | string (uuid) | Tùy chọn | |
projectName | string | Tùy chọn | |
triggerReleaseId | string (uuid) | Tùy chọn | |
cronExpression | string | Tùy chọn | |
cronTimeZone | string | Tùy chọn | |
nextFireAt | string (date-time) | Tùy chọn | |
reminderDaysBefore | integer | Tùy chọn | |
webhookPath | string | Tùy chọn | |
webhookSecretConfigured | boolean | Tùy chọn | |
webhookSecret | string | Tùy chọn | |
enabled | boolean | Tùy chọn | |
createdAt | string (date-time) | Tùy chọn | |
updatedAt | string (date-time) | Tùy chọn | |
actions | array of AutomationActionView | Tùy chọn | |
actions[].id | string (uuid) | Tùy chọn | |
actions[].position | integer | Tùy chọn | |
actions[].actionType | enum ActionType | Tùy chọn | GITHUB_RELEASESLACKEMAILPUBLIC_CHANGELOGNOTIONCONFLUENCEMICROSOFT_TEAMSZENDESK |
actions[].audienceId | string (uuid) | Tùy chọn | |
actions[].audienceName | string | Tùy chọn | |
actions[].language | string | Tùy chọn | |
actions[].recipients | string | Tùy chọn | |
actions[].parentPageId | string | Tùy chọn | |
actions[].siteUrl | string | Tùy chọn | |
actions[].email | string | Tùy chọn | |
actions[].spaceId | string | Tùy chọn | |
actions[].subdomain | string | Tùy chọn | |
actions[].clientId | string | Tùy chọn | |
actions[].sectionId | string | Tùy chọn | |
actions[].userSegmentId | string | Tùy chọn | |
actions[].secretConfigured | boolean | Tùy chọn | |
gitHubSourceMissing | boolean | Tùy chọn | |
deliversRetiredAudience | boolean | Tùy chọn |
Lỗi
| Trạng thái | Mã | Áp dụng cho |
|---|---|---|
400 | validation_failedthiếu trường hoặc giá trị nằm ngoài khoảng cho phép | Mọi endpoint |
400 | invalid_parametermột tham số trên đường dẫn hoặc query bị thiếu hoặc không chuyển đổi được, chẳng hạn một ID không phải UUID | Mọi endpoint |
401 | authentication_requiredchưa có phiên đăng nhập | Mọi endpoint |
403 | access_deniedendpoint dành cho quản trị viên, hoặc CSRF token thiếu hay đã cũ | Mọi endpoint |
404 | not_foundkhông có địa chỉ đó | Mọi endpoint |
405 | method_not_allowedđịa chỉ không nhận phương thức đó | Mọi endpoint |
415 | unsupported_media_typeđịa chỉ không đọc body thuộc kiểu đó | Mọi endpoint |
500 | internal_errormột lỗi ReleaseFlow không lường trước; body không bao giờ chứa exception gây ra nó | Mọi endpoint |
400, 404, 409 | Xem hướng dẫn | Khu vực Automation |
Request
bash
# Sign in first and keep the session cookie in cookies.txt (see Sessions and CSRF).
# CSRF_HEADER and CSRF_TOKEN are the headerName and token GET /api/csrf returned.
curl -X POST "http://localhost:8080/api/automation/rules/$RULE_ID/disable" \
-b cookies.txt -c cookies.txt \
-H "$CSRF_HEADER: $CSRF_TOKEN"
Response
200Ví dụ
{
"id": "<uuid>",
"name": "<string>",
"triggerType": "RELEASE_PUBLISHED",
"projectId": "<uuid>",
"projectName": "<string>",
"triggerReleaseId": "<uuid>",
"cronExpression": "<string>",
"cronTimeZone": "<string>",
"nextFireAt": "<date-time>",
"reminderDaysBefore": 0,
"webhookPath": "<string>",
"webhookSecretConfigured": false,
"webhookSecret": "<string>",
"enabled": false,
"createdAt": "<date-time>",
"updatedAt": "<date-time>",
"actions": [
{
"id": "<uuid>",
"position": 0,
"actionType": "GITHUB_RELEASE",
"audienceId": "<uuid>",
"audienceName": "<string>",
"language": "<string>",
"recipients": "<string>",
"parentPageId": "<string>",
"siteUrl": "<string>",
"email": "<string>",
"spaceId": "<string>",
"subdomain": "<string>",
"clientId": "<string>",
"sectionId": "<string>",
"userSegmentId": "<string>",
"secretConfigured": false
}
],
"gitHubSourceMissing": false,
"deliversRetiredAudience": false
}