/api/meta/entity/bulk (POST)
Creating glossary objects
You can create objects in glossaries in the same way as all other objects in the SDK . Each object provides a method that takes the minimal set of required fields to create that asset .
Create a glossary
2.0.0
1.0.0
To create a glossary:
Java
Python
Kotlin Raw REST API
Create a glossary Glossary glossary = Glossary
. creator ( "Example Glossary" ) // (1)
. assetIcon ( AtlanIcon . BOOK_OPEN_TEXT ) // (2)
. build (); // (3)
AssetMutationResponse response = glossary . save (); // (4)
A name for the new glossary.
You can chain any other enrichment onto the creator, such as an icon for the glossary in this example.
You then build the object (in-memory).
And finally you can save the glossary back to Atlan (and the result of that save is returned).
Create a glossary from pyatlan.client.atlan import AtlanClient
from pyatlan.model.assets import AtlasGlossary
from pyatlan.model.enums import AtlanIcon
client = AtlanClient ()
glossary = AtlasGlossary . creator (
name = "Example Glossary" # (1)
)
glossary . asset_icon = AtlanIcon . BOOK_OPEN_TEXT . value # (2)
response = client . asset . save ( glossary ) # (3)
A name for the new glossary.
You can chain any other enrichment onto the creator, such as an icon for the glossary in this example.
You then build the object (in-memory).
And finally you can save the glossary back to Atlan (and the result of that save is returned).
Create a glossary val glossary = Glossary
. creator ( "Example Glossary" ) // (1)
. assetIcon ( AtlanIcon . BOOK_OPEN_TEXT ) // (2)
. build () // (3)
val response = glossary . save () // (4)
A name for the new glossary.
You can chain any other enrichment onto the creator, such as an icon for the glossary in this example.
You then build the object (in-memory).
And finally you can save the glossary back to Atlan (and the result of that save is returned).
POST /api/meta/entity/bulk 1
2
3
4
5
6
7
8
9
10
11
12 {
"entities" : [ // (1)
{
"typeName" : "AtlasGlossary" , // (2)
"attributes" : {
"name" : "Example Glossary" , // (3)
"qualifiedName" : "Example Glossary" , // (4)
"assetIcon" : "PhBookOpenText" // (5)
}
}
]
}
All assets must be wrapped in an entities
array.
You must provide the exact type name for the asset (case-sensitive). For a glossary, this is AtlasGlossary
.
You must provide the exact name of the asset (case-sensitive).
You must provide a qualifiedName
of the asset (case-sensitive). In the case of glossaries, this will actually be replaced in the back-end with a generated qualifiedName
, but you must provide some value when creating the object.
You can also provide other enrichment, such as an icon for the glossary in this example.
Create a category
2.0.0
1.0.0
To create a category:
Java
Python
Kotlin Raw REST API
Create a category GlossaryCategory category = GlossaryCategory
. creator ( "Example Category" , // (1)
"b4113341-251b-4adc-81fb-2420501c30e6" ) // (2)
. build (); // (3)
AssetMutationResponse response = category . save (); // (4)
You must provide a name for the new category.
You must provide the ID of the glossary in which the category should be created (GUID or qualifiedName).
You then build the object (in-memory).
And finally you can save the category back to Atlan (and the result of that save is returned).
Create a category from pyatlan.client.atlan import AtlanClient
from pyatlan.model.assets import AtlasGlossaryCategory
client = AtlanClient ()
category = AtlasGlossaryCategory . creator (
name = "Example Category" , # (1)
glossary_guid = "b4113341-251b-4adc-81fb-2420501c30e6" # (2)
)
response = client . asset . save ( category ) # (3)
You must provide a name for the new category.
You must provide the ID of the glossary (GUID) in which the category should be created.
And finally you can save the category back to Atlan (and the result of that save is returned).
Create a category val category = GlossaryCategory
. creator ( "Example Category" , // (1)
"b4113341-251b-4adc-81fb-2420501c30e6" ) // (2)
. build () // (3)
val response = category . save () // (4)
You must provide a name for the new category.
You must provide the ID of the glossary in which the category should be created (GUID or qualifiedName).
You then build the object (in-memory).
And finally you can save the category back to Atlan (and the result of that save is returned).
POST /api/meta/entity/bulk 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 {
"entities" : [ // (1)
{
"typeName" : "AtlasGlossaryCategory" , // (2)
"attributes" : {
"name" : "Example Category" , // (3)
"qualifiedName" : "Example Category" , // (4)
"anchor" : { // (5)
"typeName" : "AtlasGlossary" ,
"guid" : "b4113341-251b-4adc-81fb-2420501c30e6"
}
}
}
]
}
All assets must be wrapped in an entities
array.
You must provide the exact type name for the asset (case-sensitive). For a category, this is AtlasGlossaryCategory
.
You must provide the exact name of the asset (case-sensitive).
You must provide a qualifiedName
of the asset (case-sensitive). In the case of categories, this will actually be replaced in the back-end with a generated qualifiedName
, but you must provide some value when creating the object.
You must also specify the parent glossary in which the category should be created. This must be placed in an anchor
property, which itself has an embedded typeName
(of AtlasGlossary
) and the GUID of the glossary.
Create a term
2.0.0
1.0.0
To create a term:
Java
Python
Kotlin Raw REST API
Create a term GlossaryTerm term = GlossaryTerm
. creator ( "Example Term" , // (1)
"b4113341-251b-4adc-81fb-2420501c30e6" ) // (2)
. build (); // (3)
AssetMutationResponse response = term . save (); // (4)
You must provide a name for the new term.
You must provide the ID of the glossary in which the term should be created (GUID or qualifiedName).
You then build the object (in-memory).
And finally you can save the term back to Atlan (and the result of that save is returned).
Create a term from pyatlan.client.atlan import AtlanClient
from pyatlan.model.assets import AtlasGlossaryTerm
client = AtlanClient ()
term = AtlasGlossaryTerm . creator (
name = "Example Term" , # (1)
glossary_guid = "b4113341-251b-4adc-81fb-2420501c30e6" # (2)
)
response = client . asset . save ( term ) # (3)
You must provide a name for the new term.
You must provide the ID of the glossary (GUID) in which the term should be created.
And finally you can save the term back to Atlan (and the result of that save is returned).
Create a term val term = GlossaryTerm
. creator ( "Example Term" , // (1)
"b4113341-251b-4adc-81fb-2420501c30e6" ) // (2)
. build () // (3)
val response = term . save () // (4)
You must provide a name for the new term.
You must provide the ID of the glossary in which the term should be created (GUID or qualifiedName).
You then build the object (in-memory).
And finally you can save the term back to Atlan (and the result of that save is returned).
POST /api/meta/entity/bulk 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 {
"entities" : [ // (1)
{
"typeName" : "AtlasGlossaryTerm" , // (2)
"attributes" : {
"name" : "Example Term" , // (3)
"qualifiedName" : "Example Term" , // (4)
"anchor" : { // (5)
"typeName" : "AtlasGlossary" ,
"guid" : "b4113341-251b-4adc-81fb-2420501c30e6"
}
}
}
]
}
All assets must be wrapped in an entities
array.
You must provide the exact type name for the asset (case-sensitive). For a term, this is AtlasGlossaryTerm
.
You must provide the exact name of the asset (case-sensitive).
You must provide a qualifiedName
of the asset (case-sensitive). In the case of terms, this will actually be replaced in the back-end with a generated qualifiedName
, but you must provide some value when creating the object.
You must also specify the parent glossary in which the term should be created. This must be placed in an anchor
property, which itself has an embedded typeName
(of AtlasGlossary
) and the GUID of the glossary.