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

List invitations

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

Đọc thêm: Khi có người rời điMã nguồn: OrganizationMemberApiController#invitations(mở trong thẻ mới)

Response​

Thành công: 200

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

TrườngKiểuBắt buộcGhi chú
idstring (uuid)Tùy chọn
emailstringTùy chọn
statusenum InvitationStatusTùy chọnPENDINGACCEPTEDREVOKEDEXPIRED
expiresAtstring (date-time)Tùy chọn
createdByNamestringTùy chọn
createdAtstring (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
400output_language_invalidKhu vực Account
400ui_locale_invalidKhu vực Account
400invitation_invalidKhu vực Account
400organization_slug_invalidKhu vực Account
404invitation_not_foundKhu vực Account
404member_not_foundKhu vực Account
409email_already_registeredKhu vực Account
409invitation_already_pendingKhu vực Account
409invitation_email_unavailableKhu vực Account
409organization_slug_takenKhu vực Account
409member_last_administratorKhu vực Account

Request

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

Response

200

Ví dụ

[
  {
    "id": "<uuid>",
    "email": "<string>",
    "status": "PENDING",
    "expiresAt": "<date-time>",
    "createdByName": "<string>",
    "createdAt": "<date-time>"
  }
]