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

List categories

GET/api/categories
Thành viên đã đăng nhậpChỉ đọc

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

Response​

Thành công: 200

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

TrườngKiểuBắt buộcGhi chú
idstring (uuid)Tùy chọn
codestringTùy chọn
displayNamestringTùy chọn
groupenum CategoryGroupTùy chọnFEATUREFIXPERFORMANCEDOCUMENTATIONMAINTENANCEOTHER
systemCategorybooleanTùy chọn
activebooleanTùy chọn
createdAtstring (date-time)Tùy chọn
updatedAtstring (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
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/categories" \
-b cookies.txt -c cookies.txt

Response

200

Ví dụ

[
  {
    "id": "<uuid>",
    "code": "<string>",
    "displayName": "<string>",
    "group": "FEATURE",
    "systemCategory": false,
    "active": false,
    "createdAt": "<date-time>",
    "updatedAt": "<date-time>"
  }
]