Output Module API Guide 2022
Output Module API Guide 2022
Hitchhiker's Guide
Version 2022.06
The Hitchhiker’s Guide to the Output Module
You can find the most up-to-date technical documentation on our Developer portal at
[Link]
i
Contents
Contents ii
What's new 1
Introduction 2
Prerequisites 3
Terminology 3
Getting started 7
Add filtering 20
Filtering operators 35
Boolean operators 42
Filter properties 45
Virtual properties 45
ii
API endpoints and query formats 66
Entity 69
Resource 69
Representation 70
Organization 72
Community 74
ParentCommunity 74
Domain 74
DomainType 75
ChildDomainTypes 75
RelationType 76
Relation 77
ComplexRelation 78
ComplexRelationType 79
ComplexRelationLegType 80
ComplexRelationAttributeType 80
Asset 81
SourceAsset 83
TargetAsset 84
SourceAssetType 84
TargetAssetType 84
AssetType 84
iii
ChildAssetTypes 86
Attribute 86
StringAttribute 87
ScriptAttribute 87
SingleValueListAttribute 87
MultiValueListAttribute 88
BooleanAttribute 88
NumericAttribute 88
DateTimeAttribute 89
DateAttribute 89
AttributeType 89
User 90
Email 95
Phone 95
InstantMessagingAccount 96
Website 96
Address 97
Group 97
Responsibility 98
Role 99
Status 99
WorkflowTaskInfo (deprecated) 99
Mapping 100
Tag 101
Scope 102
iv
Comment 102
ParentComment 103
v
Chapter 1
What's new
l The Community and Domain entities are now extensions of Organization. (January
2022)
l The Output Module API uses the same terminology as the user interface. (Septem-
ber 2021)
l The guide now contains YAML examples.
l References to the deprecated REST API v1 were removed.
l The Timeout mechanism is described.
l The Result limit mechanism is described.
l The API endpoints are described.
1
Chapter 2
Introduction
The Output Module is a lightweight graph query engine exposed through the public API. It
allows different output formats, such as JSON, XML, Excel, and CSV. It also provides a
single API to query most of the Collibra entities, such as assets, communities, domains
and types, using SQL-like filtering capabilities. You can sort entities using any of the
available properties and page results and view permissions for authenticated users who
issue REST calls.
2
Chapter 3
Prerequisites
Before you begin using the query language used in the Output Module, you must
understand the Collibra API model and how to execute REST calls. This guide shows
examples that query the REST API but does not explain how to execute REST calls. Refer
to external online resources for tutorials and instructional resources.
Terminology
The Collibra API model was based on the Semantics of Business Vocabulary and Rules
(SBVR) standard. Over time, the user interface adopted a simpler terminology set that
aligns with Collibra concepts. Since version 2021.09 (5.7.10 for on-premisses), the Output
Module API uses the same terminology as the user interface while the legacy one is
deprecated.
Deprecated Current
Term Asset
ConceptType AssetType
ConceptTypeSpecializedConcepts ChildAssetTypes
Vocabulary Domain
VocabularyType DomainType
VocabularyTypeSpecializedConcepts ChildDomainTypes
Source SourceAsset
3
Chapter 3
Deprecated Current
Target TargetAsset
BinaryFactType RelationType
HeadTerm SourceAssetType
TailTerm TargetAssetType
Member Responsibility
4
Chapter 4
For example, to query all assets of type Business Term and their respective domain and
community, specify the following tree graph:
5
Chapter 4
Note
l The graph is a single-rooted tree graph.
l Multiple root nodes are not allowed.
l Each node has one parent.
l For each of the selected properties, you must specify a unique alias within the
graph query.
l Filtering is specified on the node you want to filter and can reference any
property of the current node of a child or grandchildren. The example above
shows assets filtered by their related AssetType name.
In this chapter
Getting started 7
Add filtering 20
Filtering operators 35
Boolean operators 42
Filter properties 45
Virtual properties 45
6
Chapter 4
Getting started
The format of the query language is either JSON or YAML. For simplicity, this example
starts with a basic query and builds from there.
Select the Id and Name for all communities as a flat list. The object representing the query
is called ViewConfig, as it defines a particular view, which is a selection of the data. The
object containing the graph part of the query is called Resources.
The following example shows the Community entity along with its Id and Name properties.
JSON
{
"ViewConfig": {
"Resources": {
"Community": {
"name": "Communities", <---\
"Id": { "name": "community id" }, ---- a
node can (or must) have a name. Thus the community own 'name'
property must be uppercased to avoid conflicts.
"Name": { "name": "community name" } <---/
}
}
}
}
YAML
---
ViewConfig:
Resources:
Community:
name: "Communities" <---\
Id: ---- a node can (or
must) have a name. Thus the community own 'name' property must
be uppercased to avoid
name: "community id"
Name: <---/
name: "community name"
7
Chapter 4
Note
l Entity and property keys are case insensitive, so Community and Id can be
written in any case.
l The other keys are case sensitive. For example, ViewConfig, Resources or
Name must be written as shown.
l If a property is spelled out the same way as a reserved keyword, you must use
a different casing than the reserved key. For example, you use lowercase
name as the node name and capitalized Name as the community name.
l {{domain}}/rest/2.0/outputModule/export/json
JSON
{
"ViewConfig": {
"Resources": {
"Community": {
"Id": {
"name": "community id"
},
"Name": {
"name": "community name"
}
}
}
}
}
8
Chapter 4
YAML
---
ViewConfig:
Resources:
Community:
Id:
name: "community id"
Name:
name: "community name"
JSON
'Content-Type': 'application/json'
YAML
'Content-Type': 'application/x-yaml'
{
"view": {
"Community0": [
{
"communityId": "c87f166e-041f-4bea-8ff7-c1ffbab2ceeb",
"communityName": "First Community"
},
{
"communityId": "86a745f5-7e87-4851-a107-a3a272ccea0b",
"communityName": "Second Community"
}
]
}
}
9
Chapter 4
You can use the ViewConfig queries with the following endpoints:
l {{domain}}/rest/2.0/outputModule/export/{{xml | json}}
l {{domain}}/rest/2.0/outputModule/export/{{xml | json}}-file
l {{domain}}/rest/2.0/outputModule/export/{{xml | json}}-job
l Asset
l Domain
l Community
JSON
{
"ViewConfig": {
"Resources": {
"Community": {
"Id": { "name": "community id" },
"Name": { "name": "community name" },
"Responsibility": {
"User": {
"Id": { "name": "user id" },
"FirstName": { "name": "first name" },
"LastName": { "name": "last name" }
},
"Role": {
"Signifier": { "name": "role name" }
}
}
}
}
}
}
10
Chapter 4
YAML
---
ViewConfig:
Resources:
Community:
Id:
name: "community id"
Name:
name: "community name"
Responsibility:
User:
Id:
name: "user id"
FirstName:
name: "first name"
LastName:
name: "last name"
Role:
Signifier:
name: "role name"
Navigating from one entity to another requires nesting the entities. For a complete list of
properties and relations for each entity, see Entities, properties and relations.
{
"view": {
"Community0": [
{
"communityId": "c87f166e-041f-4bea-8ff7-c1ffbab2ceeb",
"communityName": "First Community"
},
{
"communityId": "12345678-0020-0000-0000-000000000000",
"communityName": "Second Community",
"Responsibility1": [
{
"User2": [
{
"userId": "00000000-0000-0000-0000-
000000900002",
"firstName": "Admin",
11
Chapter 4
"lastName": "Istrator"
}
],
"Role3": [
{
"roleName": "Admin"
}
]
},
{
"User2": [
{
"userId": "00000000-0000-0000-0000-
000000900002",
"firstName": "Admin",
"lastName": "Istrator"
}
],
"Role3": [
{
"roleName": "Steward"
}
]
}
]
}
]
}
}
Note
l The ViewConfig result tree always uses arrays for related entities, even
when relations have a max cardinality of 1.
l Each responsibility has a maximum of one user and one role , even when
arrays return.
l The results tree uses a generated entity alias in the response. For example,
Community0, Responsibility1 or User2.
l To prevent duplicate names in the JSON keys, an index number is
concatenated to the entity name.
l The relationship from community to responsibility is optional. The query
engine recognizes optional and required relations between entities, which is
why First Community appears even when no users have roles.
12
Chapter 4
JSON
{
"ViewConfig": {
"Resources": {
"Community": {
"name": "community",
"Id": { "name": "community id" },
"Name": { "name": "community name" },
"Responsibility": {
"name": "responsibility",
"User": {
"name": "employee",
"Id": { "name": "user id" },
"FirstName": { "name": "first name" },
"LastName": { "name": "last name" }
},
"Role": {
"name": "role",
"Signifier": { "name": "role name" }
}
}
}
}
}
}
13
Chapter 4
YAML
---
ViewConfig:
Resources:
Community:
name: "community"
Id:
name: "community id"
Name:
name: "community name"
Responsibility:
name: "responsibility"
User:
name: "employee"
Id:
name: "user id"
FirstName:
name: "first name"
LastName:
name: "last name"
Role:
name: "role"
Signifier:
name: "role name"
{
"view": {
"community": [
{
"communityId": "c87f166e-041f-4bea-8ff7-c1ffbab2ceeb",
"communityName": "First Community"
},
{
"communityId": "12345678-0020-0000-0000-000000000000",
"communityName": "Second Community",
"responsibility": [
{
"employee": [
{
"userId": "00000000-0000-0000-0000-
000000900002",
"firstName": "Admin",
"lastName": "Istrator"
14
Chapter 4
}
],
"role": [
{
"roleName": "Admin"
}
]
},
{
"employee": [
{
"userId": "00000000-0000-0000-0000-
000000900002",
"firstName": "Admin",
"lastName": "Istrator"
}
],
"role": [
{
"roleName": "Steward"
}
]
}
]
}
]
}
}
To add another relation from community to responsibility, select the related groups.
15
Chapter 4
JSON
{
"ViewConfig": {
"Resources": {
"Community": {
"Id": { "name": "communityId" },
"Name": { "name": "communityName" },
"Responsibility": [
{
"Id": { "name": "userResponsibilityId" },
"User": {
"Id": { "name": "userId" },
"FirstName": { "name": "firstName" },
"LastName": { "name": "lastName" }
},
"Role": {
"Signifier": { "name": "userRoleName" }
}
},
{
"Id": { "name": "groupResponsibilityId" },
"Group": {
"Id": { "name": "groupId" },
"GroupName": { "name": "groupName" }
},
"Role": {
"Signifier": { "name": "groupRoleName" }
}
}
]
}
}
}
}
16
Chapter 4
YAML
---
ViewConfig:
Resources:
Community:
Id:
name: "communityId"
Name:
name: "communityName"
Responsibility:
- Id:
name: "userResponsibilityId"
User:
Id:
name: "userId"
FirstName:
name: "firstName"
LastName:
name: "lastName"
Role:
Signifier:
name: "userRoleName"
- Id:
name: "groupResponsibilityId"
Group:
Id:
name: "groupId"
GroupName:
name: "groupName"
Role:
Signifier:
name: "groupRoleName"
To add the same related entity twice under the same node, change the JSON object into
an array. In this case, the Responsibility JSON object became an array, and the
anonymous JSON objects composing the array are multiple responsibilities.
If you add the admin group to the second community, the results would be formatted
similar to the example below.
{
"view": {
"Community0": [
17
Chapter 4
{
"communityId": "c87f166e-041f-4bea-8ff7-c1ffbab2ceeb",
"communityName": "First Community"
},
{
"communityId": "12345678-0020-0000-0000-000000000000",
"communityName": "Second Community",
"Responsibility1": [
{
"userResponsibilityId": "0ecb2fff-d5de-43d0-be60-
f7f201c10d41",
"User2": [
{
"userId": "00000000-0000-0000-0000-
000000900002",
"firstName": "Admin",
"lastName": "Istrator"
}
],
"Role3": [
{
"roleName": "Admin"
}
]
},
{
"userResponsibilityId": "42b9d114-2c0c-4e96-a1ce-
b645d5e92365",
"User2": [
{
"userId": "00000000-0000-0000-0000-
000000900002",
"firstName": "Admin",
"lastName": "Istrator"
}
],
"Role3": [
{
"roleName": "Steward"
}
]
},
{
"groupResponsibilityId": "5fc0cc5f-e30e-488c-94bc-
acdea171219d",
"User2": [
{}
],
"Role3": [
{
18
Chapter 4
"roleName": "Admin"
}
]
}
],
"Responsibility4": [
{
"userResponsibilityId": "0ecb2fff-d5de-43d0-be60-
f7f201c10d41",
"Group5": [
{}
],
"Role6": [
{
"groupRoleName": "Admin"
}
]
},
{
"userResponsibilityId": "42b9d114-2c0c-4e96-a1ce-
b645d5e92365",
"Group5": [
{}
],
"Role6": [
{
"groupRoleName": "Steward"
}
]
},
{
"groupResponsibilityId": "5fc0cc5f-e30e-488c-94bc-
acdea171219d",
"Group5": [
{
"groupId": "4eb1f4a9-14a3-4539-8afc-
733925161179",
"groupName": "admin"
}
],
"Role6": [
{
"groupRoleName": "Admin"
}
]
}
]
}
]
}
19
Chapter 4
Add filtering
To discard irrelevant responsibility results, use filtering.
20
Chapter 4
JSON
{
"ViewConfig": {
"Resources": {
"Community": {
"Id": { "name": "communityId" },
"Name": { "name": "communityName" },
"Responsibility": [
{
"Id": { "name": "userResponsibilityId" },
"User": {
"Id": { "name": "userId" },
"FirstName": { "name": "firstName" },
"LastName": { "name": "lastName" }
},
"Role": {
"Signifier": { "name": "userRoleName" }
},
"Filter": { "Field": { "name": "userId", "operator":
"NOT_NULL" } }
},
{
"Id": { "name": "groupResponsibilityId" },
"Group": {
"Id": { "name": "groupId" },
"GroupName": { "name": "groupName" }
},
"Role": {
"Signifier": { "name": "groupRoleName" }
},
"Filter": { "Field": { "name": "groupId",
"operator": "NOT_NULL" } }
}
]
}
}
}
}
21
Chapter 4
YAML
---
ViewConfig:
Resources:
Community:
Id:
name: "communityId"
Name:
name: "communityName"
Responsibility:
-
Id:
name: "userResponsibilityId"
User:
Id:
name: "userId"
FirstName:
name: "firstName"
LastName:
name: "lastName"
Role:
Signifier:
name: "userRoleName"
Filter:
Field:
name: "userId"
operator: "NOT_NULL"
-
Id:
name: "groupResponsibilityId"
Group:
Id:
name: "groupId"
GroupName:
name: "groupName"
Role:
Signifier:
name: "groupRoleName"
Filter:
Field:
name: "groupId"
operator: "NOT_NULL"
Filter is a reserved key. The example above first includes a userId is not null" filtering
clause to show responsibilities with a related user by (More on available filters later in this
22
Chapter 4
guide). Then, select the related responsibilities again, this time only keeping those with a
related group.
{
"view": {
"Community0": [
{
"communityId": "c87f166e-041f-4bea-8ff7-c1ffbab2ceeb",
"communityName": "First Community"
},
{
"communityId": "12345678-0020-0000-0000-000000000000",
"communityName": "Second Community",
"Responsibility1": [
{
"userResponsibilityId": "0ecb2fff-d5de-43d0-be60-
f7f201c10d41",
"User2": [
{
"userId": "00000000-0000-0000-0000-
000000900002",
"firstName": "Admin",
"lastName": "Istrator"
}
],
"Role3": [
{
"roleName": "Admin"
}
]
},
{
"userResponsibilityId": "42b9d114-2c0c-4e96-a1ce-
b645d5e92365",
"User2": [
{
"userId": "00000000-0000-0000-0000-
000000900002",
"firstName": "Admin",
"lastName": "Istrator"
}
],
"Role3": [
{
"roleName": "Steward"
}
]
}
],
"Responsibility4": [
23
Chapter 4
{
"groupResponsibilityId": "5fc0cc5f-e30e-488c-94bc-
acdea171219d",
"Group5": [
{
"groupId": "4eb1f4a9-14a3-4539-8afc-
733925161179",
"groupName": "admin"
}
],
"Role6": [
{
"groupRoleName": "Admin"
}
]
}
]
}
]
}
}
Note In the result tree, Responsibility1 shows all related users and
Responsibility4 only contains the groups.
24
Chapter 4
JSON
{
"ViewConfig": {
"Resources": {
"Community": {
"Id": { "name": "communityId" },
"Name": { "name": "communityName" },
"Responsibility": {
"Id": { "name": "responsibilityId" },
"User": {
"Id": { "name": "userId" },
"FirstName": { "name": "firstName" },
"LastName": { "name": "lastName" }
},
"Group": {
"Id": { "name": "groupId" },
"GroupName": { "name": "groupName" }
},
"Role": {
"Signifier": { "name": "roleName" }
}
}
}
}
}
}
25
Chapter 4
YAML
---
ViewConfig:
Resources:
Community:
Id:
name: "communityId"
Name:
name: "communityName"
Responsibility:
Id:
name: "ResponsibilityId"
User:
Id:
name: "userId"
FirstName:
name: "firstName"
LastName:
name: "lastName"
Group:
Id:
name: "groupId"
GroupName:
name: "groupName"
Role:
Signifier:
name: "roleName"
{
"view": {
"Community0": [
{
"communityId": "c87f166e-041f-4bea-8ff7-c1ffbab2ceeb",
"communityName": "First Community"
},
{
"communityId": "12345678-0020-0000-0000-000000000000",
"communityName": "Second Community",
"Responsibility1": [
{
"responsibilityId": "0ecb2fff-d5de-43d0-be60-
f7f201c10d41",
"User2": [
26
Chapter 4
{
"userId": "00000000-0000-0000-0000-
000000900002",
"firstName": "Admin",
"lastName": "Istrator"
}
],
"Group3": [
{}
],
"Role4": [
{
"roleName": "Admin"
}
]
},
{
"responsibilityId": "42b9d114-2c0c-4e96-a1ce-
b645d5e92365",
"User2": [
{
"userId": "00000000-0000-0000-0000-
000000900002",
"firstName": "Admin",
"lastName": "Istrator"
}
],
"Group3": [
{}
],
"Role4": [
{
"roleName": "Steward"
}
]
},
{
"responsibilityId": "5fc0cc5f-e30e-488c-94bc-
acdea171219d",
"User2": [
{}
],
"Group3": [
{
"groupId": "4eb1f4a9-14a3-4539-8afc-
733925161179",
"groupName": "admin"
}
],
"Role4": [
27
Chapter 4
{
"roleName": "Admin"
}
]
}
]
}
]
}
}
Use the ASC, which is the default, and DESC constants to request ordering in ascending or
descending order.
JSON
{
"ViewConfig": {
"Resources": {
"Community": {
"Id": { "name": "communityId" },
"Name": { "name": "communityName" },
"Order": [
{ "Field": { "name": "communityName", "order": "ASC" }
}
]
}
}
}
}
28
Chapter 4
YAML
---
ViewConfig:
Resources:
Community:
Id:
name: "communityId"
Name:
name: "communityName"
Order:
-
Field:
name: "communityName"
order: "ASC"
The following example shows assets ordered by the name of a related entity.
JSON
{
"ViewConfig": {
"Resources": {
"Asset": {
"Id": { "name": "id" },
"Signifier": { "name": "name" },
"Relation": {
"type": "SOURCE",
"TargetAsset": {
"Id": { "name": "targetRelatedAssetId" },
"Signifier": { "name": "targetRelatedAsset" }
}
},
"Order": [
{ "Field": { "name": "targetRelatedAsset", "order":
"ASC" } }
]
}
}
}
}
29
Chapter 4
YAML
---
ViewConfig:
Resources:
Asset:
Id:
name: "id"
Signifier:
name: "name"
Relation:
type: "SOURCE"
TargetAsset:
Id:
name: "targetRelatedAssetId"
Signifier:
name: "targetRelatedAsset"
Order:
-
Field:
name: "targetRelatedAsset"
order: "ASC"
The type property on the relation allows you to determine which relationship is used when
navigating from the parent asset to the relation. In the example above, there might be
more than one targetRelatedAsset for each source asset. The query engine orders the
related target assets first and uses the first value to order the parent assets. Similar to
filtering, the order clause only affects the entities on which it is set. In the example, the
targetRelatedAssets is not sorted. To sort, you must add another ordering clause on
the Relation entity.
You should not sort on the target asset node because ordering only makes sense in a
collection. If an asset is the source for many relations and the relation has one target
asset, you must sort the collection of relations, not the related target asset directly.
Note For simplicity, this query has no filtering. Executing filtering would return all
assets and all relations available in Collibra.
30
Chapter 4
JSON
{
"ViewConfig": {
"Resources": {
"Asset": {
"Id": { "name": "id" },
"Signifier": { "name": "name" },
"Relation": {
"type": "SOURCE",
"TargetAsset": {
"Id": { "name": "targetRelatedAssetId" },
"Signifier": { "name": "targetRelatedAsset" }
},
"Order": [
{ "Field": { "name": "targetRelatedAsset", "order":
"ASC" } }
]
},
"Order": [
{ "Field": { "name": "targetRelatedAsset", "order":
"ASC" } }
]
}
}
}
}
31
Chapter 4
YAML
---
ViewConfig:
Resources:
Asset:
Id:
name: "id"
Signifier:
name: "name"
Relation:
type: "SOURCE"
TargetAsset:
Id:
name: "targetRelatedAssetId"
Signifier:
name: "targetRelatedAsset"
Order:
-
Field:
name: "targetRelatedAsset"
order: "ASC"
Order:
-
Field:
name: "targetRelatedAsset"
order: "ASC"
In cases where you only want the user ID and first and last name, tell the query engine not
to return the CreatedOn property and use it in the filter.
32
Chapter 4
JSON
{
"ViewConfig": {
"Resources": {
"User": {
"Id": { "name": "userId" },
"FirstName": { "name": "firstName" },
"LastName": { "name": "lastName" },
"CreatedOn": { "name": "createdOn", "hidden": true },
"Filter": { "Field": { "name": "createdOn", "operator":
"GREATER", "value": "1440492290300" } }
}
}
}
}
YAML
---
ViewConfig:
Resources:
User:
Id:
name: "userId"
FirstName:
name: "firstName"
LastName:
name: "lastName"
CreatedOn:
name: "createdOn"
hidden: true
Filter:
Field:
name: "createdOn"
operator: "GREATER"
value: "1440492290300"
Note Using hidden: true on a property removes that property from the results.
The default value is false.
33
Chapter 4
{
"view": {
"User": [
{
"userId": "9546bbe9-7299-4a99-bfd2-
d97f8256c201",
"firstName": "Patrick",
"lastName": "Star"
},
{
"userId": "d9f3cc67-0db7-4aa5-a246-
e83a62ea5c62",
"firstName": "SpongeBob",
"lastName": "SquarePants"
}
]
}
}
The example below shows how to strip out the HTML formatting tags, leaving only the
values.
JSON
{
"ViewConfig": {
"Resources": {
"Community": {
"Id": { "name": "communityId" },
"Name": { "name": "communityName" },
"Description": { "name": "communityDescription",
"stripHtml": true }
}
}
}
}
34
Chapter 4
YAML
---
ViewConfig:
Resources:
Community:
Id:
name: "communityId"
Name:
name: "communityName"
Description:
name: "communityDescription"
stripHtml: true
Note Use stripHtml on any text field. When true, the returned value is stripped
from the HTML tags.
Filtering operators
Operator Reverse Parameters Type com- Description
Operator patibility
35
Chapter 4
36
Chapter 4
Operator Example
EQUALS
{ "Field": { "name": "domainName", "operator":
"EQUALS", "value": "New Business Terms" } }
STARTS_
WITH { "Field": { "name": "domainName", "operator":
"STARTS_WITH", "value": "New" } }
STARTS_
WITH_DIGIT { "Field": { "name": "assetName", "operator":
"STARTS_WITH_DIGIT" } }
ENDS_WITH
{ "Field": { "name": "domainName", "operator":
"ENDS_WITH", "value": "Terms" } }
37
Chapter 4
Operator Example
INCLUDES
{ "Field": { "name": "domainName", "operator":
"CONTAINS", "value": "Bus" } }
LESS
{ "Field": { "name": "lastModified", "operator":
"GREATER", "value": "1440492290300" } }
LESS_OR_
EQUALS { "Field": { "name": "lastModified", "operator":
"GREATER_OR_EQUALS", "value": "1440492290300" }
}
BETWEEN
{ "Field": { "name": "lastModified", "operator":
"BETWEEN", "values": [ "1440492290300",
"1440493000000" } }
NULL
{ "Field": { "name": "description", "operator":
"NULL" } }
IN
{ "Field": { "name": "statusName", "operator":
"IN", "values": [ "New", "In Review" ] } }
EXISTS
{ "Field": { "target": "RelationSource", "oper-
ator": "EXISTS", "value": "00000000-0000-0000-
0000-000000007001", "name": "assetId" } }
38
Chapter 4
Operator Example
CR_FILTER_
DOMAIN { "Field": { "operator": "CR_FILTER_DOMAIN",
"value": "00000000-0000-0000-0000-000000006013"
} }
EXISTS/NOT_EXISTS filter
In the context of a graph query, the EXISTS filter tests the existence of a relationship with
another entity. This is the only filter that is explicitly limited to filtering on an entity located
directly under the filtered node. To specify which relation should exist/not exist, the filter
has a target key.
You can also pass a parameter to the EXISTS filter. This parameter is used as a
secondary filtering element. To query the assets with an attribute of type Description,
use the EXISTS filter on the asset with target value Attribute and also the Id of the
Description type in the value key of the filter.
The table below lists the possible target values and the expected value type for optional
parameters.
39
Chapter 4
40
Chapter 4
41
Chapter 4
Filtering in Hierarchy
When the EQUALS/NOT_EQUALS and IN/NOT_IN operators are used in conjunction with
an Id property of an asset, a RelationType or a Community can take an additional
descendants: true parameter. When true, the query engine will force an IN or NOT_IN
filter and add all Ids from the child assets, relation types or communities. This allows
selecting the following assets.
Boolean operators
You can combine the filtering operators using Boolean operators. Combining Boolean
operators results in a logical binary tree of possibilities. Because the binary tree is not easy
to read, the ViewConfig provides a way of specifying a Named Logical Array.
JSON
"Filter": {
"AND": [
{ "Field": { "name": "domainId", "operator":
"EQUALS", "value": "02204077-1cd1-4c70-a7c4-4cd845194b81" } },
{ "Field": { "name": "assetId", "operator":
"EXISTS", "value": "00000000-0000-0000-0000-000000007001",
"target": "RelationSource" } },
{ "Field": { "name": "statusName", "operator": "IN",
"values": [ "New", "In Review" ] } }
]
}
42
Chapter 4
YAML
Filter:
AND:
-
Field:
name: "domainId"
operator: "EQUALS"
value: "02204077-1cd1-4c70-a7c4-4cd845194b81"
-
Field:
name: "assetId"
operator: "EXISTS"
value: "00000000-0000-0000-0000-000000007001"
target: "RelationSource"
-
Field:
name: "statusName"
operator: "IN"
values:
- "New"
- "In Review"
Note Filtering elements bundled together in a named array, are logically combined
using the name of the array: either AND or OR. You can also nest these logical
arrays, allowing all possible Boolean combinations.
43
Chapter 4
JSON
"Filter": {
"AND": [
{
"OR": [
{ "Field": { "name": "domainId", "operator": "EQUALS",
"value": "02204077-1cd1-4c70-a7c4-4cd845194b81" } },
{ "Field": { "name": "assetId", "operator": "EXISTS",
"value": "00000000-0000-0000-0000-000000007001", "target":
"RelationSource" } }
]
},
{ "Field": { "name": "statusName", "operator": "IN",
"values": [ "New", "In Review" ] } }
]
}
YAML
Filter:
AND:
-
OR:
-
Field:
name: "domainId"
operator: "EQUALS"
value: "02204077-1cd1-4c70-a7c4-4cd845194b81"
-
Field:
name: "assetId"
operator: "EXISTS"
value: "00000000-0000-0000-0000-000000007001"
target: "RelationSource"
-
Field:
name: "statusName"
operator: "IN"
values:
- "New"
- "In Review"
44
Chapter 4
Filter properties
You can use filter shortcuts to reduce the amount of time required to write a JSON query.
For example, Relation has a typeId parameter that takes an Id and eliminates the
need to add a RelationType node with an Id property. These one-line filtering properties
are the most commonly used filters because they make the query a lot less verbose.
JSON
"StringAttribute": {
"labelId": "00000000-0000-0000-0000-000000000202",
"Id": { "name": "descriptionId" },
"LongExpression": { "name": "description" }
}
YAML
StringAttribute:
labelId: "00000000-0000-0000-0000-000000000202"
Id:
name: "descriptionId"
LongExpression:
name: "description"
Refer to Entities, properties and relations for the list of available filter properties for each
entity.
Virtual properties
Collibra does not store virtual properties. It calculates them at runtime and dynamically
evaluates the value of each property when the query executes. Virtual properties typically
support hierarchical queries that show if the resource has children. Some examples are
hasTaxonomyChildren and hasChildForRelation.
45
Chapter 4
The following example shows the query going two levels deep.
46
Chapter 4
JSON
{
"ViewConfig": {
"Resources": {
"Asset": {
"Id": { "name": "id" },
"Signifier": { "name": "name" },
"Relation": {
"type": "SOURCE",
"TargetAsset": {
"Id": { "name": "relatedAssetLevelOneId" },
"Signifier": { "name": "relatedAssetLevelOne" },
"Relation": {
"type": "TARGET",
"SourceAsset": {
"Id": { "name": "relatedAssetLevelTwoId" },
"Signifier": { "name": "relatedAssetLevelTwo" }
}
}
}
}
}
}
}
}
47
Chapter 4
YAML
---
ViewConfig:
Resources:
Asset:
Id:
name: "id"
Signifier:
name: "name"
Relation:
type: "SOURCE"
TargetAsset:
Id:
name: "relatedAssetLevelOneId"
Signifier:
name: "relatedAssetLevelOne"
Relation:
type: "TARGET"
SourceAsset:
Id:
name: "relatedAssetLevelTwoId"
Signifier:
name: "relatedAssetLevelTwo"
These special parameters and custom entity names only exist for a fraction of the
available entities. For a complete list, see Entities, properties and relations.
Note To reduce the number of assets returned, the query example above is not
filtered. Filtering would return a large amount of data and impact performance.
48
Chapter 4
JSON
{
"ViewConfig": {
"displayStart": 10,
"displayLength": 5,
"maxCountLimit": 10000,
"Resources": {
"Community": {
"Id": { "name": "communityId" },
"Name": { "name": "communityName" },
"Description": { "name": "communityDescription" },
"Order": [ { "Field": { "name": "communityName",
"order": "ASC" } } ]
}
}
}
}
49
Chapter 4
YAML
---
ViewConfig:
displayStart: 10
displayLength: 5
maxCountLimit: 10000
Resources:
Community:
Id:
name: "communityId"
Name:
name: "communityName"
Description:
name: "communityDescription"
Order:
-
Field:
name: "communityName"
order: "ASC"
The example query above selects page 3 of all communities, with five results per page.
Note
l Paged results should always be sorted, otherwise the results might seem
inconsistent from page to page.
l The paged results list is recalculated upon each request.
l All entities that have been added or removed will appear/disappear from the
list, modifying the indexes of the elements in the results list.
l The Collibra Console allows limiting the number of results returned by queries.
The values range from 10 000 to 100 000. If enabled, and the limit is set, then:
o The default displayLength value (-1) is overwritten by the limit set
larger than the limit value set in the Collibra Console, an exception is
thrown.
50
Chapter 4
section that assigns each selected field to a column. The previous examples use the
ViewConfig as input to the API to produce a JSON tree format.
The following example uses TableViewConfig. This is available under the same
{{domain}}/rest/2.0/outputModule/export/json endpoint, just using the
TableViewConfig as the JSON payload.
JSON
{
"TableViewConfig": {
"displayLength": 5,
"displayStart": 10,
"Resources": {
"Community": {
"Id": { "name": "communityId" },
"Name": { "name": "communityName" },
"Description": { "name": "communityDescription" }
}
},
"Columns": [
{ "Column": { "fieldName": "communityId" } },
{ "Column": { "fieldName": "communityName" } },
{ "Column": { "fieldName": "communityDescription" } }
]
}
}
51
Chapter 4
YAML
---
TableViewConfig:
displayLength: 5
displayStart: 10
Resources:
Community:
Id:
name: "communityId"
Name:
name: "communityName"
Description:
name: "communityDescription"
Columns:
-
Column:
fieldName: "communityId"
-
Column:
fieldName: "communityName"
-
Column:
fieldName: "communityDescription"
When formatted, this query produces an array of rows, each containing the requested
columns.
{
"iTotalDisplayRecords": 48,
"iTotalRecords": 5,
"aaData": [
{
"communityId": "12345678-0006-0000-0000-
000000000000",
"communityName": "Simple Community 6",
"communityDescription": ""
},
{
"communityId": "12345678-0007-0000-0000-
000000000000",
"communityName": "Simple Community 7",
"communityDescription": ""
},
{
52
Chapter 4
"communityId": "12345678-0008-0000-0000-
000000000000",
"communityName": "Simple Community 8",
"communityDescription": ""
},
{
"communityId": "12345678-0009-0000-0000-
000000000000",
"communityName": "Simple Community 9",
"communityDescription": ""
},
{
"communityId": "12345678-0010-0000-0000-
000000000000",
"communityName": "Simple Community 10",
"communityDescription": ""
}
]
}
Note Because the Columns mapping determines what should be returned, setting
hidden: true on a property has no effect in a TableViewConfig.
In the following example, the "displayLength" value is set to 0. This query shows the
number of entities without retrieving actual results.
Note The JSON Data Table output contains the total number of available records in
Collibra for this query, which is iTotalDisplayRecords. It also contains the
number of records returned in this set, which is iTotalRecords.
{
"iTotalDisplayRecords": 48,
"iTotalRecords": 0,
"aaData": []
}
You can use the TableViewConfig queries with the following endpoints:
l {{domain}}/rest/2.0/outputModule/export/{{json | csv}}
l {{domain}}/rest/2.0/outputModule/export/{{json | csv | excel}}-
file
53
Chapter 4
JSON
{
"TableViewConfig": {
"Resources": {
"Asset": {
"Id": { "name": "assetId" },
"Signifier": { "name": "assetName" },
"StringAttribute": {
"LongExpression": { "name": "note" },
"CreatedOn": { "name": "noteCreatedOn" },
"Order": [ { "Field": { "name": "noteCreatedOn",
"order": "DESC" } } ]
},
"Domain": {
"Id": { "name": "domainId" }
},
"Filter": { "Field": { "name": "domainId", "operator":
"EQUALS", "value": "f342423f-54fd-4643-935b-adbd9e7f5e25" } },
"Order": [ { "Field": { "name": "assetName" } } ]
}
},
"Columns": [
{ "Column": { "fieldName": "assetId" } },
{ "Column": { "fieldName": "assetName" } },
{ "Column": { "fieldName": "note" } }
]
}
}
54
Chapter 4
YAML
---
TableViewConfig:
Resources:
Asset:
Id:
name: "assetId"
Signifier:
name: "assetName"
StringAttribute:
LongExpression:
name: "note"
CreatedOn:
name: "noteCreatedOn"
Order:
-
Field:
name: "noteCreatedOn"
order: "DESC"
Domain:
Id:
name: "domainId"
Filter:
Field:
name: "domainId"
operator: "EQUALS"
value: "f342423f-54fd-4643-935b-adbd9e7f5e25"
Order:
-
Field:
name: "assetName"
Columns:
-
Column:
fieldName: "assetId"
-
Column:
fieldName: "assetName"
-
Column:
fieldName: "note"
Depending on the format requested, the results might be different. In Excel or CSV format,
each asset is duplicated on a new row for each note value.
55
Chapter 4
This is similar to using SQL queries to join two tables with a one-to-many relationship.
Unlike SQL, if you select an asset with two notes and three responsibilities, the asset
would use three lines of the Excel table, not six, and the third row in the note column would
be empty.
JSON format, on the other hand, does not add duplicate rows to the results. Instead, it
returns the first note found and discards the other notes.
{
"iTotalDisplayRecords": 3,
"iTotalRecords": 3,
"aaData": [
{
"assetId": "c20d5b39-6c5d-411b-adcb-
82a1dd3851cc",
"assetName": "Business Term 1",
"note": "Second Note"
},
{
"assetId": "1a6a8f73-43b0-4a29-84c3-
baaa3467be70",
"assetName": "Business Term 2",
"note": "Single note on BT2"
},
{
"assetId": "7329349e-0631-41a7-a740-
738979d887c6",
"assetName": "Business Term 3",
"note": "Single Note on BT3"
}
]
}
For tabular formats that do not duplicate rows, you can add the Group mapping construct
to the Columns section.
56
Chapter 4
JSON
{
"TableViewConfig": {
"Resources": {
"Asset": {
"Id": { "name": "assetId" },
"Signifier": { "name": "assetName" },
"StringAttribute": {
"LongExpression": { "name": "note" },
"CreatedOn": { "name": "noteCreatedOn" },
"Order": [ { "Field": { "name": "noteCreatedOn",
"order": "DESC" } } ]
},
"Domain": {
"Id": { "name": "domainId" }
},
"Filter": { "Field": { "name": "domainId", "operator":
"EQUALS", "value": "f342423f-54fd-4643-935b-adbd9e7f5e25" } },
"Order": [ { "Field": { "name": "assetName" } } ]
}
},
"Columns": [
{ "Column": { "fieldName": "assetId" } },
{ "Column": { "fieldName": "assetName" } },
{
"Group": {
"name": "Notes",
"Columns": [
{ "Column": { "fieldName": "note" } }
]
}
}
]
}
}
57
Chapter 4
YAML
---
TableViewConfig:
Resources:
Asset:
Id:
name: "assetId"
Signifier:
name: "assetName"
StringAttribute:
LongExpression:
name: "note"
CreatedOn:
name: "noteCreatedOn"
Order:
-
Field:
name: "noteCreatedOn"
order: "DESC"
Domian:
Id:
name: "domainId"
Filter:
Field:
name: "domainId"
operator: "EQUALS"
value: "f342423f-54fd-4643-935b-adbd9e7f5e25"
Order:
-
Field:
name: "assetName"
Columns:
-
Column:
fieldName: "assetId"
-
Column:
fieldName: "assetName"
-
Group:
name: "Notes"
Columns:
-
Column:
fieldName: "note"
58
Chapter 4
A Group mapping allows grouping multiple results for a single parent. A Group must
receive a user-defined name that will be used when formatting the results.
{
"iTotalDisplayRecords": 3,
"iTotalRecords": 3,
"aaData": [
{
"assetId": "c20d5b39-6c5d-411b-adcb-82a1dd3851cc",
"assetName": "Business Term 1",
"Notes": [
{
"note": "Second Note"
},
{
"note": "First note"
}
]
},
{
"assetId": "1a6a8f73-43b0-4a29-84c3-baaa3467be70",
"assetName": "Business Term 2",
"Notes": [
{
"note": "Single note on BT2"
}
]
},
{
"assetId": "7329349e-0631-41a7-a740-738979d887c6",
"assetName": "Business Term 3",
"Notes": [
{
"note": "Single Note on BT3"
}
]
}
]
}
Note
Here are some rules about Group:
l Group mappings cannot be nested, a Group defined within a Group is not
supported.
l All columns within a group must be related to the same parent entity.
59
Chapter 4
You can set a timeout for each ViewConfig and TableViewConfig execution on the
main config level. Defining it in the body of the query is optional.
Warning
l No single query may run longer than 24 hours, which is the maximum value.
l Those values will significantly smaller in the next major release, so it would be
{{domain}}/rest/2.0/outputModule/export/{{csv | excel}}-
job endpoints. Here, data is calculated in chunks, with the size of the chunk
defined in the Collibra Console. A separate query calculates each chunk and
the timeout value set in the TableViewConfig will be a timeout value
calculation for that chunk.
60
Chapter 4
61
Chapter 4
JSON
{
"ViewConfig": {
"queryTimeout": 5,
"Resources": {
"Domain": {
"name": "d",
"Name": {
"name": "vocName"
},
"Asset": {
"name": "t",
"Signifier": {
"name": "assetName"
},
"AssetType": {
"name": "tt",
"Name": {
"name": "assetType"
}
}
}
}
}
}
}
62
Chapter 4
YAML
---
ViewConfig:
queryTimeout: 5
Resources:
Domain:
name: "d"
Name:
name: "vocName"
Asset:
name: "t"
Signifier:
name: "assetName"
AssetType:
name: "tt"
Name:
name: "assetType"
After the timeout is reached, the REST request will receive a response with HTTP error
code 408. Instead of a results message, the body will contain a JSON with the error
description.
The example below shows a small typo in the filter. userID is used instead of userId.
When you make a POST request to
63
Chapter 4
{{domain}}/rest/2.0/outputModule/export/json?validationEnabled=true,
the following body results.
JSON
{
"ViewConfig": {
"displayLength": 5,
"Resources": {
"Community": {
"Id": { "name": "communityId" },
"Name": { "name": "community" },
"Responsibility": {
"Id":{ "name": "responsibilityId"},
"User": {
"Id": { "name": "userId" },
"FirstName": { "name": "userName" }
}
},
"Filter": {"Field": {"name":"userID", "Operator":"NOT_
NULL"}}
}
}
}
}
64
Chapter 4
YAML
---
ViewConfig:
displayLength: 5
Resources:
Community:
Id:
name: "communityId"
Name:
name: "community"
Responsibility:
Id:
name: "responsibilityId"
User:
Id:
name: "userId"
FirstName:
name: "userName"
Filter:
Field:
name: "userID"
Operator: "NOT_NULL"
{
"viewConflict": [
{
"type": "View Configuration Conflict",
"message": "Field 'userID' is unknown.",
"id": "7c723d33-dc8d-484b-90df-91e3364d771a"
}
]
}
65
Chapter 5
l {{domain}}/rest/2.0/outputModule/export/{{format}}
l {{domain}}/rest/2.0/outputModule/export/{{format}}-file
l {{domain}}/rest/2.0/outputModule/export/{{format}}-job
In this chapter
Endpoints and formats 67
66
Chapter 5
XML YES NO
CSV NO YES
EXCEL NO YES
67
Chapter 5
68
Chapter 6
Entity
Entity is the base abstract class of all other entities. An abstract entity cannot be
queried, thus Entity cannot be used in the query tree.
Properties
Resource
Extends Entity
Resource is an abstract entity, which is the base class of most other entities. Most other
entities share the following properties and relations. An abstract entity cannot be
queried, thus Resource cannot be used in the query tree.
Properties
69
Chapter 6
Relations
Representation
Extends Resource
Representation is an abstract entity, which is the base class for Asset. All assets share
the following relationships. An abstract entity cannot be queried, thus Representation
cannot be used in the query tree.
Properties
70
Chapter 6
Relations
71
Chapter 6
Organization
Extends Resource
Properties
72
Chapter 6
Relations
Filtering Property
73
Chapter 6
Community
Extends Organization
ParentCommunity
Extends Community
Domain
Extends Organization
Relations
74
Chapter 6
DomainType
Extends Resource
Properties
Relations
ChildDomainTypes
Extends DomainType
Collection of DomainType
75
Chapter 6
RelationType
Extends Resource
Properties
Relations
76
Chapter 6
Relation
Extends Resource
Properties
Relations
Parent relationship selector. Only if the parent is a asset node or is of type inheriting
from an asset node.
77
Chapter 6
type This parameter allows specifying which path should be followed from
the parent asset entity to this relation. The possible values are either
SOURCE or TARGET, which tells whether the parent asset is the source
or target of the relation. This parameter is mandatory because there is
no default value.
Filtering Property
typeId Allows filtering relations using the Id value of their related Rela-
tionType.
ComplexRelation
Extends Asset
Properties
Relations
Filtering Property
Additional Parameters
78
Chapter 6
ComplexRelationType
Extends AssetType
Properties
Relations
79
Chapter 6
ComplexRelationLegType
Extends Resource
Properties
Relations
ComplexRelationAttributeType
Extends Resource
80
Chapter 6
Properties
Relations
Asset
Extends Representation
An Asset is the basic building block capturing information about the assets available in
Collibra.
Properties
81
Chapter 6
l the RelationType
l direction (role or co-role)
For example:
"HasChildrenForRelation": {
"name": "hasChildren",
"relationTypeId":
"00000000-0000-0000-0000-
000000007005",
"roleDirection": true
}
Relations
82
Chapter 6
Filtering Property
For example:
"rootOfRelation": [
{
"relationTypeId": "00000000-0000-
0000-0000-000000007038",
"roleDirection": true
},
{
"relationTypeId": "00000000-0000-
0000-0000-000000007005",
"roleDirection": true
}
],
SourceAsset
Extends Asset
Exact synonym of Asset. It can only be used as a child of relation to disambiguate the
relationship followed.
83
Chapter 6
TargetAsset
Extends Asset
Exact synonym of Asset. It can only be used as a child of a relation to disambiguate the
relationship followed.
SourceAssetType
Extends AssetType
TargetAssetType
Extends AssetType
AssetType
Extends Resource
A AssetType, also called AssetType, determines the type of asset, which is an Asset
Properties
84
Chapter 6
Relations
85
Chapter 6
ChildAssetTypes
Extends AssetType
Collection of AssetType
Attribute
Extends Resource
Properties
class Text With other entities, extends attribute. You may use
the class qualifier to differentiate between the vari-
ous subclasses.
Relations
Filtering Property
labelId Allows filtering the attributes based on the Id of their related Attrib-
uteType.
86
Chapter 6
StringAttribute
Extends Attribute
Properties
longExpression Text The unbounded text value. Obsolete, but returns the
same content as Attribute:value.
ScriptAttribute
Extends Attribute
Properties
script Text The script. Obsolete, but returns the same content as
Attribute:value.
SingleValueListAttribute
Extends Attribute
87
Chapter 6
MultiValueListAttribute
Extends Attribute
Properties
BooleanAttribute
Extends Attribute
Properties
NumericAttribute
Extends Attribute
Properties
88
Chapter 6
DateTimeAttribute
Extends Attribute
Properties
dateTime Number The date and time values expressed as the num-
ber of milliseconds since 1/1/1970.
DateAttribute
Extends Attribute
Properties
AttributeType
Extends Resource
Properties
89
Chapter 6
language Text(255) The name of the language used. The kind is SCRIPT.
Relations
User
Extends Resource
Represents Collibra users. Any resource has a creation date and the last modification
date. Collibra also stores which user made each of these operations. The User entity is
related to all types as the creator and/or last modifier of the entity.
Properties
90
Chapter 6
Relations
91
Chapter 6
92
Chapter 6
93
Chapter 6
94
Chapter 6
Email
Extends Resource
Email represents one of the user's email addresses. It can only be used as a child of the
user ser.
Properties
Phone
Extends Resource
Phone represents one of the user's phone numbers. It can only be used as a child of the
user.
Properties
95
Chapter 6
InstantMessagingAccount
Extends Resource
Properties
Website
Extends Resource
Website represents one of the user's websites. It can only be used as a child of the user.
Properties
96
Chapter 6
Address
Extends Resource
Address represents one of the user's addresses. It can only be used as a child of the
user.
Properties
Group
Extends Resource
Properties
Relations
97
Chapter 6
Responsibility
Extends Resource
Properties
Relations
Filtering Property
98
Chapter 6
Role
Extends Asset (deprecated)
Status
Extends Resource
Properties
Relations
WorkflowTaskInfo (deprecated)
Extends Resource
Properties
99
Chapter 6
dueDate Number The due date of the task expressed as the num-
ber of milliseconds since 1/1/1970.
Mapping
Extends Resource
A Mapping links an externally defined entity, such as an asset or domain, to one entity.
Properties
100
Chapter 6
Relations
Tag
Extends Resource
Properties
Relations
DataQualityRule (deprecated)
Extends Resource
101
Chapter 6
Properties
Relations
Scope
Extends Resource
Properties
Relations
Comment
Extends Resource
Properties
102
Chapter 6
Relations
Filtering property
rootComment Boolean When true, the query engine adds a filter retaining
only root comments.
ParentComment
Extends Resource
DataType (deprecated)
Extends Entity
103
Chapter 6
Properties
logicalDataType Text The corresponding logical data type used by the pro-
filing job. It is one of the base types.
Relations
AdvancedDataType (deprecated)
Extends DataType
Properties
Relations
104
Chapter 6
DataTypePattern (deprecated)
Extends Entity
Properties
Relations
DataTypeMatch (deprecated)
Extends Entity
A DataTypeMatch contains profiling results indicating the percentage of the actual data
behind a DataElement asset that matches a DataType.
Properties
Relations
105
Chapter 6
BaseView (deprecated)
Extends Resource
Properties
Relations
View (deprecated)
Extends BaseView
A view in Collibra.
Properties
Relations
106
Chapter 6
DiagramPicture (deprecated)
Extends BaseView
A diagram illustration.
Properties
Relations
DiagramPictureSharingRule (deprecated)
Extends Resource
A DiagramPicture sharing rule. A diagram picture can be shared with a user, group or
role.
Properties
Relations
107
Chapter 6
AssignmentRule (deprecated)
Extends Resource
An assignment rule, only exposed to the graph query engine to show the asset linked to
a DiagramPicture.
Properties
Relations
108
The use of direct relationships impacts query construction by establishing clear paths between entities, reducing complexity in query formulations, and ensuring coherent maintenance of data representations. By defining relations such as User-to-Responsibility or Group-to-Role, the data model facilitates straightforward queries and accurate responsibility assignments across entities, which is essential for maintaining data integrity and reducing redundancy in data representation .
The system utilizes the role hierarchy to manage user responsibilities by linking roles to users or groups through a responsibility node. Each responsibility specifies the user or group and the associated role, which can apply to different entities such as assets, domains, or communities. This hierarchical structure allows clear delineation of roles like Admin or Steward across various entities .
The optimal way to query responsibilities in a community setting is to minimize complexity by filtering and ordering fields effectively. According to the guidelines, it is recommended to specify filters to ignore null values, such as filtering responsibilities with a non-null userId or groupId, and order the results by relevant fields, like communityName, using ASC for ascending order. These strategies reduce unnecessary data retrievals and organize the data efficiently .
Within the data structure, organizations can represent communities, which are essentially collections of sub-entities like domains and responsibilities. A community can contain multiple subcommunities and domains, each following a hierarchical structure that aids in organizing data according to specific domains or responsibilities. This organization facilitates better data management and retrieval by grouping related data entities hierarchically .
Filtering impacts the responsibility query results by removing irrelevant entities, ensuring only relevant responsibilities appear in the results. This is implemented using a filtering clause, such as checking for 'userId' or 'groupId' that are not null, which can be specified in the JSON configuration as filter parameters with NOT_NULL operators, effectively refining the result set to only those entities meeting the criteria .
The performance of queries is affected when traversing to-many relationships because each relation traversal initiates a new query against the internal storage engine. The impact can vary depending on the size and complexity of the data set, ranging from negligible to significant in added query time. Optimizing queries involves minimizing unnecessary relation traversals or filtering to reduce performance penalties .
When implementing sorting in the view configuration, considerations include choosing appropriate fields for ordering results and deciding the sorting direction (ascending or descending). The Order clause should reference declared fields within the entity or its related entities, specifying the sorting order using constants like ASC or DESC, which helps in organizing and presenting the data in a meaningful order .
The system manages attribute inheritance across entity hierarchies by defining base classes, such as Representation for Asset, which cannot be directly queried but allows descendant entities to inherit properties. This design facilitates consistency across the hierarchy, as shared attributes need only be defined once, thereby promoting efficient data management and reducing redundancy by providing a unified framework for attribute application across related entities .
The JSON and YAML configuration allow for adding multiple related entities under the same node by converting a single JSON object into an array of objects. This approach enables defining multiple responsibilities by treating them as individual entities within an array, effectively linking multiple roles or responsibilities to a community or group .
Attributes on different entity types are represented as collections within an entity, such as NumericAttribute or BooleanAttribute, allowing entities to have detailed, typed data properties. Each attribute type extends the Resource and specifies a particular kind of data (numeric, boolean, etc.), which can be utilized in queries for filtering or organizing data within a complex data structure, thus enabling diverse data handling capabilities .