Glossary entries API

Provides operations on OMN glossary entries.

Persist glossary entries

/common/glossaryEntries/persist Create or update the glossary entries
Table 1. Details

Resource path

/api/core/v1/common/glossaryEntries/persist

HTTP method

POST

Request content type

  • application/xml; charset=UTF-8;

  • application/json

  • application/json+compact

Response content type

  • application/xml; charset=UTF-8;

  • application/json

  • application/json+compact

Body parameters
Return Type

PimType with filled ResponsesType

Responses
Table 2. Http response codes
Code Message Datatype

200

PimType with list of ResponseTypes

PimType

400

Invalid input provided

ResponseType

404

The requested resource could not be found

ResponseType

500

An unknown internal error occurred

ResponseType

Samples
Please use transform endpoint to get the JSON/compact-JSON samples from the XML one.
Create glossary entry
curl
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/common/glossaryEntries/persist' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/xml' \
--data-raw '<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <glossaryEntries>
        <glossaryEntry parentId="41550" loc="de_DE" type="term">
            <meta>
                <itm key="value" loc="de_DE">T DE 1</itm>
                <itm key="forbidden">false</itm>
                <itm key="lastEditedUsername">admin</itm>
                <itm key="lastEditedDate">2022-12-14T03:00:00.000+03:00</itm>
            </meta>
            <links>
                <itms loc="en_EN" mode="delta" type="term">
                    <itm key="similarity">100</itm>
                    <itm key="value" loc="en_EN">T EN 1</itm>
                    <itm key="forbidden">false</itm>
                    <itm key="lastEditedUsername">admin</itm>
                    <itm key="lastEditedDate">2022-12-14T03:00:00.000+03:00</itm>
                </itms>
            </links>
        </glossaryEntry>
    </glossaryEntries>
</pim>'
Request body
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <glossaryEntries>
        <glossaryEntry parentId="41550" loc="de_DE" type="term">
            <meta>
                <itm key="value" loc="de_DE">T DE 1</itm>
                <itm key="forbidden">false</itm>
                <itm key="lastEditedUsername">admin</itm>
                <itm key="lastEditedDate">2022-12-14T03:00:00.000+03:00</itm>
            </meta>
            <links>
                <itms loc="en_EN" mode="delta" type="term">
                    <itm key="similarity">100</itm>
                    <itm key="value" loc="en_EN">T EN 1</itm>
                    <itm key="forbidden">false</itm>
                    <itm key="lastEditedUsername">admin</itm>
                    <itm key="lastEditedDate">2022-12-14T03:00:00.000+03:00</itm>
                </itms>
            </links>
        </glossaryEntry>
    </glossaryEntries>
</pim>
Response body
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <meta>
        <itm key="messageType">request</itm>
        <itm key="messageTime">2022-07-06T11:42:19.832Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response action="create" dataType="glossaryEntry" tid="56948c33-29bc-46d1-be81-6fd9452d910f">
          <description>The glossary entry has been created successfully</description>
          <status>SUCCESS</status>
        </response>
    </responses>
</pim>
Update glossary entry
Update by ID
curl
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/common/glossaryEntries/persist' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/xml' \
--data-raw '<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <glossaryEntries>
        <glossaryEntry id="29638" parentId="99" loc="de_DE" type="term">
            <meta>
                <itm key="value" loc="de_DE">T DE 1 updated</itm>
            </meta>
        </glossaryEntry>
    </glossaryEntires>
</pim>'
Request body
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <glossaryEntries>
        <glossaryEntry id="29638" parentId="99" loc="de_DE" type="term">
            <meta>
                <itm key="value" loc="de_DE">T DE 1 updated</itm>
            </meta>
        </glossaryEntry>
    </glossaryEntries>
</pim>
Update by TID
curl
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/common/glossaryEntries/persist' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/xml' \
--data-raw '<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <glossaryEntries>
        <glossaryEntry tid="3C5D451A-91D9-437F-8477-03A232C13527" parentTid="D870FF6D-BDF9-41D3-944D-67A8296BD095" loc="de_DE" type="term">
            <meta>
                <itm key="value" loc="de_DE">T DE 1 updated</itm>
            </meta>
        </glossaryEntry>
    </glossaryEntires>
</pim>'
Request body
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <glossaryEntries>
        <glossaryEntry tid="3C5D451A-91D9-437F-8477-03A232C13527" parentTid="D870FF6D-BDF9-41D3-944D-67A8296BD095" loc="de_DE" type="term">
            <meta>
                <itm key="value" loc="de_DE">T DE 1 updated</itm>
            </meta>
        </glossaryEntry>
    </glossaryEntires>
</pim>
Response body
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <meta>
        <itm key="messageType">request</itm>
        <itm key="messageTime">2022-06-14T14:34:40.177Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response action="update" dataType="glossaryEntry" id="29638">
            <description>The glossary entry has been updated successfully</description>
            <status>SUCCESS</status>
        </response>
    </responses>
</pim>
Error responses
Unknown translation entry type: Unsupported translation entry type was used
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <meta>
        <itm key="messageType">request</itm>
        <itm key="messageTime">2022-07-06T11:45:41.247Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="glossaryEntry" id="29638">
            <description>Unknown translation entry type 'sentenc'</description>
            <status>ERROR</status>
        </response>
    </responses>
</pim>
Sentence/term not found: Sentence or term with provided ID/TID does not exist
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <meta>
        <itm key="messageType">request</itm>
        <itm key="messageTime">2022-07-06T11:45:41.247Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="glossaryEntry" id="29638">
            <description>Sentence with identity '29638' not found.</description>
            <status>ERROR</status>
        </response>
    </responses>
