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

Get glossary

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

POST /api/glossary/kept-terms thêm tất cả thuật ngữ hoặc không thêm gì. GET /api/glossary trả về keptTerms, translations, entryLimit và pairs: với mỗi cặp ngôn ngữ mà Organization dịch, entryCount và status là empty, not_synced, pending, synced, outdated (đã sửa từ lần đồng bộ trước), unsupported, hoặc failed kèm error.

Đọc thêm: Bảng thuật ngữMã nguồn: GlossaryApiController#glossary(mở trong thẻ mới)

Response​

Thành công: 200

TrườngKiểuBắt buộcGhi chú
keptTermsarray of KeptTermViewTùy chọn
keptTerms[].idstring (uuid)Tùy chọn
keptTerms[].termstringTùy chọn
keptTerms[].creatorNamestringTùy chọn
keptTerms[].createdAtstring (date-time)Tùy chọn
translationsarray of FixedTranslationViewTùy chọn
translations[].idstring (uuid)Tùy chọn
translations[].sourceLanguagestringTùy chọn
translations[].targetLanguagestringTùy chọn
translations[].sourceTermstringTùy chọn
translations[].targetTermstringTùy chọn
translations[].creatorNamestringTùy chọn
translations[].createdAtstring (date-time)Tùy chọn
pairsarray of GlossaryPairViewTùy chọn
pairs[].sourceLanguagestringTùy chọn
pairs[].targetLanguagestringTùy chọn
pairs[].entryCountintegerTùy chọn
pairs[].statusstringTùy chọn
pairs[].errorstringTùy chọn
pairs[].updatedAtstring (date-time)Tùy chọn
entryLimitintegerTù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
400template_invalidKhu vực Audiences
400template_narratives_pathKhu vực Audiences
400template_language_not_targetedKhu vực Audiences
400invalid_release_languagesKhu vực Audiences
404audience_not_foundKhu vực Audiences
409audience_code_takenKhu vực Audiences
409audience_limitKhu vực Audiences
409audience_lastKhu vực Audiences
409audience_last_activeKhu vực Audiences
409audience_already_retiredKhu vực Audiences
409audience_not_retiredKhu vực Audiences
409audience_in_useKhu vực Audiences
409audience_not_presetKhu vực Audiences
404glossary_term_not_foundKhu vực Glossary
409glossary_term_takenKhu vực Glossary
409glossary_limitKhu vực Glossary
400invalid_release_scheduleKhu vực Releases
400invalid_upgrade_guide_urlKhu vực Releases
400invalid_previous_releaseKhu vực Releases
400invalid_fold_decisionKhu vực Releases
404release_not_foundKhu vực Releases
404release_note_not_foundKhu vực Releases
404folding_suggestion_not_foundKhu vực Releases
404linked_issue_not_foundKhu vực Releases
409release_status_conflictKhu vực Releases
409release_publishedKhu vực Releases
409release_emptyKhu vực Releases
409release_review_incompleteKhu vực Releases
409change_summary_requiredKhu vực Releases
409release_version_takenKhu vực Releases
409classification_changedKhu vực Releases
409change_not_releasableKhu vực Releases
409change_excludedKhu vực Releases
409release_note_render_failedKhu vực Releases
409release_notes_missingKhu vực Releases
409translations_not_readyKhu vực Releases
409linked_issue_status_changedKhu vực Releases

Request

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

Response

200

Ví dụ

{
  "keptTerms": [
    {
      "id": "<uuid>",
      "term": "<string>",
      "creatorName": "<string>",
      "createdAt": "<date-time>"
    }
  ],
  "translations": [
    {
      "id": "<uuid>",
      "sourceLanguage": "<string>",
      "targetLanguage": "<string>",
      "sourceTerm": "<string>",
      "targetTerm": "<string>",
      "creatorName": "<string>",
      "createdAt": "<date-time>"
    }
  ],
  "pairs": [
    {
      "sourceLanguage": "<string>",
      "targetLanguage": "<string>",
      "entryCount": 0,
      "status": "<string>",
      "error": "<string>",
      "updatedAt": "<date-time>"
    }
  ],
  "entryLimit": 0
}