Vocabulary Web Service

MpRIA supports a REST oriented web service API using the HTTP Protocol and its methods GET, POST, PUT and DELETE. The message body has an XML format defined by XML schema. The API provides CRUD operations. The only supported content type is application/xml. Make sure to include the following HTTP header when sending a message body:

Content Type: application/xml

Vocabulary data structures have evolved over time. Depending on the solution configuration you may be using the legacy Vocabulary / VocabularyGroup modules, or the new native Vocabulary interface. Please ask your zetcom representative to know how the vocabulary is configured on your solution.

Legacy style Vocabulary / VocabularyGroup modules

With the legacy vocabulary, nodes and groups are provided as regular modules (Like Object, Address, etc) and the same APIs can be used to query the vocabulary. The 2 modules to use are Vocabulary (containing the nodes) and VocabularyGroup (the vocabulary definition, sometimes called vocabulary instance). These 2 modules are read-only.

When a module references a legacy vocabulary node it will use a regular reference field to the Vocabulary module.

Each Vocabulary item contains an ID which identifies the VocabularyGroup it belongs to. Vocabulary groups are suffixed with Vgr.

See the Module Service API Methods on how to use the Legacy Vocabulary and VocabularyGroup modules. Keep in mind that the legacy Vocabulary and VocabularyGroup modules are read only. The API Methods described in the Vocabulary Service chapter will not work with the legacy modules.

The following example shows a simple use case of the legacy Vocabulary and VocabularyGroup modules.

Vocabulary Lookup

Let’s assume we have a vocabulary group named GenYesNoVgr with an id 100000051. First do a GET request to the VocabularyGroup module.

GET http://.../ria-ws/application/module/VocabularyGroup/100000051

The response body contains the module item GenYesNoVgr with id 100000051 of the module VocabularyGroup. Now take a look at the module reference called VgrVocabularyRef. This module reference contains all references to the Vocabulary module. The Vocabulary module holds all the nodes and its terms. We assume that the response body contains to references 100000060 and 100000061. A GET request to both references shows what value are connected to the ids.

GET http://.../ria-ws/application/module/Vocabulary/100000060
GET http://.../ria-ws/application/module/Vocabulary/100000061

In the case of our GenYesNoVgr one of the responses could contain the 'yes' and one the 'no' term.

Native Vocabulary module

On newer solutions the vocabulary system is part of the framework and doesn’t use regular modules. Instead dedicated API methods are provided to query the definitions and the nodes.

The Vocabulary Service supports HTTP Accept header values application/xml and application/json

Vocabulary Lookup

Let’s assume we have a vocabulary instance named AdrContactTypeVgr. Do a GET request to search for all nodes.

GET http://.../ria-ws/application/vocabulary/instances/AdrContactTypeVgr/nodes/search

To set a vocabulary reference you have to use the id attribute value of the node you want to reference. You must make sure that the vocabulary instance name matches the instanceName in the vocabulary reference description.

API Methods

Get information for a vocabulary definition / instance

GET http://.../ria-ws/application/vocabulary/instances/{instanceName}
  • Parameters:

    • instanceName: Name of the vocabulary instance to get information for

  • Request header:

    • Accept: application/xml or application/json

Shows the vocabulary instance information for the give vocabulary.

Example

Retrieve instance information for the vocabulary GenYesNoVgr. For an information about what vocabulary instances are available, check the module definition. Modules that contain vocabulary reference fields have their vocabulary instance name attached.

curl -X "GET" "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr" \
	-u <Username>:<Password>
  • Get information for a vocabulary node

GET http://../ria-ws/application/vocabulary/instances/{instanceName}/nodes/{__id}
  • Parameters:

    • instanceName: Name of the vocabulary instance to get information for

    • __id: Id of the specific node to get information for

  • Request header:

    • Accept: application/xml or application/json

Example

Retrieve information for a vocabulary node with id 30891 of the vocabulary instance GenYesNoVgr

curl -X "GET" "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr/nodes/30891" \
	-u <Username>:<Password>

Get all nodes for a vocabulary definition

