Available in Classic and VPC
Edit a term registered in a glossary.
Request
This section describes the request format. The method and URI are as follows:
| Method | URI |
|---|---|
| PATCH | /glossary/v1/replacer |
Request headers
For information about the headers common to all Papago Translation APIs, see Common Papago Translation headers.
Request body
Pass the list of terms to be edited. You can edit up to 20 terms at a time, and each entry is updated based on its existing term ID.
| Field | Type | Required | Description |
|---|---|---|---|
replacers |
Array | Required | List of term IDs to edit (up to 20): replacers |
replacers
It defines each term registration entry within the replacers array of the request body. Only the translation result (replaceText) of an existing term can be changed.
| Field | Type | Required | Description |
|---|---|---|---|
glossaryKey |
String | Required | Glossary ID |
id |
Long | Required | Term ID to edit (1 or more) |
replaceText |
String | Required | Translation text to edit |
Request example
The request example is as follows:
curl --location --request PATCH "https://papago.apigw.ntruss.com/glossary/v1/replacer" \
--header "Content-Type: application/json" \
--header "x-ncp-apigw-timestamp: {x-ncp-apigw-timestamp}" \
--header "x-ncp-iam-access-key: {x-ncp-iam-access-key}" \
--header "x-ncp-apigw-signature-v2: {x-ncp-apigw-signature-v2}" \
--data '{
"replacers": [
{
"glossaryKey": "7f3c2a91-8b5e-4d7b-9e32-1c0f4e7e59ad",
"id": 12345,
"replaceText": "Updated Test Term"
}
]
}'
Response
This section describes the response format.
Response body
The following describes the response body for replacerList (array).
| Field | Type | Description |
|---|---|---|
id |
Long | Term ID |
glossaryKey |
String | Glossary ID |
source |
String | Source language code (Example: ko, en) |
target |
String | Translation language code (Example: ko, en) |
triggerText |
String | Source text |
replaceText |
String | Translated text |
Response status codes
For information about the HTTP status codes common to all Papago Translation APIs, see Common Papago Translation response status codes.
Response example
The response example is as follows:
{
"replacers": [
{
"id": 12345,
"glossaryKey": "1dc87d33-c45d-4398-9a80-98b19dd302fb",
"source": "ko",
"target": "en",
"triggerText": "Test term",
"replaceText": "Updated Test Term"
}
]
}