Get glossary
GET
/api/glossaryThà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.
Response
Thành công: 200
| Trường | Kiểu | Bắt buộc | Ghi chú |
|---|---|---|---|
keptTerms | array of KeptTermView | Tùy chọn | |
keptTerms[].id | string (uuid) | Tùy chọn | |
keptTerms[].term | string | Tùy chọn | |
keptTerms[].creatorName | string | Tùy chọn | |
keptTerms[].createdAt | string (date-time) | Tùy chọn | |
translations | array of FixedTranslationView | Tùy chọn | |
translations[].id | string (uuid) | Tùy chọn | |
translations[].sourceLanguage | string | Tùy chọn | |
translations[].targetLanguage | string | Tùy chọn | |
translations[].sourceTerm | string | Tùy chọn | |
translations[].targetTerm | string | Tùy chọn | |
translations[].creatorName | string | Tùy chọn | |
translations[].createdAt | string (date-time) | Tùy chọn | |
pairs | array of GlossaryPairView | Tùy chọn | |
pairs[].sourceLanguage | string | Tùy chọn | |
pairs[].targetLanguage | string | Tùy chọn | |
pairs[].entryCount | integer | Tùy chọn | |
pairs[].status | string | Tùy chọn | |
pairs[].error | string | Tùy chọn | |
pairs[].updatedAt | string (date-time) | Tùy chọn | |
entryLimit | integer | Tùy chọn |
Lỗi
| Trạng thái | Mã | Áp dụng cho |
|---|---|---|
400 | validation_failedthiếu trường hoặc giá trị nằm ngoài khoảng cho phép | Mọi endpoint |
400 | invalid_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 UUID | Mọi endpoint |
401 | authentication_requiredchưa có phiên đăng nhập | Mọi endpoint |
404 | not_foundkhông có địa chỉ đó | Mọi endpoint |
405 | method_not_allowedđịa chỉ không nhận phương thức đó | Mọi endpoint |
415 | unsupported_media_typeđịa chỉ không đọc body thuộc kiểu đó | Mọi endpoint |
500 | internal_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 | template_invalid | Khu vực Audiences |
400 | template_narratives_path | Khu vực Audiences |
400 | template_language_not_targeted | Khu vực Audiences |
400 | invalid_release_languages | Khu vực Audiences |
404 | audience_not_found | Khu vực Audiences |
409 | audience_code_taken | Khu vực Audiences |
409 | audience_limit | Khu vực Audiences |
409 | audience_last | Khu vực Audiences |
409 | audience_last_active | Khu vực Audiences |
409 | audience_already_retired | Khu vực Audiences |
409 | audience_not_retired | Khu vực Audiences |
409 | audience_in_use | Khu vực Audiences |
409 | audience_not_preset | Khu vực Audiences |
404 | glossary_term_not_found | Khu vực Glossary |
409 | glossary_term_taken | Khu vực Glossary |
409 | glossary_limit | Khu vực Glossary |
400 | invalid_release_schedule | Khu vực Releases |
400 | invalid_upgrade_guide_url | Khu vực Releases |
400 | invalid_previous_release | Khu vực Releases |
400 | invalid_fold_decision | Khu vực Releases |
404 | release_not_found | Khu vực Releases |
404 | release_note_not_found | Khu vực Releases |
404 | folding_suggestion_not_found | Khu vực Releases |
404 | linked_issue_not_found | Khu vực Releases |
409 | release_status_conflict | Khu vực Releases |
409 | release_published | Khu vực Releases |
409 | release_empty | Khu vực Releases |
409 | release_review_incomplete | Khu vực Releases |
409 | change_summary_required | Khu vực Releases |
409 | release_version_taken | Khu vực Releases |
409 | classification_changed | Khu vực Releases |
409 | change_not_releasable | Khu vực Releases |
409 | change_excluded | Khu vực Releases |
409 | release_note_render_failed | Khu vực Releases |
409 | release_notes_missing | Khu vực Releases |
409 | translations_not_ready | Khu vực Releases |
409 | linked_issue_status_changed | Khu 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
200Ví 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
}