Page tree

Versions Compared

Key

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

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.


Note

If the API changes in an incompatible manner this is listed explicitly in the "important release notes" section of each releases changelog.

...

Delete termcollection

Request

DELETE /editor/termcollection/ID 

URI ParamsID Required. Id of a termcollection to be deleted

Note: Deleting term collection will remove all terms, terms attributes and term entry attributes assigned to this term collection

Code Block
languagejs
titleResponse
collapsetrue
{
    "success": true
}

Description

...



Import terms to the term collection

...

via tbx-file

Request

POST /

URL:

editor/termcollection/import

Available Methods:POSTSpecialities:Import the provided terms from the tbx file to the term collection
ParamscollectionId Required. Id of a termcollection where terms should be imported to.

customerIds Optional. Comma-separated list of customers ids for this termcollection to be associated with.

mergeTerms Optional. Boolean value to merge imported terms with terms already existing (if any) in the target termcollection. By default - false. The merge process is complex and completely described here.

importSource Optional. If given, should be either 'filesystem' or 'crossApi'

deleteTermsLastTouchedOlderThan Optional. If given, should be in YYYY-MM-DD format, so that any terms last updated before the given date - will be deleted from the target TermCollection. 'Last updated' date for a term is initially set up at current date on import and then refreshed each time term is renamed and/or any of it's attributes created/updated/deleted.


Code Block
languagejs
titleResponse
collapsetrue
{
    "success": true
}



POST request parameters example(json):

Details for the resource parameters:

collectionId

The id of the term collection where those terms from the tbx file are going to

customerId

Customer to that this term collection is associated

mergeTerms

The merging of terms into an existing term collection is controlled by this boolean parameter.

The merge process is complex and completely described here.

{

"data":{

          "collectionId": 1, 

          "customerId":1000,

          "mergeTerms":true,

          "tbxUpload": ,

          "deleteTermsLastTouchedOlderThan": "2018-05-01",

          "deleteTermsOlderThanCurrentImport": true,

          "deleteProposalsLastTouchedOlderThan": 2018-05-01",

          "deleteProposalsOlderThanCurrentImport" : true

          }
}


tbxUpload

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.
The updated date is not shown in the GUI and is changed every time a user changes the term through touching it in the GUI or through an import. tbx file/files (or a zip file containing TBX files) uploaded as multipart/form-data

deleteTermsLastTouchedOlderThan (date format Y-m-d)


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.


...