...
The ID for the dictionary can be retrieved from the Dictionary data object retrieved from getAll
or getSelected
methods. It is also possible to find an object by its name, using the getObjectByName
method. Only readable dictionaries for the user are returned, and the API will give authorization error (1100) if a non-readable dictionary is selected.
Selecting sections or domains
By default, all readable sections are selected in a dictionary. A single section, or a list of sections, can be selected with setSelected
, and all sections are selected by calling setAllSelected
.
Code Block |
---|
|
<?xml version="1.0"?>
<methodCall>
<methodName>termwebapi2.setSelected</methodName>
<params>
<param><value><string>123456789abc</string></value></param>
<param><value><string>section</string></value></param>
<param><value><array><data>
<value><string>7522308</string></value>
<value><string>1184008</string></value>
<value><string>244004</string></value>
</data></array></value></param>
</params>
</methodCall> |
Same methods apply for selecting domains. When retrieving a domain via getObjectByName
method, the domain tree is searched top-down, and the first domain with matching name is returned.
Selecting language
Selecting the source language can also be done with setting the language's ID in setSelected
, but an easier way is to use setSourceLanguage
and the language code. The currently selected language code can be retrieved with getSourceLanguage
.
Code Block |
---|
|
<?xml version="1.0"?>
<methodCall>
<methodName>termwebapi2.setSourceLanguage</methodName>
<params>
<param><value><string>123456789abc</string></value></param>
<param><value><string>fra</string></value></param>
</params>
</methodCall> |
Code Block |
---|
|
<?xml version="1.0"?>
<methodCall>
<methodName>termwebapi2.getSourceLanguage</methodName>
<params>
<param><value><string>123456789abc</string></value></param>
</params>
</methodCall> |
Response:
Code Block |
---|
|
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
<param><value>fra</value></param>
</params>
</methodResponse> |
Searching terms