[[get-synonym-rule]] === Get synonym rule ++++ Get synonym rule ++++ .New API reference [sidebar] -- For the most up-to-date API details, refer to {api-es}/group/endpoint-synonyms[Synonyms APIs]. -- Retrieves a synonym rule from a synonyms set. [[get-synonym-rule-request]] ==== {api-request-title} `GET _synonyms//` [[get-synonym-rule-prereqs]] ==== {api-prereq-title} Requires the `manage_search_synonyms` cluster privilege. [[get-synonym-rule-path-params]] ==== {api-path-parms-title} ``:: (Required, string) Synonyms set identifier to retrieve the synonym rule from. ``:: (Required, string) Synonym rule identifier to retrieve. [[get-synonym-rule-response-codes]] ==== {api-response-codes-title} `404` (Missing resources):: The `synonyms_set` identifier was not found, or the synonym rule specified by `synonym_rule` was not found in the synonyms set. [[get-synonym-rule-example]] ==== {api-examples-title} The following example retrieves an existing synonym rule called `test-1` for the synonyms set `my-synonyms-set`: //// [source,console] ---- PUT _synonyms/my-synonyms-set { "synonyms_set": [ { "id": "test-1", "synonyms": "hello, hi" }, { "id": "test-3", "synonyms": "bye, goodbye" }, { "id": "test-2", "synonyms": "test => check" } ] } ---- // TESTSETUP //// [source,console] ---- GET _synonyms/my-synonyms-set/test-1 ---- [source,console-result] ---- { "id": "test-1", "synonyms": "hello, hi" } ----