View on GitHub

ModernMT Enterprise Edition

Neural Adaptive Machine Translation for professional translators

← Back to Home

API Update Content in Multiple Memories

Quick Example


curl -X POST \
     -H "MMT-ApiKey: <your_api_key>" \
     -d "memories=1,4,5" \
     -d "source=en" \
     -d "target=it" \
     -d "sentence=Hello Mike!" \
     -d "translation=Ciao Mike!" \
     -d "old_sentence=Hello Mike!" \
     -d "old_translation=Salve Michele!" \

     https://api.modernmt.eu/memories/content \

| python -mjson.tool

{
    "data": [
        {
            "begin": 16,
            "dataChannel": 1,
            "end": 16,
            "id": "80000001-0000-0000-0000-000000000010",
            "memory": 0,
            "progress": 0,
            "size": 1
        },
        {
            "begin": 17,
            "dataChannel": 1,
            "end": 17,
            "id": "80000001-0000-0000-0000-000000000011",
            "memory": 0,
            "progress": 0,
            "size": 1
        },
        {
            "begin": 18,
            "dataChannel": 1,
            "end": 18,
            "id": "80000001-0000-0000-0000-000000000012",
            "memory": 0,
            "progress": 0,
            "size": 1
        }
    ],
    "status": 200
}

Description

This method updates a past contribution in multiple MMT Memories.
The User can be either connected or not connected to the target memories to update; she must have a valid MMT-apiKey anyway.
If no target memory is passed, this API will update the contribution in the User’s default memory.
If the same contribution was added multiple times, all of its instances in the target Memories will be updated.

Resource URL

https://api.modernmt.eu/memories/content

Parameters

memories
A list containing the identifiers of the target memories in the format of a comma-separated string.
A Memory identifier can be either the ModernMT Memory ID, or the ServiceApi Memory Key, or the corresponding External Id (if there is one).
If no target memories are passed, the contribution will be added to the User's default Memory.

Example: 1,3,5
source The source language of the contribution to update, in the form of a language tag.

Example: en
target The target language of the contribution to update, in the form of a language tag.

Example: it
sentence The source content of the contribution to write over the old contribution.

Example: Hello Mike!
translation The target content of the contribution to write over the old contribution

Example: Ciao Mike!
old_sentence The source content of the old contribution to update.

Example: Hello Mike!
old_translation The target content of the old contribution to update.

Example: Salve Michele!

Response Fields

The response object is an array of ImportJobs, for more details please have a look at the API Get Import Job documentation.


← Back to Home