Page tree

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

Compare with Current View Page History

« Previous Version 16 Next »

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
RequestGET /editor/plugins_termportal_data
Params

locale=(en|de) Optional. default 'en'. See titles in l10n in example response below

Response
{
    "locale": "en",                                  // Current locale
    "role": {                                        // Roles assigned to current user
        "admin": true,
        "api": true,
        "editor": true,
        "pm": true,
        "termCustomerSearch": true,
        "termProposer": true,
        "termFinalizer": true,
        "termPM": true,
        "termPM_allClients": true,
        "termReviewer": true,
        "basic": true,
        "noRights": true
    },
    "permission": {                                  // Permissions to access
        "termportal": true,                          //  - TermPortal
        "itranslate": false                          //  - InstantTranslate
    },
    "activeItem": "termportal",                      // Item active by default or last active item
    "l10n": {                                        // Localization wordings
        "termportal": "TermPortal",
        "itranslate": "InstantTranslate",
        "logout": "Logout",
        "localeStore": [
            {
                "locale": "en",
                "name": "English"
            },
            {
                "locale": "de",
                "name": "German"
            }
        ],
        "set": "Set filter",
        "clear": "Clear filter",
        "requiredMsg": "This field is required",
        "found": "Search results",
        "termPlaceholder": "Type the term here, even using wildcard e.g. \"myterm*\"",
        "filters": "Filters",
        "client": "Client",
        "noCollections": "There are no TermCollections assigned to you.",
        "activeFilters": {
            "clientIds": "Clients",
            "collectionIds": "Term Collections",
            "noTermDefinedFor": "No term defined for language",
            "disabledDueToRefMode": "Filters are disabled while you're in ref-mode",
            "tbxCreatedBy": "Created by",
            "tbxUpdatedBy": "Updated by",
            "tbxCreatedGt": "Created since",
            "tbxCreatedLt": "Created until",
            "tbxCreatedAt": "Created at",
            "tbxUpdatedGt": "Updated since",
            "tbxUpdatedLt": "Updated until",
            "tbxUpdatedAt": "Updated at"
        },
        "processStatuses": {
            "unprocessed": "Unprocessed",
            "provisionallyProcessed": "Provisionally processed",
            "finalized": "Finalized",
            "rejected": "Rejected"
        },
        "statuses": {
            "preferredTerm": "Preferred",
            "admittedTerm": "Admitted",
            "deprecatedTerm": "Forbidden",
            "supersededTerm": "Forbidden"
        },
        "collections": "Term collections",
        "collection": "Term collection",
        "attributes": "Select an attribute",
        "noTermDefinedFor": "No term defined for language (\"en\" does NOT find \"en-US\")",
        "siblings": {
            "title": "Terms of entry of selected result",
            "langToShow": "Languages to show",
            "itranslate": {
                "label": "InstantTranslate into",
                "placeholder": "select language"
            }
        },
        "xref": {
            "xGraphic": {
                "title": "External images",
                "info": "Allows you to link to an external image, for example, on a website."
            },
            "externalCrossReference": {
                "title": "External references",
                "info": "Allows you to reference an external source, e. g. such as a website."
            },
            "value": {
                "renderer": "Double-click to specify name",
                "placeholder": "Specify name"
            },
            "target": {
                "renderer": "Double-click to specify url",
                "placeholder": "Specify Url"
            }
        },
        "ref": {
            "title": "Cross references",
            "entry": "Referenced entries",
            "language": "Referenced entries",
            "term": "Referenced terms",
            "target": "Double-click to specify TBX ID",
            "info": {
                "entry": "Refers to another term entry. Please insert the TBX ID of the other entry.",
                "term": "Refers to another term. Please insert the TBX ID of the other term."
            }
        },
        "term": "Terms",
        "termTbx": "Term",
        "entry": "Entry",
        "images": "Images",
        "image": "Image",
        "attrs": "Attributes",
        "attrAddComment": "Add comment",
        "actions": "Actions",
        "entryAttrs": "Entry attributes",
        "languageAttrs": "Language-level attributes",
        "termAttrs": "Term attributes",
        "termportalLangs": "TermPortal languages",
        "allOtherAvailableLangs": "All other languages available",
        "addedFromMT": "Added from MT",
        "propose": {
            "button": {
                "text": "Propose a new term entry",
                "text404": "Propose a new entry using searched word"
            },
            "please": {
                "collection": "Please select term collection",
                "language": "Please select language"
            },
            "termfield": {
                "placeholder": "Propose a new term",
                "errorMsg": "Term must contain at least one character that is not a whitespace",
                "label": "On saving the term proposal also a proposal for the source language term will be saved"
            },
            "notefield": {
                "placeholder": "Provide a comment",
                "errorMsg": "This field is required"
            },
            "multisource": "Please select one of the source terms below. They belong to different term entries. After selection you are able to add your new term translation to translate5 termPortal."
        },
        "attrWarn": {
            "entry": "Entry level attribute - changes will take place for all terms of this entry",
            "language": "Language level attribute - changes will take place for all [flag]-terms",
            "valueOverflow": "Value of this field if not fully visible due to field width"
        },
        "attrLabel": {
            "original": "Original label: ",
            "empty": "none"
        },
        "attrAlreadyAll": "All available attributes are already in use.",
        "attrDeleteOnStatusChange": "The values of {0} depend on the attribute {1}, whose values have just been changed.\n\n The new value of {1} does not correspond to any value of {0}.\n\n Therefore, the attribute {0} has been deleted.",
        "addTermProposal": "Propose a new Term",
        "batch": "Batch edit",
        "transfer": {
            "btn": {
                "text": "Start translation",
                "tooltip": {
                    "disabled": "Select exactly 1 client in filter window to make transfer possible",
                    "enabled": "Creates a translation project for selected terms"
                }
            },
            "title": "Create translation project for terms",
            "projectName": "Project name",
            "targetLang": "Target languages",
            "translated": "Send already translated terms to translation also?",
            "definition": "Translate definitions",
            "create": "Create project",
            "creating": "Your project '{0}' is being created",
            "created": "Your project '{0}' was successfully created"
        },
        "termDelete": "Do you really want to delete the term \"{0}\"?",
        "attrDelete": "Do you really want to delete the attribute \"{0}\"?",
        "save": "Save",
        "cancel": "Cancel",
        "delete": "Delete",
        "status": "Usage status",
        "processStatus": "Process status"
    },
    "filterWindow": {                                     // Filter window comboboxes data
        "collections": [
            {
                "id": "1",
                "title": "My Term Collection 1",
                "clients": "1"
            },
            {
                "id": "2",
                "title": "My Term Collection 2",
                "clients": "1,2"
            },
            ...
        ],
        "clients": [
            {
                "id": "1",
                "title": "My Customer 1"
            },
            {
                "id": "2",
                "title": "My Customer 2"
            },
            ...
        ],
        "attributes": {
            "1": {
                "id": "1",
                "title": "Some plaintext attribute",
                "system": "Some plaintext attribute",
                "alias": "attr-1",
                "dataType": "plainText",
                "picklistValues": null,
                "level": "entry,language,term",
                "isTbxBasic": 0,
                "type": "somePlainTextAttr",
                "collections": null
            },
            "2": {
                "id": "2",
                "title": "Some picklist attribute with custom title",
                "system": "Some picklist attribute",
                "alias": "attr-2",
                "dataType": "picklist",
                "picklistValues": "noun,verb,adjective,adverb,properNoun,other",
                "level": "term",
                "isTbxBasic": 1,
                "type": "somePickListAttr",
                "collections": "1,2"
            },
            ...
        },
        "processStatuses": [
            {
                "title": "Unprocessed",
                "alias": "unprocessed"
            },
            {
                "title": "Provisionally processed",
                "alias": "provisionallyProcessed"
            },
            {
                "title": "Finalized",
                "alias": "finalized"
            },
            {
                "title": "Rejected",
                "alias": "rejected"
            }
        ],
        "tbxCreatedBy": [
            {
                "id": "1",
                "name": "Person 1 specified in tbx <transacgrp>-node as creator"
            },
            {
                "id": "2",
                "name": "Person 2 specified in tbx <transacgrp>-node as creator"
            },
            ...
        ],
        "tbxUpdatedBy": [
            {
                "id": "1",
                "name": "Person 1 specified in tbx <transacgrp>-node as updater"
            },
            {
                "id": "3",
                "name": "Person 3 specified in tbx <transacgrp>-node as updater"
            },
            ...
        ]
    },
    "filterPanel": {
        "activeFilters": [                                // Active filters comboboxes data
            {
                "title": "Clients",
                "alias": "clientIds"
            },
            {
                "title": "Term Collections",
                "alias": "collectionIds"
            },
            {
                "title": "No term defined for language",
                "alias": "noTermDefinedFor"
            },
            {
                "title": "Process status",
                "alias": "processStatus"
            },
            {
                "title": "TBX-Entry-ID",
                "alias": "termEntryTbxId"
            },
            {
                "title": "TBX-Term-ID",
                "alias": "termTbxId"
            },
            {
                "title": "Created by",
                "alias": "tbxCreatedBy"
            },
            {
                "title": "Updated by",
                "alias": "tbxUpdatedBy"
            },
            {
                "title": "Created until",
                "alias": "tbxCreatedLt"
            },
            {
                "title": "Created since",
                "alias": "tbxCreatedGt"
            },
            {
                "title": "Created at",
                "alias": "tbxCreatedAt"
            },
            {
                "title": "Updated until",
                "alias": "tbxUpdatedLt"
            },
            {
                "title": "Updated since",
                "alias": "tbxUpdatedGt"
            },
            {
                "title": "Updated at",
                "alias": "tbxUpdatedAt"
            }
        ]
    },
    "lang": [                       // TermPortal languages with respect to TermPortal.showSubLanguages cfg
        {
            "id": "251",
            "value": "en-GB",
            "text": "English (UK) (en-GB)",
            "flag": "gb"
        },
        {
            "id": "252",
            "value": "en-US",
            "text": "English (US) (en-US)",
            "flag": "us"
        },
        {
            "id": "5,251,252,367,368,369,370,371,372,373,374,375,376,377",
            "value": "en",
            "text": "English (en)",
            "flag": "gb"
        },
        ...
    ],
    "langInclSubs": [           // TermPortal languages with no respect to TermPortal.showSubLanguages cfg
        {
            "id": "344",
            "value": "ar-SA",
            "text": "Arabic (Saudi Arabia) (ar-SA)",
            "flag": "sa"
        },
        {
            "id": "331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347",
            "value": "ar",
            "text": "Arabic (ar)",
            "flag": "sa"
        },
        ...
    ],
    "flag": {                   // [Language rfc5646 -> Flag filename] pairs
        "de": "de",
        "en": "gb",
        "es": "es",
        "en-gb": "gb",
        "en-us": "us",
        "fr": "fr",
        "ha": "",
        ...
    },
    "langAll": [                // All languages available
        {
            "_disabled": true,
            "value": "tp",
            "text": "TermPortal languages"
        },
        {
            "id": "251",
            "value": "en-GB",
            "text": "English (UK) (en-GB)",
            "flag": "gb"
        },
        {
            "id": "252",
            "value": "en-US",
            "text": "English (US) (en-US)",
            "flag": "us"
        },
        {
            "id": "5,251,252,367,368,369,370,371,372,373,374,375,376,377",
            "value": "en",
            "text": "English (en)",
            "flag": "gb"
        },
        ...
        {
            "_disabled": true,
            "value": "all",
            "text": "All other languages available"
        },
        {
            "id": "496",
            "value": "zh-HK",
            "text": "Chinese (Hong Kong) (zh-HK)",
            "flag": "hk"
        },
        {
            "id": "371",
            "value": "en-IE",
            "text": "English (Ireland) (en-IE)",
            "flag": "ie"
        },
    ],
    "language": "5,251,252,367,368,369,370,371,372,373,374,375,376,377", // Id of currently selected language. If comma-separated it 
                                                                         // means it’s not a certain sublanguage, so is containing all 
                                                                         // sublanguages ids
    "cfg": {                                       // Those of config options that client app rely on
        "commentAttributeMandatory": false,        // Comment attribute is required while making  a new term proposal. Not applicable to 
                                                   // making proposal for existing term
        "newTermAllLanguagesAvailable": false,     // Flag indicating whether or not all languages should be available for selection 
                                                   // while creating new term
        "liveSearchMinChars": "4",                 // Min chars for terms live search to work
        "itranslate": {                            
            "showSubLanguages": false              // Whether or not InstantTranslate.showSubLanguages config is turned on
        }
    },
    "right": {                      // Those of access rights that client app rely on
        "delete": {                   
            "attribute": true       // Whether DELETE-request to /editor/attribute is allowed
        },
        "deleteAny": {
            "attribute": true       // If false, not any but only certain attributes are deletable
        }
    }
}
Term search
RequestGET /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 filterWindow.clients in Client app setup data response structure


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


