Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added info about tables, multifuzzy and multiupdate

...

Endpoints overview

default endpoint/example

Is async?

1Get the list of TMsReturns JSON list of TMsGET/%service%//t5memory/
2Create TM

Creates TM with the provided name

POST/%service%//t5memory/
3Create/Import TM in internal formatImport and unpack base64 encoded archive of .TMD, .TMI, .MEM files. Rename it to provided namePOST/%service%//t5memory/
4Clone TM LocalyMakes clone of existing tmPOST/%service%/%tm_name%/clone/t5memory/my+TM/clone
(+is placeholder for whitespace in tm name, so there should be 'my TM.TMD' and 'my TM.TMI'(and in pre 0.5.x 'my TM.MEM' also) files on the disk )
tm name IS case sensetive in url

5Reorganize TMReorganizing tm(replacing tm with new one and reimporting segments from tmd) - asyncGET/%service%/%tm_name%/reorganize/t5memory/my+other_tm/reorganize+ in 0.5.x and up
5Delete TMDeletes .TMD, .TMI files DELETE/%service%/%tm_name%//t5memory/%tm_name%/
6Import TMX into TMImport provided base64 encoded TMX file into TM - asyncPOST/%service%/%tm_name%/import/t5memory/%tm_name%/import+
7Export TMX from TMCreates TMX from tm. Encoded in base64GET/%service%/%tm_name%//t5memory/%tm_name%/
8Export in Internal formatCreates and exports archive with .TMD, .TMI files of TMGET/%service%/%tm_name%//t5memory/%tm_name%/status
9

Status of TM 

Returns status\import status of TMGET/%service%/%tm_name%/status/t5memory/%tm_name%/status
10Fuzzy searchReturns entries\translations with small differences from requestedPOST/%service%/%tm_name%/fuzzysearch/t5memory/%tm_name%/fuzzysearch
11Concordance searchReturns entries\translations that contain requested segmentPOST/%service%/%tm_name%/concordancesearch/t5memory/%tm_name%/concordancesearch
12Entry updateUpdates entry\translation POST/%service%/%tm_name%/entry/t5memory/%tm_name%/entry
13Entry deleteDeletes entry\translationPOST/%service%/%tm_name%/entrydelete/t5memory/%tm_name%/entrydelete
14Save all TMsFlushes all filebuffers(TMD, TMI files) into the filesystemGET/%service%_service/savetms/t5memory_service/saveatms
15Shutdown serviceFlushes all filebuffers into the filesystem and shutting down the serviceGET/%service%_service/shutdown/t5memory_service/shutdown
16Test tag replacement callFor testing tag replacementPOST/%service%_service/tagreplacement/t5memory_service/tagreplacement
17ResourcesReturns resources and service dataGET

/%service%_service/resources

/t5memory_service/resources


18Import tmx from local file(in removing lookuptable git branch)Similar to import tmx, but instead of base64 encoded file, use local path to filePOST

/%service%/%tm_name%/importlocal

/t5memory/%tm_name%/importlocal

+

19 Mass deletion of entries(from v0.6.0)It's like reorganize, but with skipping import of segments, that after checking with provided filters combined with logical AND returns true. POST

/%service%/%tm_name%/entriesdelete

/t5memory/tm1/entriesdelete

+

20New concordance search(from v0.6.0)It's extended concordance search, where you can search in different field of the segmentPOST

/%service%/%tm_name%/search

/t5memory/tm1/search


21Get segment by internal keyExtracting segment by it's location in tmd file. POST

/%service%/%tm_name%/getentry

/t5memory/tm1/getentry


22NEW Import tmxImports tmx in non-base64 formatPOST

/%service%/%tm_name%/importtmx

/t5memory/tm1/tmporttmx

+

23NEW import in internal format(tm)Extracts tm zip attached to request(it should contains tmd and tmi files) into MEM folderPOST

/%service%/%tm_name%/
("multipart/form-data")

/t5memory/tm1/

("multipart/form-data")


24NEW export tmxExports tmx file as a file. Could be used to export selected number of segments starting from selected positionGET
(could be with body)

/%service%/%tm_name%/download.tmx

/t5memory/tm1/download.tmx


25NEW export tm (internal format)Exports tm archive GET

/%service%/%tm_name%/download.tm

/t5memory/tm1/download.tm


26Flush tmIf tm is open, flushes it to the disk(implemented in 0.6.33)GET

/%service%/%tm_name%/flush

/t5memory/tm1/flush


27FlagsReturn all available commandline flags(implemented in 0.6.47). Do not spam too much because gflags documentation says that that's slow. Useful to collect configuration data about t5memory to do debugging.GET

/%service%_service/flags

