Glossaries API

Provides operations on OMN glossaries.

Retrieve glossaries

/common/glossaries/retrieve Retrieve a list of glossaries by specified params.
Table 1. Details

Resource path

/api/core/v1/common/glossaries/retrieve

HTTP method

POST

Request content type

application/json

Response content type

  • application/xml; charset=UTF-8;

  • application/json

  • application/json+compact

Body parameters

Specified by GlossaryRequest

  • names - (List of type String) - The names of the glossaries to retrieve;

  • ids - (List of type Integer) - The ids of the glossaries to retrieve;

  • retrieveLinks - (true|false) - It defines whether the contained entries (terms and sentences) should be included in the response. By default, it is false; (Optional)

  • sourceLocales - (List of type String) - Limits the source languages to the specified list of locales. Default: empty array which means all languages;

  • targetLocales - (List of type String) - Limits the target languages to the specified list of locales. Default: empty array which means all languages;

Return Type

OmnType with filled GlossariesType

Responses
Table 2. Http response codes
Code Message Datatype

200

OmnType with list of keywords

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.
Retrieve all glossaries
curl
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/common/glossaries/retrieve' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
}'
Request body
{
}
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-08-30T07:20:18.420Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <glossaries>
        <glossary id="0">
            <meta>
                <itm key="creationDate">1970-01-20T05:27:05.461Z</itm>
                <itm key="creationUser">system</itm>
                <itm key="getNumberOfTerms">0</itm>
                <itm key="modificationDate">1970-01-20T05:27:05.461Z</itm>
                <itm key="modificationUser">system</itm>
                <itm key="numberOfSentences">0</itm>
            </meta>
            <name>Default</name>
        </glossary>
        ...
        <glossary id="180350">
            <meta>
                <itm key="creationDate">1970-01-20T05:27:05.461Z</itm>
                <itm key="creationUser">system</itm>
                <itm key="getNumberOfTerms">4</itm>
                <itm key="modificationDate">1970-01-20T05:27:05.461Z</itm>
                <itm key="modificationUser">system</itm>
                <itm key="numberOfAllEntries">8</itm>
                <itm key="numberOfSentences">4</itm>
            </meta>
            <name>Latest Glossary</name>
            <vals>
                <val attr="CUSTOM_DATE_ATTRIBUTE">
                    <itm>2022-08-24T02:37:38.000Z</itm>
                </val>
                <val attr="CUSTOM_BOOLEAN_ATTRIBUTE">
                    <itm>false</itm>
                </val>
            </vals>
        </glossary>
    </glossaries>
</pim>
Retrieve specific Glossary with entries, target links embedded and filter source- and target-languages
curl
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/common/glossaries/retrieve' \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "names": [
        "Latest Glossary"
    ],
    "retrieveEntries": true,
    "sourceLocales": [
        "de_DE"
    ],
    "targetLocales": [
        "en_EN",
        "fr_FR"
    ]
}'
Request body
{
    "names": [
        "Latest Glossary"
    ],
    "retrieveEntries": true,
    "sourceLocales": [
        "de_DE"
    ],
    "targetLocales": [
        "en_EN",
        "fr_FR"
    ]
}
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-08-30T09:13:17.366Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <glossaries>
        <glossary id="180350">
            <meta>
                <itm key="creationDate">1970-01-20T05:27:05.461Z</itm>
                <itm key="creationUser">system</itm>
                <itm key="getNumberOfTerms">4</itm>
                <itm key="modificationDate">1970-01-20T05:27:05.461Z</itm>
                <itm key="modificationUser">system</itm>
                <itm key="numberOfAllEntries">8</itm>
                <itm key="numberOfSentences">4</itm>
            </meta>
            <name>Latest Glossary</name>
            <vals>
                <val attr="CUSTOM_DATE_ATTRIBUTE">
                    <itm>2022-08-24T02:37:38.000Z</itm>
                </val>
                <val attr="CUSTOM_BOOLEAN_ATTRIBUTE">
                    <itm>false</itm>
                </val>
            </vals>
        </glossary>
    </glossaries>
    <glossaryEntries>
        <glossaryEntry id="185852" parentId="180350" loc="de_DE" type="term">
            <meta>
                <itm key="value" loc="de_DE">de</itm>
                <itm key="lastEditedUsername">admin</itm>
                <itm key="lastEditedDate">2022-08-15T00:00:00.000Z</itm>
            </meta>
            <links>
                <itms id="185850" loc="en_EN" type="term">
                    <itm key="similarity">100</itm>
                    <itm key="forbidden">true</itm>
                    <itm key="value" loc="en_EN">en</itm>
                    <itm key="lastEditedUsername">admin</itm>
                    <itm key="lastEditedDate">2022-08-15T00:00:00.000Z</itm>
                </itms>
                <itms id="185851" loc="fr_FR" type="term">
                    <itm key="similarity">100</itm>
                    <itm key="forbidden">true</itm>
                    <itm key="value" loc="fr_FR">fr</itm>
                    <itm key="lastEditedUsername">admin</itm>
                    <itm key="lastEditedDate">2022-08-15T00:00:00.000Z</itm>
                </itms>
            </links>
        </entry>
    </glossaryEntries>
