DeleteTerm

From Wordfast Wiki
Jump to: navigation, search

Return to command list

DeleteTerm

deleteTerm (string key, int cmd, int gloId, string termId)

Delete a terminology entry in the given glossary.

Parameters

key string a valid API Key, generated by making a share at www.freetm.com
cmd int command number is 53
gloId int glossary ID
termId string term ID coming from the last recent search. CAUTION, a search must done before deleting to get a valid termId.

Returned value

success boolean result of the command (true or false)
error string error message

Request example

json post with javascript

var data = {};
data["key"] = "example@key";
data["cmd"] = 53;
data["gloId"] = 1;
data["termId"] = "88474b70-5f70-11e4-aad0-5c539f6f39a2";
var xhr = new XMLHttpRequest();
xhr.open("POST", "anywhere.wordfast.com/wfa/api", true);
xhr.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
xhr.send(JSON.stringify(data));

post

<form action="anywhere.wordfast.com./wfa/api" method="post">
 Key: <input type="text" id="key" name="key" value="example@key"/>
 Command: <input type="text" id="cmd" name="cmd" value="53"/>
 Glo Id: <input type="text" id="gloId" name="gloId"/>
 Term Id: <input type="text" id="termId" name="termId"/>
 <input type="submit" value="Submit">
</form>

get

anywhere.wordfast.com/wfa/api?key=example@key&cmd=53&gloId=1&termId=88474b70-5f70-11e4-aad0-5c539f6f39a2

Response example

json

{
  "success": true
  ,"error":  ""     
}

without white space (new line, carriage return or tabulation).

text

true 
true or an error message 

Remarks