Accessing the Vocabulary metadata of a Decision Service
There is a REST API for retrieving vocabulary metadata from a deployed Decision Service. This is useful for integrating Corticon with other applications that need to format REST or SOAP calls to a Decision Service.
Structure of a request
To retrieve vocabulary metadata, make an HTTP GET request to the getVocabularyMetadata endpoint specifying the Decision Service name and version as the following URL parameters:
name= Decision Service name majorVersion= Major version of the Decision Service minorVersion= Minor version of the Decision Service For example:
http://localhost:8850/axis/corticon/decisionService/getVocabularyMetadata ?name=ProcessOrder&majorVersion=1&minorVersion=1
The metadata API is available for Corticon Decision Services deployed for either a Java Server or a .NET Server.
The following JSON-formatted document is an example of a response:
{ "majorVersion": 1, "name": "MetadataTest", "minorVersion": 0, "entities": [ { "name": "Entity_1", "associations": [ { "name": "associationObject1", "targetEntity": "AssociationObject1", "inContext": true, "mandatory": false "cardinality": "1" }, { "name": "associationObjectOverride", "targetEntity": "AssociationObject2", "inContext": false, "mandatory": true "cardinality": "*" } ], "attributes": [ { "dataType": "Boolean", "name": "boolean1", "inContext": true, "type": "Base", "mandatory": true }, { "dataType": "Date", "name": "date1", "inContext": false, "type": "Transient", "mandatory": false }, { "dataType": "DateTime", "name": "datetime1", "inContext": true, "type": "Base", "mandatory": true }, { "cdtConstraintExpr": "value < 100.0", (Constraint expression associated with this Attribute.) "dataType": "Decimal", "name": "decimal1", "inContext": false, "type": "Transient", "mandatory": false }, { "dataType": "Integer", "name": "int1", "cdtEnumeration": [ (A CDT that is values only, no labels.) {"value": "1"}, {"value": "2"}, {"value": "3"}, {"value": "4"} ], "inContext": true "type": "Base", "mandatory": true }, { "dataType": "String", "name": "string1", "cdtEnumeration": [ (A CDT that has labels and values.) { "value": "s" "label": "Small" }, { "value": "m" "label": "Medium" }, { "value": "l" "label": "Large" } ], "inContext": false, "type": "Transient", "mandatory": false }, { "dataType": "Time", "name": "time1", "inContext": true, "type": "Base", "mandatory": true }, ] }, { "name": "AssociationObject1", "associations": [], "attributes": [ { "dataType": "String", "name": "string1", "inContext": true "mandatory": true }, ] }, { "name": "AssociationObject2", "associations": [], "attributes": [ { "dataType": "String", "name": "string1", "inContext": false "mandatory": false }, ] } ] }