</pim>

Persist glossaries

/common/glossaries/persist Create or update the glossaries
Table 3. Details

Resource path

/api/core/v1/common/glossaries/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

OmnType with filled GlossariesType

Return Type

OmnType with filled ResponsesType

Responses
Table 4. Http response codes
Code Message Datatype

200

OmnType with list of ResponseTypes

OmnType

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
curl
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/common/glossaries/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">
    <glossaries>
        <glossary>
            <name>Default</name>
            <meta>
                <itm key="multipleTranslations">true</itm>
            </meta>
        </glossary>
  </glossaries>
</pim>'
Request body
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <glossaries>
        <glossary>
            <name>Default</name>
            <meta>
                <itm key="multipleTranslations">true</itm>
            </meta>
        </glossary>
  </glossaries>
</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="create" dataType="glossary" id="2380740">
            <description>The glossary has been created successfully</description>
            <status>SUCCESS</status>
        </response>
    </responses>
</pim>
Update glossary
Update glossary by ID
curl
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/common/glossaries/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">
    <glossaries>
        <glossary id="180350">
            <name>New glossary name</name>
            <vals>
                <val attr="STRING_PROP_TO_EDIT">
                    <itm>new value</itm>
                </val>
            </vals>
        </glossary>
    </glossaries>
</pim>'
Request body
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <glossaries>
        <glossary id="180350">
            <name>New glossary name</name>
            <vals>
                <val attr="STRING_PROP_TO_EDIT">
                    <itm>new value</itm>
                </val>
            </vals>
        </glossary>
    </glossaries>
</pim>
Update glossary by TID
curl
curl --location --request POST 'https://<OMN_SERVER>/api/core/v1/common/glossaries/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">
    <glossaries>
        <glossary tid="56948c33-29bc-46d1-be81-6fd9452d910f">
            <vals>
                <val attr="NUM_PROP_TO_EDIT">
                    <itm>1234</itm>
                </val>
            </vals>
        </glossary>
    </glossaries>
</pim>'
Request body
<?xml version="1.0" encoding="UTF-8"?>
<pim xmlns="http://www.apollon.de/omn" schemaVersion="5.6.0">
    <glossaries>
        <glossary tid="56948c33-29bc-46d1-be81-6fd9452d910f">
            <vals>
                <val attr="NUM_PROP_TO_EDIT">
                    <itm>1234</itm>
                </val>
            </vals>
        </glossary>
    </glossaries>
</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 dataType="glossary" id="180350" action="update">
            <status>SUCCESS</status>
            <description>The glossary has been updated successfully</description>
        </response>
    </responses>
</pim>
Error responses
Unable to create the glossary: glossary with provided name already exists
<?xml version="1.0" encoding="UTF-8"?>
<response xmlns="http://www.apollon.de/omn">
  <details>
    <itm key="supportId">3C5D451A-91D9-437F-8477-03A232C13527</itm>
    </details>
    <issues>
        <itm key="code">1000</itm>
        <itm key="description">An unknown internal error occurred</itm>
        <itms type="details">
            <itm key="errorMessage">Unable to create the glossary: glossary with name 'Default' already exists.</itm>
        </itms>
    </issues>
    <status>ERROR</status>
</response>

Delete glossaries

/common/glossaries/perform Delete Glossaries Custom Attributes
Table 5. Details

Resource path

/api/core/v1/common/glossaries/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
Return Type
Responses
Table 6. Http response codes
Code Message Datatype

200

[OmnType] with list of [ResponseType]s

[OmnType]

400

Invalid input provided

[ResponseTypeDto]

401

Not authorized

[ResponseTypeDto]

404

The requested resource could not be found

[ResponseTypeDto]

500

An unknown internal error occurred

[ResponseTypeDto]

Samples
Please use transform endpoint to get the JSON/compact-JSON samples from the XML one.
Delete glossary attribute by glossary ID
curl
curl --location -g --request POST 'https://<OMN_SERVER>/common/glossaries/perform' \
--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">
    <meta>
        <itm key="messageType">request</itm>
        <itm key="messageTime">2022-06-08T12:54:32.990Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <actions>
        <action dataType="glossary" id="37272" type="delete"/>
    </actions>
</pim>'
Request 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-08T12:54:32.990Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <actions>
        <action dataType="glossary" id="123" type="delete"/>
    </actions>
</pim>
Response body (Success)
<?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-15T13:37:04.635Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="glossary" id="123" action="delete">
            <status>SUCCESS</status>
            <description>Glossary has been deleted.</description>
        </response>
    </responses>
</pim>
Response body (Error: a Glossary 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-15T13:37:53.018Z</itm>
        <itm key="sourceEnv">web</itm>
    </meta>
    <responses>
        <response dataType="glossary" action="delete" id="123">
            <status>ERROR</status>
            <description>The glossary with id "123" does not exist.</description>
        </response>
    </responses>
</pim>

Welcome to the AI Chat!

Write a prompt to get started...