GET http://.../ria-ws/application/vocabulary/instances/{instanceName}/nodes/search
  • Parameters:

    • instanceName: Name of the vocabulary instance to get information for

  • URL parameters (e.g. &offset=5):

    • offset | type: integer | default: 0 | the offset to start the output from

    • limit | type: integer | default: 100 | limit the amount of nodes returned

    • termContent | type: string | filter by term content

    • status | type: enum | values: valid, candidate, refused | filter by status

    • nodeName | type: string | filter by node name

  • Request header:

    • Accept: application/xml or application/json

The request returns available vocabulary nodes of the vocabulary instance.

Example

Search for all nodes of vocabulary instance GenYesNoVgr

curl -X "GET" "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr/nodes/search/" \
  -u <Username>:<Password>

Searches for nodes of instance AdrContactGrp.

curl -X "GET" "https://<host>/<application>/ria-ws/application/vocabulary/instances/AdrContactTypeVgr/nodes/search/?offset=0&limit=5&status=valid&nodeName=skype" \
	-u <Username>:<Password>

Compare with an example response that would not be filtered by status or node name: vocabulary-search-nodes-AdrContactGrp-all-nodes-response.xml

Update Vocabulary Instance

PUT https://.../ria-ws/application/vocabulary/instances/{instanceName}
  • Parameters:

    • instanceName: Name of the vocabulary instance to update

  • Request header:

    • Content-Type: application/xml or application/json (experimental)

  • Request body definition: instance element from vocabulary_1_1.xsd

Example

Update the vocabulary instance with logical name GenYesNoVgr. Its type is set to list and the instanceSource is removed, if there was one.

curl -X "PUT" "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr" \
     -H 'Content-Type: application/xml' \
     -u <Username>:<Password> \
     -d $'<instance xmlns="http://www.zetcom.com/ria/ws/vocabulary" logicalName="GenYesNoVgr" id="30297">
  <type logicalName="list"/>
  <instanceSource></instanceSource>
</instance>'

Get Vocabulary Instance labels

GET https://.../ria-ws/application/vocabulary/instances/{instanceName}/labels
  • Parameters:

    • instanceName: Name of the vocabulary instance to get the labels for

  • Request header:

    • Accept: application/xml or application/json (experimental)

  • Response body definition: labels element from vocabulary_1_1.xsd

Example

Get the labels of the vocabulary instance with logical name GenYesNoVgr

curl "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr/labels" \
     -H 'Accept: application/xml' \
     -u <Username>:<Password'

Add Vocabulary Instance label

POST https://.../ria-ws/application/vocabulary/instances/{instanceName}/labels
  • Parameters:

    • instanceName: Name of the vocabulary instance to add a label to.

  • Request header:

    • Content-Type: application/xml or application/json (experimental)

  • Request body definition: label element from vocabulary_1_1.xsd

Example

Create a new label for the vocabulary instance with logical name GenYesNoVgr. If the label already exists for the given language, the existing label will be overridden.

curl -X "POST" "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr/labels" \
     -H 'Content-Type: application/xml' \
     -u <Username>:<Password> \
     -d $'<label xmlns="http://www.zetcom.com/ria/ws/vocabulary" language="en">Generic Yes/No</label>'

Delete Vocabulary Instance label

DELETE https://.../ria-ws/application/vocabulary/instances/{instanceName}/labels/{language}
  • Parameters:

    • instanceName: Name of the vocabulary instance

    • language: language identifier for that the label has to be deleted

Example

Delete the label for a given language for the vocabulary instance with logical name GenYesNoVgr.

curl -X "DELETE" "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr/labels/en" \
     -u <Username>:<Password>

Get Vocabulary Instance Node Classes

GET https://.../ria-ws/application/vocabulary/instances/{instanceName}/nodeClasses
  • Parameters:

    • instanceName: Name of the vocabulary instance

  • Request Header:

    • Accept: application/xml or application/json (experimental)

Example

Get the node classes of the vocabulary instance with logical name GenYesNoVgr

