Skip to main content
Version: 4.0

Get Relations by Conditions

Comprehensive relation query interface, and you can use it to run complex filters on relations. For example: Get relations under the template system.t1 and system.t3 and takes reference from the template system.t5.

templateFullNames=system.t1&templateFullNames=system.t3
&refFullNames=system.t5&refFullNameType=TEMPLATE
Path
http://{supOS ip:port}/open-api/supos/oodm/v2alpha/relations
Query Parameter
Table 1. Query parameter description
ParameterTypeDescription
templateFullNamesarrayThe list of template namespace.template alias to which the metadata belongs.
relationFullNamesarrayList of relation namespace.relation alias.
refFullNamesarrayReferenced list of template namespace.template alias.
refFullNameTypestringReferenced type of namespace and alias, used together with refFullNames. Options are RELATION, TEMPLATE and ATTRIBUTE.
pageIndexintegerRequired. Page number. The default is 1.
pageSizeintegerRequired. The number of data on each page. The default is 20 and the maximum is 500.
Response
  • 200: Successful.
    {
    "list" : [ { //relation
    "displayName" : "realtion1",
    "enName" : "relation1",
    "id" : 11111,
    "namespace" : "system",
    "nodes" : [ { //referenced template list
    "main" : false,
    "refAttributeDataType" : "LONG",
    "refAttributeDisplayName" : "attribute1",
    "logicColumnName" : "system_template1_attribute1",
    "refAttributeEnName" : "attribute1",
    "refAttributeId" : 11113,
    "refAttributeNamespace" : "system",
    "refComment" : "node",
    "refEnName" : "system_template1",
    "refRelationDisplayName" : "system_relation2",
    "refRelationId" : 11114,
    "refTemplateDisplayName" : "template1",
    "refTemplateEnName" : "template1",
    "refTemplateId" : 11115,
    "refTemplateNamespace" : "system"
    } ],
    "templateInfo" : {
    "displayName" : "data1",
    "id" : 11119,
    "enName" : "metadata1",
    "namespace" : "system"
    }
    } ],
    "pagination" : [ {
    "total" : 10,
    "pageSize" : 20,
    "current" : 1
    } ]
    }
  • 400: General internal error of OODM.
    {
    "code": 10001001,
    "data": {},
    "detail": "string",
    "message": "string"
    }

Get Node Details under Specified Relation

Path
http://{supOS ip:port}/open-api/supos/oodm/v2alpha/templates/{templateNamespace}/{templateName}/relations/{relationNamespace}/{relationName}/relationNodes
Response
  • 200: Successful.
    [ {
    "main" : false,
    "refAttributeDataType" : "LONG",
    "refAttributeDisplayName" : "attribute1",
    "logicColumnName" : "system_template1_attribute1",
    "refAttributeEnName" : "attribute1",
    "refAttributeId" : 11113,
    "refAttributeNamespace" : "system",
    "refComment" : "node",
    "refEnName" : "system_template1",
    "refRelationDisplayName" : "system_relation2",
    "refRelationId" : 11114,
    "refTemplateDisplayName" : "template1",
    "refTemplateEnName" : "template1",
    "refTemplateId" : 11115,
    "refTemplateNamespace" : "system"
    } ]
  • 400: General internal error of OODM.
     {
    "code": 10001001,
    "data": {},
    "detail": "string",
    "message": "string"
    }