Provides access to the Term collections available in the application.

URL:

/editor/term/[ID]

Available Methods:

GET / POST / PUT / DELETE

Operations (POST)

/editor/term/[ID]/propose/operation

/editor/term/[ID]/confirmProposal/operation

Specialities:

-

Resource Layout

Name

Type

Info

id

int

GET only

term

string

The term itself

midstringA textual mid used in the TBX file

status

stringThe term status, one of:

preferredTerm, admittedTerm, legalTerm, regulatedTerm, standardizedTerm, deprecatedTerm, supersededTerm

processStatus

string

The current processing status of a term, one of: unprocessed, provisionallyProcessed, finalized

definitionstringThe term describing definition
groupIdstringThe mid of the termEntry
languageintegerthe internal language id of the term
collectionIdintegerthe collection id of the collection to which the term belongs
termEntryIdintegerthe internal term entry id of the term entry to which the term belongs
createdtimestampGET only, Date and time when the term collection is created
updatedtimestampGET only, Date and time when the term collection is updated
proposalobjectGET only, null, or an object containing the proposal data object.


Propose Operation

URL:

/editor/term/[ID]/propose/operation

Available Methods:

POST

Description

Creates a new proposal for the term
POST Data (form encoded)data={"term": "New Proposal"}

Confirm Proposal Operation

URL:

/editor/term/[ID]/confirmproposal/operation

Available Methods:

POST

Description

Confirms a proposal and takes it over into the term itself.
POST Data-
  • No labels