curl "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr/nodeClasses" \
     -H 'Accept: application/xml' \
     -u <Username>:<Password>

Add Vocabulary Instance Node Class

POST https://.../ria-ws/application/vocabulary/instances/{instanceName}/nodeClasses
  • Parameters:

    • instanceName: Name of the vocabulary instance

  • Request Header:

    • Accept: application/xml or application/json (experimental)

    • Content-Type: application/xml or application/json (experimental)

  • Request body definition: nodeClass element from vocabulary_1_1.xsd

  • Response body definition: nodeClass element from vocabulary_1_1.xsd

Example

Add a new node class to the vocabulary instance with logical name GenYesNoVgr.

curl -X "POST" "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr/nodeClasses" \
     -H 'Accept: application/xml' \
     -H 'Content-Type: application/xml' \
     -u <Username>:<Password> \
     -d $'<nodeClass xmlns="http://www.zetcom.com/ria/ws/vocabulary" logicalName="uber">
  <label language="de">Über</label>
  <label language="en">Uber</label>
</nodeClass>'

Add Vocabulary Instance Node Class Label

POST https://.../ria-ws/application/vocabulary/instances/{instanceName}/nodeClasses/{className}/labels
  • Parameters:

    • instanceName: Name of the vocabulary instance

    • className: Name of the node class

  • Request Header:

    • Accept: application/xml or application/json (experimental)

    • Content-Type: application/xml or application/json (experimental)

  • Request body definition: label element from vocabulary_1_1.xsd

  • Response body definition: label element from vocabulary_1_1.xsd

Example

Add a new node class label to the vocabulary instance with logical name GenYesNoVgr.

curl -X "POST" "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr/nodeClasses/uber/labels" \
     -H 'Accept: application/xml' \
     -H 'Content-Type: application/xml' \
     -u <Username>:<Password> \
     -d $'<label xmlns="http://www.zetcom.com/ria/ws/vocabulary" language="fr">Sur</label>'

Delete Vocabulary Instance Node Class Label

DELETE https://.../ria-ws/application/vocabulary/instances/{instanceName}/nodeClasses/{className}/labels/{language}
  • Parameters:

    • instanceName: Name of the vocabulary instance

    • className: Name of the node class

    • language: language identifier

Example

Delete a node class label of the vocabulary instance with logical name GenYesNoVgr.

curl -X "DELETE" "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr/nodeClasses/uber/labels/fr" \
     -u <Username>:<Password>

Delete Vocabulary Instance Node Class

DELETE https://.../ria-ws/application/vocabulary/instances/{instanceName}/nodeClasses/{className}
  • Parameters:

    • instanceName: Name of the vocabulary instance

    • className: Name of the node class

Example

Delete the node class named 'uber' of the vocabulary instance GenYesNoVgr.

curl -X "DELETE" "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr/nodeClasses/uber" \
     -u <Username>:<Password>

Get Vocabulary Instance Term Classes

GET https://.../ria-ws/application/vocabulary/instances/{instanceName}/termClasses
  • Parameters:

    • instanceName: Name of the vocabulary instance

  • Request Header:

    • Accept: application/xml or application/json (experimental)

Example

Get the term classes of the vocabulary instance with logical name GenYesNoVgr

curl "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr/termClasses" \
     -H 'Accept: application/xml' \
     -u <Username>:<Password>

Add Vocabulary Instance Term Class

POST https://.../ria-ws/application/vocabulary/instances/{instanceName}/termClasses
  • Parameters:

    • instanceName: Name of the vocabulary instance

  • Request Header:

    • Accept: application/xml or application/json (experimental)

    • Content-Type: application/xml or application/json (experimental)

  • Request body definition: termClass element from vocabulary_1_1.xsd

  • Response body definition: termClass element from vocabulary_1_1.xsd

Example

Add a new term class to the vocabulary instance with logical name GenYesNoVgr.

curl -X "POST" "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr/termClasses" \
     -H 'Accept: application/xml' \
     -H 'Content-Type: application/xml' \
     -u <Username>:<Password> \
     -d $'<termClass xmlns="http://www.zetcom.com/ria/ws/vocabulary" logicalName="uberTerm">
  <label language="de">Über Term</label>
  <label language="en">Uber Term</label>
