Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 22 Next »


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

Get termcollections list

RequestGET /editor/termcollection
Response
{
    "rows": [
        {
            "id": "1",
            "entityVersion": "4",
            "langResUuid": "6860f07a-e09f-4822-b82d-30d1961665aa",
            "name": "Some termcollection",
            "color": "19737d",
            "resourceId": "editor_Services_TermCollection",
            "serviceType": "editor_Services_TermCollection",
            "serviceName": "TermCollection",
            "specificData": "{\"fileName\":\"terminology.tbx\",\"status\":\"available\",\"termEntry\":2727,\"term\":15813,\"attribute\":47439}",
            "timestamp": "2025-05-29 09:59:02",
            "resourceType": "termcollection",
            "writeSource": "0",
            "specificId": null
        },
        {
            "id": "2",
            "entityVersion": "3",
            "langResUuid": "c6c275e1-fd72-47f2-9f8d-47ce01f0510e",
            "name": "Some another termcollection",
            "color": "19737d",
            "resourceId": "editor_Services_TermCollection",
            "serviceType": "editor_Services_TermCollection",
            "serviceName": "TermCollection",
            "specificData": "{\"fileName\":\"160.tbx\",\"status\":\"available\",\"termEntry\":1656,\"term\":13218,\"attribute\":48330}",
            "timestamp": "2025-05-29 10:10:10",
            "resourceType": "termcollection",
            "writeSource": "0",
            "specificId": null
        },
    ],
    "total": 2
}

Get an info for a certain termcollection

Request

GET /editor/termcollection/ID 

URI ParamsID Required. Id of a termcollection
Response
{
    "rows": {
        "id": "2",
        "entityVersion": "3",
        "langResUuid": "c6c275e1-fd72-47f2-9f8d-47ce01f0510e",
        "name": "Some another termcollection",
        "color": "19737d",
        "resourceId": "editor_Services_TermCollection",
        "serviceType": "editor_Services_TermCollection",
        "serviceName": "TermCollection",
        "specificData": "{\"fileName\":\"160.tbx\",\"status\":\"available\",\"termEntry\":1656,\"term\":13218,\"attribute\":48330}",
        "timestamp": "2025-05-29 10:10:10",
        "resourceType": "termcollection",
        "writeSource": "0",
        "specificId": null
    }
}

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

Response
{
    "success": true
}

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.

Provides access to the Term collections available in the application.

URL:

/editor/termcollection/[ID]

Available Methods:

POST

Resource Layout

Name

Type

Info

id

int

GET only

name

string

The name of the term collection (unique)

timestamp

DateTimeDate and time when the term collection is created

customerId

integer

Foreign key to the customers table


POST request parameters example :

  • create new empty term collection

{

 data:{

       "name":"The name of the term collection",

       "customerId":"the id of the customer to whom this collection is associated"

 }
}


GET request parameters example :

  • return the term collection name,timestamp and customerId for the termcollection with id = 1

{

 data:{

       "id":1

 }
}


Import terms to the term collection

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": 1, 

          "customerId":1000,

          "mergeTerms":true,

          "tbxUpload": ,

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

          "deleteTermsOlderThanCurrentImport": true,

          "deleteProposalsLastTouchedOlderThan": 2018-05-01",

          "deleteProposalsOlderThanCurrentImport" : true

          }
}

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.


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.
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. 

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. 

  1. Import tbx files via language resources panel with term collection as resource
  2. Using the term import plugin ( see more at Plug-In TermImport: TermImport )


  • No labels