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

List category suggestions

GET/api/category-suggestions
Quản trị viênChỉ đọc

Đọc hướng dẫnMã nguồn: CategoryApiController#suggestions(mở trong thẻ mới)

Tham số truy vấn​

TênKiểuBắt buộcGhi chú
statusenum CategorySuggestionStatusTùy chọnPENDING_REVIEWAPPROVEDMAPPEDREJECTED

Response​

Thành công: 200

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

TrườngKiểuBắt buộcGhi chú
idstring (uuid)Tùy chọn
projectIdstring (uuid)Tùy chọn
changeIdstring (uuid)Tùy chọn
proposedCodestringTùy chọn
proposedNamestringTùy chọn
proposedGroupenum CategoryGroupTùy chọnFEATUREFIXPERFORMANCEDOCUMENTATIONMAINTENANCEOTHER
rationalestringTùy chọn
statusenum CategorySuggestionStatusTùy chọnPENDING_REVIEWAPPROVEDMAPPEDREJECTED
resolvedCodestringTùy chọn
deciderNamestringTùy chọn
createdAtstring (date-time)Tùy chọn
decidedAtstring (date-time)Tù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
400invalid_change_filterKhu vực Changes
400invalid_change_reviewKhu vực Changes
400invalid_sensitive_pathsKhu vực Changes
404change_not_foundKhu vực Changes
404duplicate_candidate_not_foundKhu vực Changes
409change_processingKhu vực Changes
409change_not_eligible_for_aiKhu vực Changes
409duplicate_candidate_decidedKhu vực Changes
409change_excludedKhu vực Changes
409change_in_releaseKhu vực Changes
502ai_classification_failedKhu vực Changes
503ai_classification_unavailableKhu vực Changes
404category_not_foundKhu vực Categories
404category_suggestion_not_foundKhu vực Categories
409category_code_takenKhu vực Categories
409category_systemKhu vực Categories
409category_suggestion_decidedKhu vực Categories

Request

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

Response

200

Ví dụ

[
  {
    "id": "<uuid>",
    "projectId": "<uuid>",
    "changeId": "<uuid>",
    "proposedCode": "<string>",
    "proposedName": "<string>",
    "proposedGroup": "FEATURE",
    "rationale": "<string>",
    "status": "PENDING_REVIEW",
    "resolvedCode": "<string>",
    "deciderName": "<string>",
    "createdAt": "<date-time>",
    "decidedAt": "<date-time>"
  }
]