</termClass>'

Add Vocabulary Instance Term Class Label

POST https://.../ria-ws/application/vocabulary/instances/{instanceName}/termClasses/{className}/labels
  • Parameters:

    • instanceName: Name of the vocabulary instance

    • className: Name of the term class

  • Request Header:

    • Accept: application/xml or application/json (experimental)

    • Content-Type: application/xml or application/json (experimental)

  • Request body definition: label element from vocabulary_1_1.xsd

  • Response body definition: label element from vocabulary_1_1.xsd

Example

Add a new term class label to the vocabulary instance with logical name GenYesNoVgr.

curl -X "POST" "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr/termClasses/uberTerm/labels" \
     -H 'Accept: application/xml' \
     -H 'Content-Type: application/xml' \
     -u <Username>:<Password> \
     -d $'<label xmlns="http://www.zetcom.com/ria/ws/vocabulary" language="fr">Sur Term</label>'

Delete Vocabulary Instance Term Class Label

DELETE https://.../ria-ws/application/vocabulary/instances/{instanceName}/termClasses/{className}/labels/{language}
  • Parameters:

    • instanceName: Name of the vocabulary instance

    • className: Name of the term class

    • language: language identifier

Example

Delete a term class label of the vocabulary instance with logical name GenYesNoVgr.

curl -X "DELETE" "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr/termClasses/uberTerm/labels/fr" \
     -u <Username>:<Password>

Delete Vocabulary Instance Term Class

DELETE https://.../ria-ws/application/vocabulary/instances/{instanceName}/nodeClasses/{className}
  • Parameters:

    • instanceName: Name of the vocabulary instance

    • className: Name of the term class

Example

Delete the term class named 'uberTerm' of the vocabulary instance GenYesNoVgr.

curl -X "DELETE" "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr/termClasses/uberTerm" \
     -u <Username>:<Password>

Get Vocabulary Node by identifier

GET https://.../ria-ws/application/vocabulary/instances/{instanceName}/nodes/{id}
  • Parameters:

    • instanceName: Name of the vocabulary instance

    • id: identifier of the vocabulary node

  • Request Header:

    • Accept: application/xml or application/json (experimental)

  • Response body definition: node element from vocabulary_1_1.xsd

Example

Get a node with id 30891 from vocabulary instance GenYesNoVgr.

curl "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr/nodes/30891" \
     -H 'Accept: application/xml' \
     -u <Username>:<Password>

Add Vocabulary Node

POST https://.../ria-ws/application/vocabulary/instances/{instanceName}/nodes
  • Parameters:

    • instanceName: Name of the vocabulary instance

  • Request Header:

    • Accept: application/xml or application/json (experimental)

    • Content-Type: application/xml or application/json (experimental)

  • Request body definition: node element from vocabulary_1_1.xsd

  • Response body definition: node element from vocabulary_1_1.xsd

Example

Add a new node to the vocabulary instance GenYesNoVgr.

curl -X "POST" "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr/nodes" \
     -H 'Accept: application/xml' \
     -H 'Content-Type: application/xml' \
     -u <Username>:<Password> \
     -d $'<node xmlns="http://www.zetcom.com/ria/ws/vocabulary" logicalName="noIdea" >
  <sortCriteria>100</sortCriteria>
  <orgUnit logicalName="VocabularyAdministration" />
  <status logicalName="candidate"/>
  <parents/>
  <terms>
    <term>
      <isoLanguageCode>en</isoLanguageCode>
      <content>No Idea</content>
      <status logicalName="valid"/>
      <category logicalName="preferred"/>
    </term>
    <term>
      <isoLanguageCode>en</isoLanguageCode>
      <content>Really don'"'"'t know</content>
      <status logicalName="valid"/>
      <category logicalName="non-preferred"/>
    </term>
    <term>
      <isoLanguageCode>fr</isoLanguageCode>
      <content>Aucune idée</content>
      <status logicalName="valid"/>
      <category logicalName="preferred"/>
    </term>
    <term>
      <isoLanguageCode>de</isoLanguageCode>
      <content>Keine Ahnung</content>
      <status logicalName="valid"/>
      <category logicalName="preferred"/>
    </term>
  </terms>
  <relations>
    <relation nodeId="139712">
      <type>superior_to_inferior</type>
      <direction>out</direction>
    </relation>
  </relations>