/t5memory_service/flags


28MultifuzzyShares json parser with Multiupdate. It's a way to send multiple fuzzy requests, add to them 'customId' field and get list of responses. POST

/%service%/%tm_name%/multifuzzy

/t5memory/tm1/multifuzzy


29Multiupdate Shares json parser with Multifuzzy. It's a way to send multiple update segment requests and get list of responses. POST

/%service%/%tm_name%/multiupdate

/t5memory/tm1/multiupdate


30TablesReturns list of all items in the tables of the TM. Tm have tables for Author, Languages, Langgroups, Filenames(long name, short name). Also could be used just to open TM, because it's lightweightGET

/%service%/%tm_name%/tables

/t5memory/tm1/tables



Available end points

List of TMs

PurposeReturns JSON list of TMs
RequestGET /%service%/
Params

-

Returns list of open TMs and then list of available(excluding open) in the app.

Code Block
languagejs
titleResponse
collapsetrue
Response example:
{
    "Open": [
        {
            "name": "mem2"
        }
    ],
    "Available on disk": [
        {
            "name": "mem_internal_format"
        },
        {
            "name": "mem1"
        },
        {
            "name": "newBtree3"
        },
        {
            "name": "newBtree3_cloned"
        }
    ]
}open - TM is in RAM, Available on disk - TM is not yet loaded from disk


...

Import provided base64 encoded TMX file into TM

PurposeImport provided base64 encoded TMX file into TM. Starts another thead for import. For checking import status use status call
RequestPOST /%service%/%tm_name%/import
Params

{"tmxData": "base64EncodedTmxFile" }

  • additional:
    "framingTags":
       "saveAll" - default behaviour, do nothing
       "skipAll" - skip all enclosing tags, including standalone tags
       "skipPaired" - skip only paired enclosing tags 

TM must exist
It's async, so check status using status endpoint, like with reorganize in 0.5.x and up

Handling if framing tag situation differs from source to target - for skipAll or skipPaired

If framing tags situation is the same in source and target, both sides should be treated as described above.

If framing tags only exist in source, then still they should be treated as described above.

If they only exist in target, then  nothing should be removed.

Code Block
languagejs
titleResponse
collapsetrue
Request example:{
   ["framingTags": "skipAll"["skipPaired", "saveAll"],]
   "tmxData":   "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHRteCB2ZXJzaW9uPSIxLjQiPgogIDxoZWFkZXIgY3JlYXRpb250b29sPSJTREwgTGFuZ3VhZ2UgUGxhdGZvcm0iIGNyZWF0aW9udG9vbHZlcnNpb249IjguMCIgby10bWY9IlNETCBUTTggRm9ybWF0IiBkYXRhdHlwZT0ieG1sIiBzZWd0eXBlPSJzZW50ZW5jZSIgYWRtaW5sYW5nPSJlbi1HQiIgc3JjbGFuZz0iYmctQkciIGNyZWF0aW9uZGF0ZT0iMjAxNTA4MjFUMDkyNjE0WiIgY3JlYXRpb25pZD0idGVzdCIvPgogIDxib2R5PgoJPHR1IGNyZWF0aW9uZGF0ZT0iMjAxODAyMTZUMTU1MTA1WiIgY3JlYXRpb25pZD0iREVTS1RPUC1SNTlCT0tCXFBDMiIgY2hhbmdlZGF0ZT0iMjAxODAyMTZUMTU1MTA4WiIgY2hhbmdlaWQ9IkRFU0tUT1AtUjU5Qk9LQlxQQzIiIGxhc3R1c2FnZWRhdGU9IjIwMTgwMjE2VDE2MTMwNVoiIHVzYWdlY291bnQ9IjEiPgogICAgICA8dHV2IHhtbDpsYW5nPSJiZy1CRyI+CiAgICAgICAgPHNlZz5UaGUgPHBoIC8+IGVuZDwvc2VnPgogICAgICA8L3R1dj4KICAgICAgPHR1diB4bWw6bGFuZz0iZW4tR0IiPgogICAgICAgIDxzZWc+RXRoIDxwaCAvPiBkbmU8L3NlZz4KICAgICAgPC90dXY+CiAgICA8L3R1PgogIDwvYm9keT4KPC90bXg+Cg=="
}Response example:Error in case of errorFrom v0_2_15
{ "%tm_name%":""} in case of success
Check status of import using status call
TMX import could be interrupted in case of invalid XML or TM reaching it's limit. For both cases check status request to have info about position in tmx file where it was interrupted. 



Multifuzzy

PurposeSends multiple fuzzysearches in the same tm in a row
RequestPOST /%service%/%tm_name%/multifuzzy
Params

