Note |
---|
If the API changes in an incompatible manner this is listed explicitly in the "important release notes" section of each releases changelog. |
Description
The database-side storage of terms is extended by the "TermCollection", which makes it possible, for example, to group terms that belong to a specifc client. This way an end client can be assigned to one or more TermCollections.
...
Name | Type | Info |
id | int | GET only |
name | string | The name of the term collection (unique) |
timestamp | DateTime | Date and time when the term collection is created |
customerId | integer | Foreign key to the customers table |
...
Search term in term collection.
URL: | editor/termcollection/search |
Available Methods: | GET |
Specialities: |
|
Resource Layout
Name | Type | Info |
term | string | Search term string. The search string can be combined with wildcards also. |
language | array | Term language/s ids from lek_languages table |
collectionId
disableLimit | boolean | Disable the result limit configured in searchTermsCount config variable. |
Search term entry and term attributes in term collection.
URL: | editor/termcollection/searchattribute |
Available Methods: | GET |
Specialities: |
|
Info: For search and searchatribute actions, will search in the collection assigned to the customers which customers are assigned to the currently logged user assigned customers.
Resource Layout
Name | Type | Info |
groupId | string | Lek_terms table groupId field. |
- Response array example
Code Block |
---|
{ "rows":{ "termAttributes":[ { "definition":"", "groupId":"001", "label":"gravure printing", "value":"11413", "desc":"gravure printing", "termId":"11413", "collectionId":"122", "languageId":"5", "labelId":"323", "attributeId":"73178", "parentId":null, "internalCount":null, "name":"transac", "attrType":"origination", "attrTarget":null, "attrId":null, "attrLang":"en", "attrValue":"origination", "attrCreated":"2018-05-07 17:32:07", "attrUpdated":"2018-05-07 17:32:07", "attrDataType":null, "language":"en" } ], "termEntryAttributes":[ { "id":"8737", "labelId":"331", "collectionId":"122", "termEntryId":"4965", "parentId":null, "internalCount":"1", "language":null, "name":"note", "attrType":null, "attrDataType":null, "attrTarget":null, "attrId":null, "attrLang":null, "value":"Aleksandar", "created":"2018-05-07 17:32:07", "updated":"2018-05-07 17:32:07", "attributeId":"8737", "attrValue":"Aleksandar", "attrCreated":"2018-05-07 17:32:07", "attrUpdated":"2018-05-07 17:32:07" } ] } } |
...
URL: | editor/termcollection/import |
Available Methods: | POST |
Specialities: | Import the provided terms from the tbx file to the term collection |
POST request parameters example(json):
"data":{ "collectionId": "the id of the term collection where those terms from the tbx file are going to"1, "customerId":1000, "customerIdmergeTerms":true, "tbxUpload": "customer to that this term collection is associated", "mergeTermsdeleteTermsLastTouchedOlderThan": "see details for the mergeTerms behaviour below2018-05-01", "tbxUploaddeleteTermsOlderThanCurrentImport": "tbx file/files uploaded as multipart/form-data"true, "deleteProposalsLastTouchedOlderThan": 2018-05-01", "deleteProposalsOlderThanCurrentImport" : true } |
Details for the mergeTerms parameter
resource parameters: collectionIdThe id of the term collection where those terms from the tbx file are going to customerIdCustomer to that this term collection is associated mergeTermsThe merging of terms into an existing term collection is controlled by this boolean parameter. The merge process is complex and completely described here. tbxUpload tbx file/files (or a zip file containing TBX files) uploaded as multipart/form-data deleteTermsLastTouchedOlderThan (date format Y-m-d)Deletes all terms in all listed termCollections, that have a updated date older than the date configured for "deleteTermsLastTouchedOlderThan". Every term in a termCollection has a creation date, a modification date and an updated dated. The creation date and the modification date are taken from the dates as they appear in the TBX file. deleteTermsOlderThanCurrentImport (boolean)Deletes all terms in all listed termCollections, that have an "updated date" older than the start of the current import. To learn, what the "updated date" is, please read above possible values: true or false. deleteProposalsLastTouchedOlderThan (date format Y-m-d)Delete all proposals in a listed termCollections, that have a creation date older than this configs value. deleteProposalsOlderThanCurrentImport (boolean)Delete all proposals in a listed termCollections, that have a creation date older than the start of the current import. Important: with the import call, one or multiple tbx files must be provided. Importing additional files in term collection is also available via the general language resource import route: /editor/languageresourceinstance/[ID]/import. More info can be found here. |
There can be additional possibility to import terms to the term collection.
- Import tbx files via language resources panel with term collection as resource
- Using the term import plugin ( see more at Plug-In TermImport: TermImport )