</node>'

Delete Vocabulary Node

DELETE https://.../ria-ws/application/vocabulary/instances/{instanceName}/nodes/{id}
  • Parameters:

    • instanceName: Name of the vocabulary instance

    • id: identifier of the vocabulary node

Example

Delete node with id 145715 from vocabulary instance GenYesNoVgr.

curl -X "DELETE" "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr/nodes/145715" \
     -u <Username>:<Password>

Update Vocabulary Node

PUT https://.../ria-ws/application/vocabulary/instances/{instanceName}/nodes/{id}
  • Parameters:

    • instanceName: Name of the vocabulary instance

    • id: identifier of the vocabulary node

  • Request Header:

    • Accept: application/xml or application/json (experimental)

    • Content-Type: application/xml or application/json (experimental)

  • Request body definition: node element from vocabulary_1_1.xsd

  • Response body definition: node element from vocabulary_1_1.xsd

Example

curl -X "PUT" "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr/nodes/30891" \
     -H 'Accept: application/xml' \
     -H 'Content-Type: application/xml' \
     -u <Username>:<Password> \
     -d $'<node xmlns="http://www.zetcom.com/ria/ws/vocabulary" logicalName="yes" id="30891">
  <sortCriteria></sortCriteria>
  <orgUnit logicalName="VocabularyAdministration"/>
  <status logicalName="valid"/>
  <instance logicalName="GenYesNoVgr" id="30297"/>
</node>'

Add Vocabulary Term

POST https://.../ria-ws/application/vocabulary/instances/{instanceName}/nodes/{nodeId}/terms
  • Parameters:

    • instanceName: Name of the vocabulary instance

    • nodeId: identifier of the vocabulary node

  • Request Header:

    • Accept: application/xml or application/json (experimental)

    • Content-Type: application/xml or application/json (experimental)

  • Request body definition: term element from vocabulary_1_1.xsd

  • Response body definition: term element from vocabulary_1_1.xsd

Example

Add a new term to node with id 30891 of vocabulary instance GenYesNoVgr.

curl -X "POST" "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr/nodes/30891/terms" \
     -H 'Accept: application/xml' \
     -H 'Content-Type: application/xml' \
     -u <Username>:<Password> \
     -d $'<term xmlns="http://www.zetcom.com/ria/ws/vocabulary">
  <isoLanguageCode>de</isoLanguageCode>
  <content>Geht klar</content>
  <status logicalName="valid"/>
  <category logicalName="non-preferred"/>
</term>'

Update Vocabulary Term

PUT https://.../ria-ws/application/vocabulary/instances/{instanceName}/nodes/{nodeId}/terms/{termId}
  • Parameters:

    • instanceName: Name of the vocabulary instance

    • nodeId: identifier of the vocabulary node

    • termId: identifier of the vocabulary term

  • Request Header:

    • Accept: application/xml or application/json (experimental)

    • Content-Type: application/xml or application/json (experimental)

  • Request body definition: term element from vocabulary_1_1.xsd

  • Response body definition: term element from vocabulary_1_1.xsd

Example

Update term with id 164158 of node with id 30891 of vocabulary instance with logical name GenYesNoVgr.

curl -X "PUT" "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr/nodes/30891/terms/164158" \
     -H 'Accept: application/xml' \
     -H 'Content-Type: application/xml' \
     -u <Username>:<Password> \
     -d $'<term xmlns="http://www.zetcom.com/ria/ws/vocabulary">
  <status logicalName="candidate"/>
  <category logicalName="preferred" />
</term>'

Delete Vocabulary Term