"requests":[array of regular fuzzySearch bodies]
"customId":"you can provide optional customId to identify responses"


Code Block
languagejs
titleResponse
collapsetrue
Request example
{
        "requests": [
            {
                "source": "d\u00fcrfen.",
                "type": "Manual",
                "markupTable": "OTMXUXLF",
                "sourceLang": "de-DE",
                "targetLang": "en-US",
                "documentName": "Audioscript_Hybrides_Arbeiten.xlsx.sdlxliff",
                "author": "Project Manager",
                "context": "390"
            },
            {
                "source": "ändern",
                "type": "Automatic",
                "markupTable": "ABCD1234",
                "sourceLang": "de-de",
                "targetLang": "en-GB",
                "documentName": "translation.docx",
                "author": "Editor",
                "context": "200"
            }
        ]
}
response example:
{
  "responses": {
   "0": {
      "ReturnValue": 0,
      "ErrorMsg": "",
      "NumOfFoundProposals": 0,
      "searchedSrc": "dürfen.",
      "customId": "",
      "forceFuzzy": 0
    },
    "1": {
      "ReturnValue": 0,
      "ErrorMsg": "",
      "NumOfFoundProposals": 0,
      "searchedSrc": "ändern",
      "customId": "",
      "forceFuzzy": 0
    }
  }
}





Multiupdate

PurposeSend multiple updateEntry requests to the same tm with one call
RequestPOST /%service%/%tm_name%/multiupdate
Params

"requests":[array of regular updateEntry bodies]
"customId":"you can provide optional customId to identify responses"


Code Block
languagejs
titleResponse
collapsetrue
Request example:
{
"requests": [
{
    "source": "d\u00fcrfen.",
    "target": "Note",
    "customId": "123",
    "type": "Manual",
    "markupTable": "OTMXUXLF",
    "targetLang": "de-DE",
    "sourceLang": "de-De",
    "documentName": "Audioscript_Hybrides_Arbeiten.xlsx.sdlxliff",
    "author": "Project Manager",
    "context": "390"
   },
   {
    "source": "ändern",
    "target": "change",
    "customId" : "abc",
    "type": "Automatic",
    "markupTable": "ABCD1234",
    "targetLang": "fr-FR",
    "sourceLang": "de-DE",
    "documentName": "translation.docx",
     "author": "Editor",
     "context": "200"
    }
  ]
}

Response example:
{
    "responses": {
        "123": {
            "source": "dürfen.",
            "sourceNPRepl": "dürfen.",
            "sourceNorm": "dürfen.",
            "target": "Note",
            "segmentId": 519740,
            "customId": "123",
            "documentName": "Audioscript_Hybrides_Arbeiten.xlsx.sdlxliff",
            "sourceLang": "DE-DE",
            "targetLang": "DE-DE",
            "type": "Manual",
            "author": "PROJECT MANAGER",
            "timestamp": "20250724T131742Z",
            "markupTable": "OTMXUXLF",
            "context": "390",
            "additionalInfo": "",
            "internalKey": "447145:1"
        },
        "abc": {
            "ReturnValue": 6044,
            "ErrorMsg": "EqfMemory::putProposal result is an error;"
        }
    },
    "save2disk": "0"
}


Code Block
languagejs
titleResponse
collapsetrue
Response example:
{
    "responses": {
        "123": {
            "ReturnValue": 6044,
            "ErrorMsg": "EqfMemory::putProposal result is an error;"
        },
        "abc": {
            "ReturnValue": 14002,
            "ErrorMsg": "Error: Missing target language"
        }
    },
    "save2disk": "0"
}




Tables

PurposeGet author, lang, langGroup(virtual- created in runtime and not saved on the disk), tagtable(deprecated - only one record), document(long filename, long filename caseignore-virtual, short filename- part deprecated)
RequestGET /%service%/%tm_name%/tables
Params

-

tables are provided in format - name(internal key): "position) idInTable:value;"
When adding new entry, for new Id t5memory uses basicaly size of the table before adding+1, so Id should start from id=1. 
When doing fuzzy search, some field could also be saved to the table, to generate then id(or find matching) to compare with saved data.
There are 2 types of entries- older, fixed size, and long filename. For older, every entry has the same size, 39 bytes+endOfLine. You can have up to 389 entries saved in that way in each of the tables. Longname table manage size dynamically, so it's not clear what's the maximum size, but for filenames there are duplicates in old style docname table and in longname(which are used only for this type of data). For filename search, first used longname table, then generated on tm loading caseignore longname table, then short name table. Usually entries in tables are caseignore. 