</pim>
Glossary entry does not contain a link to glossary: Either parentId or parenTid must always be present
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <meta>
        <itm key="messageType">request</itm>
        <itm key="messageTime">2022-07-06T11:45:41.247Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="glossaryEntry" tid="56948c33-29bc-46d1-be81-6fd9452d910f">
            <description>Glossary entry '56948c33-29bc-46d1-be81-6fd9452d910f' does not contain a link to glossary.</description>
            <status>ERROR</status>
        </response>
    </responses>
</pim>
Glossary does not exist: Glossary with provided parentId/parentTid does not exist
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <meta>
        <itm key="messageType">request</itm>
        <itm key="messageTime">2022-08-17T10:54:57.295Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="glossaryEntry" id="25246">
          <description>There is no glossary with the given identity</description>
          <status>ERROR</status>
        </response>
    </responses>
</pim>

Perform glossary entries

/common/glossaryEntries/perform Perform action of the specific type on glossary entries
Table 3. Details

Resource path

/api/core/v1/common/glossaryEntries/perform

HTTP method

POST

Request content type

  • application/xml; charset=UTF-8;

  • application/json

  • application/json+compact

Response content type

  • application/xml; charset=UTF-8;

  • application/json

  • application/json+compact

Body parameters

OmnType with filled ActionsType

  • Provided ActionTypes must have the following fields:

    • Data type: glossaryEntry;

    • ID or TID of glossary entry;

    • Action type: delete, copyToGlossary or moveToGlossary.

Return Type

OmnType with filled ResponsesType

Responses
Table 4. Http response codes
Code Message Datatype

200

OmnType with list of successful or error ResponseTypes

OmnType

400

Invalid input provided

ResponseType

500

An unknown internal error occurred

ResponseType

Samples
Please use transform endpoint to get the JSON/compact-JSON samples from the XML one.
Delete glossary entry
Delete by ID
curl
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/common/glossaryEntries/perform' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/xml' \
--data-raw '<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <actions>
        <action dataType="glossaryEntry" id="30670" type="delete"/>
    </actions>
</pim>'
Request body
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <actions>
        <action dataType="glossaryEntry" id="30670" type="delete"/>
    </actions>
</pim>
Delete by TID
curl
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/common/glossaryEntries/perform' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/xml' \
--data-raw '<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <actions>
        <action dataType="glossaryEntry" tid="56948c33-29bc-46d1-be81-6fd9452d910f" type="delete"/>
    </actions>
</pim>'
Request body
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <actions>
        <action dataType="glossaryEntry" tid="56948c33-29bc-46d1-be81-6fd9452d910f" type="delete"/>
    </actions>
</pim>
Response body
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <meta>
        <itm key="messageType">request</itm>
        <itm key="messageTime">2022-06-04T13:24:53.286Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response action="delete" dataType="glossaryEntry" id="30670">
          <description>The glossary entry has been deleted successfully</description>
          <status>SUCCESS</status>
        </response>
    </responses>
</pim>
Copy glossary entry to another glossary
curl
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/common/glossaryEntries/perform' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/xml' \
--data-raw '<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <actions>
        <action dataType="glossaryEntry" id="29637" type="copyToGlossary">
            <meta>
                <itm key="glossaryId">25246</itm>
            </meta>
        </action>
    </actions>
</pim>'
Request body
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <actions>
        <action dataType="glossaryEntry" id="29637" type="copyToGlossary">
            <meta>
                <itm key="glossaryId">25246</itm>
            </meta>
        </action>
    </actions>
</pim>
Response body
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <meta>
        <itm key="messageType">request</itm>
        <itm key="messageTime">2022-06-04T13:24:53.286Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response action="copyToGlossary" dataType="glossaryEntry" id="29637">
            <description>Glossary entry has been copied</description>
            <status>SUCCESS</status>
        </response>
    </responses>
</pim>
Move glossary entry to another glossary
curl
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/common/glossaryEntries/perform' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/xml' \
--data-raw '<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <actions>
        <action dataType="glossaryEntry" id="29637" type="moveToGlossary">
            <meta>
                <itm key="glossaryId">25246</itm>
            </meta>
        </action>
    </actions>
</pim>'
Request body
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <actions>
        <action dataType="glossaryEntry" id="29637" type="moveToGlossary">
            <meta>
                <itm key="glossaryId">25246</itm>
            </meta>
        </action>
    </actions>
</pim>
Response body
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <meta>
        <itm key="messageType">request</itm>
        <itm key="messageTime">2022-06-04T13:24:53.286Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response action="moveToGlossary" dataType="glossaryEntry" id="29637">
            <description>Glossary entry has been moved</description>
            <status>SUCCESS</status>
        </response>
    </responses>
</pim>
Error responses
Glossary entry does not exist: Glossary entry with provided ID/TID does not exist
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <meta>
        <itm key="messageType">request</itm>
        <itm key="messageTime">2022-06-04T13:36:54.983Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
      <response action="delete" dataType="glossaryEntry" id="30670">
        <description>There is no glossary entry with the given tid/identity</description>
        <status>ERROR</status>
      </response>
    </responses>
</pim>
Glossary does not exist: Glossary with provided ID/TID does not exist
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <meta>
        <itm key="messageType">request</itm>
        <itm key="messageTime">2022-08-17T10:54:57.295Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response action="copyToGlossary" dataType="glossaryEntry" id="25246">
          <description>There is no glossary with the given identity</description>
          <status>ERROR</status>
        </response>
    </responses>
</pim>

Welcome to the AI Chat!

Write a prompt to get started...