Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

Creates TM with the provided name

POST/%service%/
3Create/Import TM in internal formatImport and unpack base64 encoded archive of .TMD, .TMI, .MEM files. Rename it to provided namePOST/%service%/
4Delete TMDeletes .TMD, .TMI, .MEM files DELETE/%service%/%tm_name%/f
5Import TMX into TMImport provided base64 encoded TMX file into TMPOST/%service%/%tm_name%/import
6Export TMX from TMCreates TMX from tm. Encoded in base64GET/%service%/%tm_name%/
7Export in Internal formatCreates and exports archive with .TMD, .TMI, .MEM files of TMGET/%service%/%tm_name%/
8

Status of TM 

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




  1. List of TMs
PurposeReturns JSON list of TMs
RequestGET /%service%/
Params

-


Code Block
languagejs
titleResponse
collapsetrue
Response example:{
    [
        {name:examle_tm
        },
        {name:mem_gt_issue
        }
    ]
}


...

15. Test tag replacement call

PurposeUpdates entry\translation 
RequestPUT POST /%service%_service/tagreplacement
Params

Required: src, trg,

Optional: req



Code Block
languagejs
titleResponse
collapsetrue
Fuzzy search tag replacement test:
Request example:
{
    "src": "Tap <ph x='1'/>View <ph x='2' />o<bpt i='1' x='3'/> get <ph x='4'>strong</ph>displayed<ph x='5'>View</ph> two strong<ept i='1' x='6'/>US patents.",
    "trg": "View <ph x='1'/> tap <ph x='2' />to<bpt i='1' x='3'/> got <ph x='4'>strong</ph>dosplayd<ph x='5'>Veiw</ph> two strong<ept i='1' x='6'/>US patents.",
    "req": "Tap <x id='123'/>View <x id='222' />o<g> get <x id='44'>strong</x>displayed<x id='51'>View</x> two strong</g>US patents."
} 

Response example:
//'1' - request result 
//'2' - src result 
//'3' - trg result
{
 '1' :'Tap <x id="123"/>View <x id="222"/>o<bx/> get <x id="44"/>displayed<x id="51"/> two strong<ex/>US patents.',
 '2' :'Tap <x id="123"/>View <x id="222"/>o<g> get <x id="44"/>displayed<x id="51"/> two strong</g>US patents.',
 '3' :'View <x id="123"/> tap <x id="222"/>to<g> got <x id="44"/>dosplayd<x id="51"/> two strong</g>US patents.',
};

Import tag replacement test:
Request example:
{
    "src": "Tap <ph/>View <ph/>o<bpt/> get <ph>strong</ph>displayed<ph>View</ph> two strong<ept/>US patents.",
    "trg": "View <ph/> tap <ph/>to<bpt/> got <ph>strong</ph>dosplayd<ph>Veiw</ph> two strong<ept/>US patents.",
}
Response example:
{
 '1' :'Tap <ph x="1"/>View <ph x="2"/>o<bpt x="3" i="1"/> get <ph x="4"/>displayed<ph x="5"/> two strong<ept x="6" i="1"/>US patents.',
 '2' :'View <ph x="1"/> tap <ph x="2"/>to<bpt x="3" i="1"/> got <ph x="4"/>dosplayd<ph x="5"/> two strong<ept x="6" i="1"/>US patents.',
};


...