In the record t5memory saves only id to the table. Maybe it make sense to implement endpoint to edit that table, if something is missing or corrupted. Exception for saving id are context and additional info, some data, that could be saved as int(segId, time), and source and target.
To clear or fix tag tables, you need to do reorganize, but if some entry is missing from the table, you would not restore it on export or segment exctraction via id. So tables could be used to check health of the tm. And for some ways for concordance search or some other checks. 


Code Block
languagejs
titleResponse
collapsetrue
Response example:
{
    "tableName(additional info)(INTERNAL_KEY_OF_THE_TABLE)": "position)idInTable: value;",
    "tagTablesTable(4)": "0)0: \"\"; ",
    "langTable(1)": "0)2: \"DE-DE\"; 1)1: \"FR-FR\"; 2)0: \"\"; ",
    "langGroupTable(virtual)(8)":"0)1: \"F\"; 1)2: \"G\", "authors(3)": "0)36: \"ALINA GEDGAUDIENE\"; 1)7: \"ANAIS KLUCZKA\"; 2)4: \"ANNA MAYER\"; 3)17: \"ARTHUR LE PIVERT\"; 4)35: \"CHARLOTTE FOGLIA\"; 5)10: \"CLAUDIA RICHLING\"; 6)18: \"DANIEL THURSFIELD\"; 7)39: \"DANIELA BARSCH\"; 8)8: \"DANIELA NOEBEL\"; 9)15: \"DUYGU ZORBA\"; 10)48: \"EDITA KAZLAUSKAITE\"; 11)40: \"FRANK ERVEN\"; 12)1: \"FRéDéRIC MOULIN\"; 13)14: \"GIL DéNIEL (DE6U3268)\"; 14)31: \"HEIDRUN LUDOLF\"; 15)55: \"HEIKE REINER\"; 16)30: \"INDRE BARTKIENE\"; 17)23: \"ISABELLE OUELLET\"; 18)19: \"JP COSTEROUSSE (DE6U3269)\"; 19)41: \"JüRGEN KUKLINSKI\"; 20)46: \"LINA PAULAUSKIENE\"; 21)53: \"LINDA PORRECA HEIMROTH\"; 22)58: \"LUCIE BOYN\"; 23)26: \"MARIUS EITMINAVICIUS\"; 24)50: \"MARLIES VAN DEN HURK\"; 25)43: \"MARTIN HOLTMANN\"; 26)54: \"NADINE SCHAELE\"; 27)22: \"NELSON RUSK\"; 28)49: \"RAIMONDA JAZUKEVICIENE\"; 29)25: \"RITA DANZè\"; 30)6: \"UNBEKANNT\"; 31)13: \"UNBEKANNT 1\"; 32)33: \"UNKNOWN 1\"; 33)38: \"VILMA JURGELIONYTE\"; 34)32: \"VILMA JURGELIONYTE2\"; 35)12: \"VINCENT HENRY\"; 36)47: \"VOLKER ZEYER\"; 37)29: \"VéLINA GABROVSKA\"; 38)28: \"W W\"; 39)11: \"[AMPLEXOR]\"; 40)42: \"[BUEHLER, IHRE ABTEILUNG (AUF VS-BUEHLE\"; 41)57: \"[BüHLER AG, TECHNISCHE DOKUMENTATION (\"; 42)24: \"[CLS]\"; 43)56: \"[ERVEN.BIZ - TRAINING, CONSULTING & SUP\"; 44)44: \"[ERVEN]\"; 45)20: \"[EUROSCRIPT DEUTSCHLAND GMBH, IHRE ABTE\"; 46)2: \"[ITL]\"; 47)51: \"[KAVO DENTAL GMBH, IT (AUF DENBIBSVAC00\"; 48)45: \"[LIONBRIDGE]\"; 49)9: \"[OLD - EUROSCRIPT]\"; 50)16: \"[OLD_AMPLEXOR]\"; 51)21: \"[RAPTRAD IMAGINE]\"; 52)37: \"[STO SE & CO.KGAA, (ON DEWEAT06)]\"; 53)52: \"[STOQUART SA, (ON THERIVER)]\"; 54)3: \"[TRANSLINE EUROPE, (ON TEU-SERVER)]\"; 55)5: \"[TRANSLINE]\"; 56)27: \"[WEINOR, MARKETING (AUF NTS-ACROSS)]\"; 57)34: \"[WIENERS]\"; 58)0: \"\"; ",
"filenames(long)(5)": "0)1: \"none\"; 1)0: \"\"; ",
"filenames(long, caseign, virtual)(5)": "0)1: \"NONE\"; 1)0: \"\"; ",
"filenames(short)(2)": "0)1: \"none\"; 1)0: \"\"; "}



   

Table of Contents

Overview and API introduction

...