Chuyển tới nội dung chính

List rules

GET/api/automation/rules
Quản trị viênChỉ đọc

Đọc thêm: RESTMã nguồn: AutomationRuleApiController#list(mở trong thẻ mới)

Response​

Thành công: 200

Một mảng AutomationRuleView, mỗi phần tử gồm:

TrườngKiểuBắt buộcGhi chú
idstring (uuid)Tùy chọn
namestringTùy chọn
triggerTypeenum TriggerTypeTùy chọnRELEASE_PUBLISHEDMANUALSCHEDULED_CRONUPCOMING_RELEASE_REMINDEREXTERNAL_WEBHOOK
projectIdstring (uuid)Tùy chọn
projectNamestringTùy chọn
triggerReleaseIdstring (uuid)Tùy chọn
cronExpressionstringTùy chọn
cronTimeZonestringTùy chọn
nextFireAtstring (date-time)Tùy chọn
reminderDaysBeforeintegerTùy chọn
webhookPathstringTùy chọn
webhookSecretConfiguredbooleanTùy chọn
webhookSecretstringTùy chọn
enabledbooleanTùy chọn
createdAtstring (date-time)Tùy chọn
updatedAtstring (date-time)Tùy chọn
actionsarray of AutomationActionViewTùy chọn
actions[].idstring (uuid)Tùy chọn
actions[].positionintegerTùy chọn
actions[].actionTypeenum ActionTypeTùy chọnGITHUB_RELEASESLACKEMAILPUBLIC_CHANGELOGNOTIONCONFLUENCEMICROSOFT_TEAMSZENDESK
actions[].audienceIdstring (uuid)Tùy chọn
actions[].audienceNamestringTùy chọn
actions[].languagestringTùy chọn
actions[].recipientsstringTùy chọn
actions[].parentPageIdstringTùy chọn
actions[].siteUrlstringTùy chọn
actions[].emailstringTùy chọn
actions[].spaceIdstringTùy chọn
actions[].subdomainstringTùy chọn
actions[].clientIdstringTùy chọn
actions[].sectionIdstringTùy chọn
actions[].userSegmentIdstringTùy chọn
actions[].secretConfiguredbooleanTùy chọn
gitHubSourceMissingbooleanTùy chọn
deliversRetiredAudiencebooleanTùy chọn

Lỗi​

Trạng tháiMãÁp dụng cho
400validation_failedthiếu trường hoặc giá trị nằm ngoài khoảng cho phépMọi endpoint
400invalid_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 UUIDMọi endpoint
401authentication_requiredchưa có phiên đăng nhậpMọi endpoint
403access_deniedendpoint dành cho quản trị viên, hoặc CSRF token thiếu hay đã cũMọi endpoint
404not_foundkhông có địa chỉ đóMọi endpoint
405method_not_allowedđịa chỉ không nhận phương thức đóMọi endpoint
415unsupported_media_typeđịa chỉ không đọc body thuộc kiểu đóMọi endpoint
500internal_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, 409Xem hướng dẫnKhu vực Automation

Request

bash
# Sign in first and keep the session cookie in cookies.txt (see Sessions and CSRF).
curl "http://localhost:8080/api/automation/rules" \
-b cookies.txt -c cookies.txt

Response

200

Ví 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
  }
]