Page tree

Versions Compared

Key

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

...

Delete term
RequestDELETE /editor/term
ParamstermId 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

Code Block
languagejs
titleResponse
collapsetrue
{
    "isLast": "(false|language|entry)",
    "modified": "Pavel Perminov, 06.05.2022 20:59:07"
}



Create attribute
RequestPOST /editor/attribute
ParamstermId 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 inserted.id contain comma-separated IDs of created attributes instead of just single integer value. Also please note that if some attribute should be unique at it's level but it already exists, the response will contain existing-prop, having newly-created attrs IDs as keys and existing attrs IDs as values. In the below example response we created two Comment-attributes on termEntry-level, for different termEntries, but one of affected termEntries does already have Comment-attribute with ID=2020358. All attributes created in batch-mode are set up with isDraft=1 flag in the database, so they are drafts, and they need to be confirmed futher, otherwise they will be deleted by daily cron job. 

Response in case of non-batch-mode would be the same as below, except that:

  1. inserted.id would contain single value instead of comma-separated values,
and except that
  1. there would be no existing-property in response json
Code Block
titleResponse
collapsetrue
{
    "inserted": {
        "id": "2020477,2020478",
        "target": "",
        "value": null,
        "type": null,
        "language": null,
        "deletable": true,
        "dataTypeId": "20",
        "created": "Pavel Perminov, 09.05.2022 08:37:44",
        "updated": "Pavel Perminov, 09.05.2022 08:37:44"
    },
    "updated": "Pavel Perminov, 09.05.2022 08:37:44",
    "existing": {
        "2020478": 2020358
    }
}



Provides access to the Term collections available in the application.

...