DELETE https://.../ria-ws/application/vocabulary/instances/{instanceName}/nodes/{nodeId}/terms/{termId}
  • Parameters:

    • instanceName: Name of the vocabulary instance

    • nodeId: identifier of the vocabulary node

    • termId: identifier of the vocabulary term

Example

Delete term with id 164158 of node 30891 of vocabulary instance GenYesNoVgr.

curl -X "DELETE" "https://localhost:8181/MpWeb-dev/ria-ws/application/vocabulary/instances/GenYesNoVgr/nodes/30891/terms/164158" \
     -u <Username>:<Password>

Get Vocabulary Node Parents / Default Node Relations

GET https://.../ria-ws/application/vocabulary/instances/{instanceName}/nodes/{nodeId}/parents/
  • Parameters:

    • instanceName: Name of the vocabulary instance

    • nodeId: identifier of the vocabulary node

  • Request Header:

    • Accept: application/xml or application/json (experimental)

  • Response body definition: parents element from vocabulary_1_1.xsd

Example

Get the parents of the node with id 30891 of vocabulary instance GenYesNoVgr.

curl "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr/nodes/30891/parents/" \
     -H 'Accept: application/xml' \
     -u <Username>:<Password>

Add Vocabulary Node Parent / Default Node Relations

POST https://.../ria-ws/application/vocabulary/instances/{instanceName}/nodes/{nodeId}/parents/
  • Parameters:

    • instanceName: Name of the vocabulary instance

    • nodeId: identifier of the vocabulary node

  • Request Header:

    • Accept: application/xml or application/json (experimental)

    • Content-Type: application/xml or application/json (experimental)

  • Request body definition: parent element from vocabulary_1_1.xsd

  • Response body definition: parent element from vocabulary_1_1.xsd

Example

Add a parent node to node with id 30891 of vocabulary instance GenYesNoVgr.

curl -X "POST" "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr/nodes/30891/parents/" \
     -H 'Content-Type: application/xml' \
     -H 'Accept: application/xml' \
     -u <Username>:<Password> \
     -d $'<parent xmlns="http://www.zetcom.com/ria/ws/vocabulary" nodeId="146712"/>'

Delete Vocabulary Node Parent / Default Node Relations

DELETE https://.../ria-ws/application/vocabulary/instances/{instanceName}/nodes/{nodeId}/parents/{parentNodeId}
  • Parameters:

    • instanceName: Name of the vocabulary instance

    • nodeId: identifier of the vocabulary node

    • parentNodeId: identifier of the parent vocabulary node

Example

Delete a parent node with id 146712 from node 30891 of vocabulary instance GenYesNoVgr.

curl -X "DELETE" "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr/nodes/30891/parents/146712" \
     -u <Username>:<Password>

Get Vocabulary Node Relations / Advanced Node Relations

GET https://.../ria-ws/application/vocabulary/instances/{instanceName}/nodes/{nodeId}/relations/
  • Parameters:

    • instanceName: Name of the vocabulary instance

    • nodeId: identifier of the vocabulary node

  • Request Header:

    • Accept: application/xml or application/json (experimental)

  • Response body definition: relations element from vocabulary_1_1.xsd

Example

Get generic node relations of node with id 30891 from vocabulary instance GenYesNoVgr.

curl "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr/nodes/30891/relations/" \
     -H 'Accept: application/xml' \
     -u <Username>:<Password>

Add Vocabulary Node Relation / Advanced Node Relations

POST https://.../ria-ws/application/vocabulary/instances/{instanceName}/nodes/{nodeId}/relations/
  • Parameters:

    • instanceName: Name of the vocabulary instance

    • nodeId: identifier of the vocabulary node

  • Request Header:

    • Accept: application/xml or application/json (experimental)

    • Content-Type: application/xml or application/json (experimental)

  • Request body definition: relation element from vocabulary_1_1.xsd

  • Response body definition: relation element from vocabulary_1_1.xsd

Example

Add a new node relation to node with id 30891 of vocabulary instance GenYesNoVgr.

