Type - Get Relationship Def By Name
Get the relationship definition by its name (unique).
GET {endpoint}/datamap/api/atlas/v2/types/relationshipdef/name/{name}
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
endpoint
|
path | True |
string |
|
name
|
path | True |
string |
The name of the relationship. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
The request has succeeded. |
|
Other Status Codes |
An unexpected error response. |
Security
OAuth2Auth
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
https://purview.azure.net/.default |
Examples
Type_GetRelationshipDefByName
Sample request
GET {endpoint}/datamap/api/atlas/v2/types/relationshipdef/name/storm_topology_nodes
Sample response
{
"category": "RELATIONSHIP",
"guid": "695edde1-2782-4a3c-841b-0b3aba25fe45",
"createdBy": "ExampleCreator",
"updatedBy": "ExampleUpdator",
"createTime": 1553065976797,
"updateTime": 1553065976797,
"version": 1,
"name": "storm_topology_nodes",
"description": "storm_topology_nodes",
"typeVersion": "1.0",
"attributeDefs": [],
"relationshipCategory": "ASSOCIATION",
"endDef1": {
"type": "storm_topology",
"name": "nodes",
"isContainer": false,
"cardinality": "SET",
"isLegacyAttribute": true
},
"endDef2": {
"type": "storm_node",
"name": "topolgies",
"isContainer": false,
"cardinality": "SET",
"isLegacyAttribute": false
},
"relationshipLabel": "r:storm_topology_nodes"
}
Definitions
Name | Description |
---|---|
Atlas |
class that captures details of a struct-attribute. |
Atlas |
class that captures details of a constraint. |
Atlas |
An error response from the service |
Atlas |
AtlasRelationshipDef is a TypeDef that defines a relationship. As with other typeDefs the AtlasRelationshipDef has a name. Once created the RelationshipDef has a guid. The name and the guid are the 2 ways that the RelationshipDef is identified. RelationshipDefs have 2 ends, each of which specify cardinality, an EntityDef type name and name and optionally whether the end is a container. RelationshipDefs can have AttributeDefs - though only primitive types are allowed. RelationshipDefs have a relationshipCategory specifying the UML type of relationship required The way EntityDefs and RelationshipDefs are intended to be used is that EntityDefs will define AttributeDefs these AttributeDefs will not specify an EntityDef type name as their types. RelationshipDefs introduce new attributes to the entity instances. For example EntityDef A might have attributes attr1,attr2,attr3 EntityDef B might have attributes attr4,attr5,attr6 RelationshipDef AtoB might define 2 ends end1: type A, name attr7 end2: type B, name attr8 When an instance of EntityDef A is created, it will have attributes attr1,attr2,attr3,attr7 When an instance of EntityDef B is created, it will have attributes attr4,attr5,attr6,attr8 In this way relationshipDefs can be authored separately from entityDefs and can inject relationship attributes into the entity instances |
Atlas |
The relationshipEndDef represents an end of the relationship. The end of the relationship is defined by a type, an attribute name, cardinality and whether it is the container end of the relationship. |
Cardinality |
Cardinality |
Date |
The date format. |
Number |
The number format. |
Relationship |
Relationship Category |
Rounding |
Rounding Mode |
Time |
The timezone information. |
Type |
Type Category |
AtlasAttributeDef
class that captures details of a struct-attribute.
Name | Type | Description |
---|---|---|
cardinality |
single-valued attribute or multi-valued attribute. |
|
constraints |
An array of constraints. |
|
defaultValue |
string |
The default value of the attribute. |
description |
string |
The description of the attribute. |
includeInNotification |
boolean |
Determines if it is included in notification. |
isIndexable |
boolean |
Determines if it is indexable. |
isOptional |
boolean |
Determines if it is optional. |
isUnique |
boolean |
Determines if it unique. |
name |
string |
The name of the attribute. |
options |
object |
The options for the attribute. |
typeName |
string |
The name of the type. |
valuesMaxCount |
integer |
The maximum count of the values. |
valuesMinCount |
integer |
The minimum count of the values. |
AtlasConstraintDef
class that captures details of a constraint.
Name | Type | Description |
---|---|---|
params |
|
The parameters of the constraint definition. |
type |
string |
The type of the constraint. |
AtlasErrorResponse
An error response from the service
Name | Type | Description |
---|---|---|
errorCode |
string |
The error code. |
errorMessage |
string |
The error message. |
requestId |
string |
The request ID. |
AtlasRelationshipDef
AtlasRelationshipDef is a TypeDef that defines a relationship. As with other typeDefs the AtlasRelationshipDef has a name. Once created the RelationshipDef has a guid. The name and the guid are the 2 ways that the RelationshipDef is identified. RelationshipDefs have 2 ends, each of which specify cardinality, an EntityDef type name and name and optionally whether the end is a container. RelationshipDefs can have AttributeDefs - though only primitive types are allowed. RelationshipDefs have a relationshipCategory specifying the UML type of relationship required The way EntityDefs and RelationshipDefs are intended to be used is that EntityDefs will define AttributeDefs these AttributeDefs will not specify an EntityDef type name as their types. RelationshipDefs introduce new attributes to the entity instances. For example EntityDef A might have attributes attr1,attr2,attr3
EntityDef B might have attributes attr4,attr5,attr6 RelationshipDef AtoB might define 2 ends
end1: type A, name attr7 end2: type B, name attr8
When an instance of EntityDef A is created, it will have attributes attr1,attr2,attr3,attr7 When an instance of EntityDef B is created, it will have attributes attr4,attr5,attr6,attr8
In this way relationshipDefs can be authored separately from entityDefs and can inject relationship attributes into the entity instances
Name | Type | Description |
---|---|---|
attributeDefs |
An array of attribute definitions. |
|
category |
The enum of type category. |
|
createTime |
integer |
The created time of the record. |
createdBy |
string |
The user who created the record. |
dateFormatter |
The date format. |
|
description |
string |
The description of the type definition. |
endDef1 |
The relationshipEndDef represents an end of the relationship. The end of the relationship is defined by a type, an attribute name, cardinality and whether it is the container end of the relationship. |
|
endDef2 |
The relationshipEndDef represents an end of the relationship. The end of the relationship is defined by a type, an attribute name, cardinality and whether it is the container end of the relationship. |
|
guid |
string |
The GUID of the type definition. |
lastModifiedTS |
string |
ETag for concurrency control. |
name |
string |
The name of the type definition. |
options |
object |
The options for the type definition. |
relationshipCategory |
The Relationship category determines the style of relationship around containment and lifecycle. UML terminology is used for the values. ASSOCIATION is a relationship with no containment. COMPOSITION and AGGREGATION are containment relationships. The difference being in the lifecycles of the container and its children. In the COMPOSITION case, the children cannot exist without the container. For AGGREGATION, the life cycles of the container and children are totally independent. |
|
relationshipLabel |
string |
The label of the relationship. |
serviceType |
string |
The service type. |
typeVersion |
string |
The version of the type. |
updateTime |
integer |
The update time of the record. |
updatedBy |
string |
The user who updated the record. |
version |
integer |
The version of the record. |
AtlasRelationshipEndDef
The relationshipEndDef represents an end of the relationship. The end of the relationship is defined by a type, an attribute name, cardinality and whether it is the container end of the relationship.
Name | Type | Description |
---|---|---|
cardinality |
single-valued attribute or multi-valued attribute. |
|
description |
string |
The description of the relationship end definition. |
isContainer |
boolean |
Determines if it is container. |
isLegacyAttribute |
boolean |
Determines if it is a legacy attribute. |
name |
string |
The name of the relationship end definition. |
type |
string |
The type of the relationship end. |
CardinalityValue
Cardinality
Name | Type | Description |
---|---|---|
LIST |
string |
list |
SET |
string |
set |
SINGLE |
string |
single |
DateFormat
The date format.
Name | Type | Description |
---|---|---|
availableLocales |
string[] |
An array of available locales. |
calendar |
number |
Calendar |
dateInstance |
The date format. |
|
dateTimeInstance |
The date format. |
|
instance |
The date format. |
|
lenient |
boolean |
Determines the leniency of the date format. |
numberFormat |
The number format. |
|
timeInstance |
The date format. |
|
timeZone |
The timezone information. |
NumberFormat
The number format.
Name | Type | Description |
---|---|---|
availableLocales |
string[] |
The number format. |
currency |
string |
The currency. |
currencyInstance |
The number format. |
|
groupingUsed |
boolean |
Determines if grouping is used. |
instance |
The number format. |
|
integerInstance |
The number format. |
|
maximumFractionDigits |
integer |
The maximum of fraction digits. |
maximumIntegerDigits |
integer |
The maximum of integer digits. |
minimumFractionDigits |
integer |
The minimum of fraction digits. |
minimumIntegerDigits |
integer |
The minimum of integer digits. |
numberInstance |
The number format. |
|
parseIntegerOnly |
boolean |
Determines if only integer is parsed. |
percentInstance |
The number format. |
|
roundingMode |
The enum of rounding mode. |
RelationshipCategory
Relationship Category
Name | Type | Description |
---|---|---|
AGGREGATION |
string |
aggregation |
ASSOCIATION |
string |
association |
COMPOSITION |
string |
composition |
RoundingMode
Rounding Mode
Name | Type | Description |
---|---|---|
CEILING |
string |
ceiling |
DOWN |
string |
down |
FLOOR |
string |
floor |
HALF_DOWN |
string |
half down |
HALF_EVEN |
string |
half even |
HALF_UP |
string |
half up |
UNNECESSARY |
string |
unnecessary |
UP |
string |
up |
TimeZone
The timezone information.
Name | Type | Description |
---|---|---|
availableIds |
string[] |
An array of available IDs. |
default |
The timezone information. |
|
displayName |
string |
The display name of the timezone. |
dstSavings |
integer |
The value of the daylight saving time. |
id |
string |
The ID of the timezone. |
rawOffset |
integer |
The raw offset of the timezone. |
TypeCategory
Type Category
Name | Type | Description |
---|---|---|
ARRAY |
string |
array |
CLASSIFICATION |
string |
classification |
ENTITY |
string |
entity |
ENUM |
string |
enum |
MAP |
string |
map |
OBJECT_ID_TYPE |
string |
object id type |
PRIMITIVE |
string |
primitive |
RELATIONSHIP |
string |
relationship |
STRUCT |
string |
struct |
TERM_TEMPLATE |
string |
term template |