If the API changes in an incompatible manner this is listed explicitly in the "important release notes" section of each releases changelog.
Client app setup data | |
---|---|
Request | GET /editor/plugins_termportal_data |
Params | locale=(en|de) Optional. default 'en'. See titles in |
Term search | |
---|---|
Request | GET /editor/plugins_termportal_data/search |
Params | query * Required. Search query. Wildcard characters '*' and '?' are supported for multi- and single-char searches, respectively. |
language Required. ID of language which searched terms belong to. See lang in Client app setup data response structure | |
limit Requred. Results limit per page. Integer value expected. | |
start Required. Results offset. Integer value expected. | |
clientIds Optional. Comma-separated list of integers, representing client IDs. See | |
collectionIds Optional. Comma-separated list of integers, representing collection IDs. See filterWindow.collections in Client app setup data response structure | |
processStatus Optional. Comma-separated list of any of 'unprocessed', 'provisionallyProcessed', 'finalized' and 'rejected'. | |
noTermDefinedFor Optional. ID of language, that term is not yet defined for | |
attr-x Optional. Attribute search, where 'x' - is the key in filterWindow.attributes (see Client app setup data response structure). If param name is mentioned among request params but no param value given, the search will return the terms having such attributes defined even despite having empty value. If param value is given, wildcard characters '*' and '?' are supported, first for multichar and second for single-char purpose. Multiple attributes search are supported, just use attr-x, attr-y etc | |
termEntryTbxId Optional. Partially known tbx ids are supported | |
termTbxId Optional. Partially known tbx ids are supported | |
tbxCreatedBy Optional. ID of person who was specified as creator in imported tbx data (see filterWindow.tbxCreatedBy array in Client app setup data response structure) | |
tbxCreatedGt Optional. Should be used to search terms created since certain date, inclusively, according to imported tbx data. Value is expected in format yyyy-mm-dd. Can be used with tbxCreatedLt if search by date range is needed. | |
tbxCreatedLt Optional. Should be used to search terms created until certain date, inclusively, according to imported tbx data. Value is expected in format yyyy-mm-dd. Can be used with tbxCreatedGt if search by date range is needed. | |
tbxCreatedAt Optional. Exact date of creation specified in imported tbx data. Date in format yyyy-mm-dd is expected. This can only be used if f tbxCreatedGt and tbxCreatedLt are NOT given | |
tbxUpdatedBy Optional. ID of person who was specified as updater in imported tbx data (see filterWindow.tbxUpdatedBy array in Client app setup data response structure) | |
tbxUpdatedGt Optional. Should be used to search terms updated since certain date, inclusively, according to imported tbx data. Value is expected in format yyyy-mm-dd. Can be used with tbxUpdatedLt if search by date range is needed. | |
tbxUpdatedLt Optional. Should be used to search terms updated until certain date, inclusively, according to imported tbx data. Value is expected in format yyyy-mm-dd. Can be used with tbxUpdatedGt if search by date range is needed. | |
tbxUpdatedAt Optional. Exact date of creation specified in imported tbx data. Date in format yyyy-mm-dd is expected. This can only be used if tbxUpdatedGt and tbxUpdatedLt are NOT given | |
Get attributes and siblings for a specific term | |
---|---|
Request | POST /editor/plugins_termportal_data/terminfo |
Params | termId Required. ID of term we need to get info about |
Response contains attributes for this particular term itself, for it's language-level, and for it's ternEntry-level, under 'term', 'language' and 'entry' keys, respectively. Also, response object contains the array of all other terms that belong to the same termEntry that current term belongs to. FYI: the requested term is NOT excluded from the list of siblings. |
Get attributes for a specific term | |
---|---|
Request | POST /editor/plugins_termportal_data/siblinginfo |
Params | termId Required. ID of term we need to get info about |
Response | Same as for 'terminfo', described above, except two things:
|
Transfer terms to main translate5 app as project of type 'termtranslation' | |
---|---|
Request | POST /editor/plugins_termportal_data/transfer |
Params | clientId Required. Id of a customer, that newly created termtranslation-project will belong to |
projectName Required. Project name | |
sourceLang Required. ID of source language. See lang in Client app setup data response | |
targetLang Required. Comma-separated list of target languages IDs. See langAll in Client app setup data response | |
terms=(all|none) Required. Terms selection mode. Used in conjunction with except param, e.g. the idea of possible selections are:
| |
except Required if terms=none. Empty string or comma-separated list of term IDs | |
translated=(0|1) Required. Whether to transfer terms for translation even if they already have translation for given target languages | |
definition=(0|1) Required. Whether to transfer terms definition-attrs for translation as well | |
Response is containing json-object with key names from step1 to step5, and responses from the corresponding steps of project creation workflow |
Create new term | |
---|---|
Request | POST /editor/term |
Params | collectionId Required. ID of TermCollection that new term should be created in See filterWindow.collections in Client app setup data response |
language Required. Rfc5646-code of a new term's language. See langAll[*].value in Client app setup data response | |
term Required. Term text itself. String. | |
note Required if runtimeOptions.termportal.commentAttributeMandatory config is On. String. | |
termEntryId Optional. ID of termEntry, which new term should be attached under. If not given - new termEntry will be created. | |
Create proposal for existing term | |
---|---|
Request | PUT /editor/term |
Params | termId Required. ID of existing term, for proposal to be created for |
proposal Optional. If not given, the existing proposal will be deleted, so existing term will be kept with no proposal | |
Delete term | |
---|---|
Request | DELETE /editor/term |
Params | termId Required. ID of term to be deleted |
Response contains isLast-property, indicating whether deleted term was the last having it's language, or last for the whole termEntry |
Create attribute | |
---|---|
Request | POST /editor/attribute |
Params | termId Required ID of term where attribute should be created, even if not at term-level |
level=(entry|language|term) Required Level that the attribute should be created for | |
dataType Required Type of an attribute. Can be integer or string. See filterWindow.attributes[*].(id|type) in Client app setup data response | |
batch=(0|1) Optional Default 0. If this param is 1, it means that batch-mode is On so termId-param can accept comma-separated term IDs | |
except=(0|1) Optional Default 0. This param is only applicable when batch-mode is On. Before making request with except=1 you should preliminary run term search request at least once, so the IDs of found terms except given by termId-param would be involved | |
Batch-mode response example: as you can see, value of Response in case of non-batch-mode would be the same as below, except that:
|
Update attribute | |
---|---|
Request | PUT /editor/attribute |
Params | attrId Required if draft0-param is not given. Comma separated IDs of attributes, whose values should be updated |
dropId Optional Comma-separated list of IDs of draft-attributes, that should be deleted with preliminary usage of their values to spoof values of existing attributes identified by corresponding values from attrId-param | |
draft0 Required if attrId-param is not given. Comma-separated IDs of attributes, that currently are drafts, but should be un-drafted. Here can be IDs of attributes of types that can be non-unique within their level. Also, there can be IDs of attributes of types that should be unique within their levels, but that currently are unique, e.g. there were no existing attributes found of those types. | |
dataIndex=(value|target) Required if ALL attrs identified by attrId-param are of type | |
value Required if it's a picklist-attribute | |
target Optional Must be valid termEntryTbxId (for termEntry-level attributes) or termTbxId (for term-level attributes) | |
termLang,mainLang Optional RFC5646-codes for preferred languages to return terms found by target-param. | |
figure Required if ALL attrs identified by attrId-param are of type figure . | |
There are the following use cases each with set of request params involved:
| |
Delete attribute | |
---|---|
Request | DELETE /editor/attribute |
Params | attrId Required ID of attribute to be deleted. Can be also be comma-separated list of attribute IDs |