Skip to main content

Replace release languages

PUT/api/organization/release-languages
Administrator

By default every note is written in the Organization's output language. An administrator can choose up to five release note languages at the top of the Audiences page, or with PUT /api/organization/release-languages and {"targetLanguages": ["en", "vi"]}; every member can read them with GET. Tags are canonicalized and repeats dropped; an empty list, more than five, or an invalid tag returns 400 invalid_release_languages. Approving a release then writes one note per audience and language, so four audiences in English and Vietnamese make eight notes.

Read more: Release note languagesSource: ReleaseLanguageApiController#replace(opens in new tab)

Request body​

application/json

FieldTypeRequiredNotes
targetLanguagesarray of stringRequired

Response​

Success: 200

FieldTypeRequiredNotes
targetLanguagesarray of stringOptional
outputLanguagestringOptional
translationEnabledbooleanOptional
updatedBystringOptional
updatedAtstring (date-time)Optional
suggestionsarray of OutputLanguageSettings.OptionOptional
suggestions[].tagstringOptional
suggestions[].displayNamestringOptional

Errors​

StatusCodeApplies to
400validation_faileda field is missing or out of rangeAny endpoint
400malformed_requestthe body cannot be readAny endpoint
400invalid_parametera path or query parameter is missing or does not convert, such as an ID that is not a UUIDAny endpoint
401authentication_requiredno sessionAny endpoint
403access_deniedan administrator endpoint, or a missing or stale CSRF tokenAny endpoint
404not_foundno such addressAny endpoint
405method_not_allowedthe address does not take that methodAny endpoint
415unsupported_media_typethe address does not read a body of that typeAny endpoint
500internal_errora fault ReleaseFlow did not foresee; the body never carries the exception behind itAny endpoint
400template_invalidAudiences area
400template_narratives_pathAudiences area
400template_language_not_targetedAudiences area
400invalid_release_languagesAudiences area
404audience_not_foundAudiences area
409audience_code_takenAudiences area
409audience_limitAudiences area
409audience_lastAudiences area
409audience_last_activeAudiences area
409audience_already_retiredAudiences area
409audience_not_retiredAudiences area
409audience_in_useAudiences area
409audience_not_presetAudiences area
404glossary_term_not_foundGlossary area
409glossary_term_takenGlossary area
409glossary_limitGlossary area
400invalid_release_scheduleReleases area
400invalid_upgrade_guide_urlReleases area
400invalid_previous_releaseReleases area
400invalid_fold_decisionReleases area
404release_not_foundReleases area
404release_note_not_foundReleases area
404folding_suggestion_not_foundReleases area
404linked_issue_not_foundReleases area
409release_status_conflictReleases area
409release_publishedReleases area
409release_emptyReleases area
409release_review_incompleteReleases area
409change_summary_requiredReleases area
409release_version_takenReleases area
409classification_changedReleases area
409change_not_releasableReleases area
409change_excludedReleases area
409release_note_render_failedReleases area
409release_notes_missingReleases area
409translations_not_readyReleases area
409linked_issue_status_changedReleases area

Request

bash
# Sign in first and keep the session cookie in cookies.txt (see Sessions and CSRF).
# CSRF_HEADER and CSRF_TOKEN are the headerName and token GET /api/csrf returned.
curl -X PUT "http://localhost:8080/api/organization/release-languages" \
-b cookies.txt -c cookies.txt \
-H "$CSRF_HEADER: $CSRF_TOKEN" \
-H "Content-Type: application/json" \
--data '{
"targetLanguages": [
"<string>"
]
}'

The request body is an example built from the schema; replace every placeholder.

Response

200

Example

{
  "targetLanguages": [
    "<string>"
  ],
  "outputLanguage": "<string>",
  "translationEnabled": false,
  "updatedBy": "<string>",
  "updatedAt": "<date-time>",
  "suggestions": [
    {
      "tag": "<string>",
      "displayName": "<string>"
    }
  ]
}