curl -X "POST" "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr/nodes/30891/relations/" \
     -H 'Accept: application/xml' \
     -H 'Content-Type: application/xml' \
     -u <Username>:<Password> \
     -d $'<relation xmlns="http://www.zetcom.com/ria/ws/vocabulary" nodeId="139712">
  <type>superior_to_inferior</type>
  <direction>out</direction>
</relation>'

Delete Vocabulary Node Relation / Advanced Node Relations

DELETE https://.../ria-ws/application/vocabulary/instances/{instanceName}/nodes/{nodeId}/parents/{relationId}
  • Parameters:

    • instanceName: Name of the vocabulary instance

    • nodeId: identifier of the vocabulary node

    • relationId: identifier of the relation

Example

Delete relation with id 100019001 of node with id 30891 of vocabulary instance GenYesNoVgr.

curl -X "DELETE" "https://<host>/<application>/ria-ws/application/vocabulary/instances/GenYesNoVgr/nodes/30891/relations/100019001" \
     -u <Username>:<Password>

Get a list of available exports / reports for the vocabulary module

GET http://.../ria-ws/application/vocabulary/exports
  • Request header:

    • Accept: application/xml or application/json

  • Response header:

    • Content-Type: application/xml or application/json

  • Response body definition: export_1_0.xsd

The export method provides a way to access the report mechanism. Returns a list of all available exports for the vocabulary module. The request will return status code 200 (OK) if the request was correct and there is at least one export available. If there is no export for the module status code 204 (No Content) will be returned.

Example

List all available exports for vocabulary module

curl -X "GET" "https://<host>/<application>/ria-ws/application/vocabulary/exports" \
	-u <Username>:<Password>

Export a single node

GET http://.../ria-ws/application/vocabulary/instances/{instanceIdOrName}/nodes/{nodeId}/exports/{exportId}"
  • Parameters:

    • instanceIdOrName: ID or Name of the instance which contains the node

    • nodeId: ID of the node item to export

    • exportId: ID of the export type / format, retrieved via the API method above

  • Request header:

    • Accept: application/xml or application/json

  • Response header:

    • Content-Type: application/octet-stream

    • Content-Disposition: attachment;filename={random-file-name}.{export-specific-file-extension}

  • Response body definition: file as MIME type application/octet-stream

The export method provides a way to access the report mechanism. The request will return status code 200 (OK) if the syntax of the request was correct. The content will be send using the MIME type application/octet-stream and the Content-disposition header with a suggested filename.

Example

Get an export of the node with ID 30279 which is part of the VocInstance with the ID 11000, with the format defined by the export type exportIdentifier. curl -O -J writes the resulting document to disk.

curl -O -J -X "GET" "https://<host>/<application>/ria-ws/application/vocabulary/instances/11000/nodes/30279/exports/exportIdentifier" \
  -u <Username>:<Password>

Export all nodes of an instance

GET http://.../ria-ws/application/vocabulary/instances/{instanceIdOrName}/exports/{exportId}
  • Parameters:

    • instanceIdOrName: ID or Name of the instance which contains the node

    • exportId: ID of the export type / format, retrieved via the API method above

  • Request header:

    • Accept: application/xml or application/json

  • Response header:

    • Content-Type: application/octet-stream

    • Content-Disposition: attachment;filename={random-file-name}.{export-specific-file-extension}

  • Response body definition: file as MIME type application/octet-stream

The export method provides a way to access the report mechanism. The request body has to include a search expression. The search result will then be exported in the format specified by {id}. The request will return status code 200 (OK) if the syntax of the request was correct. The content will be send using the MIME type application/octet-stream and the Content-disposition header with a suggested filename.

Example

Get an export of all nodes of the VocInstance with the ID 11000, with the format defined by the export type exportIdentifier. curl -O -J writes the resulting document to disk.

curl -O -J -X "GET" "https://<host>/<application>/ria-ws/application/vocabulary/instances/11000/exports/exportIdentifier" \
  -u <Username>:<Password>

XML Schema

A list of all XML Schema files used in the vocabulary service.

File Description

vocabulary_1_1.xsd

Defines the vocabulary message format for retrieving data