/api/meta/entity/bulk (POST)
Manage App assets
Operations on App assets.
In general, these should be:
Created in top-down order (Connection, then Application, then ApplicationField)
Deleted in bottom-up order (ApplicationField, Application, then Connections)
Asset structure
Connection
6.0.0
4.0.0
An App connection requires a name
and qualifiedName
. For creation, specific settings are also required to distinguish it as an App connection rather than another type of connection. In addition, at least one of adminRoles
, adminGroups
, or adminUsers
must be provided.
Create an App connection String adminRoleGuid = client . getRoleCache (). getIdForName ( "$admin" ); //
Connection connection = Connection . creator ( //
"app-connection" , //
AtlanConnectorType . APP , //
List . of ( adminRoleGuid ), //
List . of ( "group2" ), //
List . of ( "jsmith" )) //
. build ();
AssetMutationResponse response = connection . save ( client ); //
String connectionQualifiedName = response . getCreatedAssets (). get ( 0 ). getQualifiedName (); //
Create an App connection 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 from pyatlan.client.atlan import AtlanClient
from pyatlan.model.assets import Connection , Application , Table , Schema
from pyatlan.model.enums import AtlanConnectorType
client = AtlanClient ()
admin_role_guid = client . role_cache . get_id_for_name ( "$admin" ) #
connection = Connection . creator ( #
name = "app-connection" , #
connector_type = AtlanConnectorType . APP , #
admin_roles = [ admin_role_guid ], #
admin_groups = [ "group2" ], #
admin_users = [ "jsmith" ] #
)
response = client . asset . save ( connection ) #
connection_qualified_name = response . assets_created ( asset_type = Connection )[ 0 ] . qualified_name #
Create an App connection val adminRoleGuid = client . roleCache . getIdForName ( "\ $ admin " ) //
val connection = Connection . creator ( //
"app-connection" , //
AtlanConnectorType . APP , //
listOf ( adminRoleGuid ), //
listOf ( "group2" ), //
listOf ( "jsmith" )) //
. build ()
val response = connection . save ( client ) //
val connectionQualifiedName = response . createdAssets [ 0 ] . qualifiedName //
POST /api/meta/entity/bulk 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 {
"entities" : [
{
"typeName" : "Connection" , //
"attributes" : {
"name" : "app-connection" , //
"connectorName" : "app" , //
"qualifiedName" : "default/app/123456789" , //
"category" : "APP" , //
"adminRoles" : [ //
"e7ae0295-c60a-469a-bd2c-fb903943aa02"
],
"adminGroups" : [ //
"group2"
],
"adminUsers" : [ //
"jsmith"
]
}
}
]
}
Access policies
Atlan creates the policies that grant access to a connection, including the ability to retrieve the connection and to create assets within it, asynchronously. It can take several seconds (even up to approximately 30 seconds) before these are in place after creating the connection.
You may therefore need to wait before you'll be able to create the assets below within the connection.
To confirm access, retrieve the connection after it has been created. The SDKs' retry loops will automatically retry until the connection can be successfully retrieved. At that point, your API token has permission to create the other assets.
Note: if you are reusing an existing connection rather than creating one via your API token, you must give your API token a persona that has access to that connection. Otherwise all attempts to create, read, update, or delete assets within that connection will fail due to a lack of permissions.
Application
2.6.1
4.0.0
An Application requires a name
and a qualifiedName
. For creation, you also need to specify the connectionQualifiedName
of the connection for the Application. You can also provide the appId
and applicationOwnedAssets
for the asset.
Create an Application 11
12
13
14
15
16
17
18
19 Application application = Application . creator ( //
"application" , //
connectionQualifiedName ,) //
. appId ( "1234" ) //
. applicationOwnedAssets ( List . of (
Table . refByQualifiedName ( "default/snowflake/123456789/DATABASE/SCHEMA/TABLE" ),
Schema . refByQualifiedName ( "default/snowflake/123456789/DATABASE/SCHEMA" ))) //
. build ();
AssetMutationResponse response = application . save ( client ); //
Create an Application 17
18
19
20
21
22
23
24
25
26
27 application = Application . creator ( #
name = "application" , #
connection_qualified_name = connection_qualified_name , #
)
application . app_id = "1234" , #
application . application_owned_assets = [
Table . ref_by_qualified_name ( "default/snowflake/123456789/DATABASE/SCHEMA/TABLE" ),
Schema . ref_by_qualified_name ( "default/snowflake/123456789/DATABASE/SCHEMA" )
] #
response = client . asset . save ( application ) #
application_qualified_name = response . assets_created ( asset_type = Application )[ 0 ] . qualified_name #
Create an Application 11
12
13
14
15
16
17
18
19 val application = Application . creator ( //
"application" , //
connectionQualifiedName ,) //
. appId ( "1234" ) //
. applicationOwnedAssets ( List . of (
Table . refByQualifiedName ( "default/snowflake/123456789/DATABASE/SCHEMA/TABLE" ),
Schema . refByQualifiedName ( "default/snowflake/123456789/DATABASE/SCHEMA" ))) //
. build ()
val response = application . save ( client ) //
POST /api/meta/entity/bulk 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 {
"entities" : [
{
"typeName" : "Application" , //
"attributes" : {
"name" : "application" , //
"qualifiedName" : "default/app/123456789/application" , //
"connectionQualifiedName" : "default/app/123456789" , //
"connectorName" : "app" , //
"appId" : "1234" , //
"applicationOwnedAssets" : [ //
{
"typeName" : "Table" , //
"uniqueAttributes" : { //
"qualifiedName" : "default/snowflake/123456789/DATABASE/SCHEMA/TABLE"
}
},
{
"typeName" : "Schema" ,
"uniqueAttributes" : {
"qualifiedName" : "default/snowflake/123456789/DATABASE/SCHEMA"
}
}
]
}
}
]
}
ApplicationField
4.2.0
4.2.4
An ApplicationField requires a name
and a qualifiedName
. For creation, you also need to specify the connectionQualifiedName
of the connection for the ApplicationField, and the applicationQualifiedName
of the field's ancestor. You can also provide the applicationFieldOwnedAssets
for the asset.
Create an ApplicationField ApplicationField applicationField = ApplicationField . creator ( //
"application-field" , //
application ) //
. applicationFieldOwnedAssets ( List . of (
Table . refByQualifiedName ( "default/snowflake/123456789/DATABASE/SCHEMA/TABLE" ),
Schema . refByQualifiedName ( "default/snowflake/123456789/DATABASE/SCHEMA" ))) //
. build ();
AssetMutationResponse response = applicationField . save ( client ); //
Create an ApplicationField 17
18
19
20
21
22
23
24
25 applicationField = ApplicationField . creator ( #
name = "application-field" , #
application_qualified_name = application_qualified_name , #
)
applicationField . application_field_owned_assets = [
Table . ref_by_qualified_name ( "default/snowflake/123456789/DATABASE/SCHEMA/TABLE" ),
Schema . ref_by_qualified_name ( "default/snowflake/123456789/DATABASE/SCHEMA" )
] #
response = client . asset . save ( applicationField ) #
Create an ApplicationField val applicationField = ApplicationField . creator ( //
"application-field" , //
application ) //
. applicationFieldOwnedAssets ( List . of (
Table . refByQualifiedName ( "default/snowflake/123456789/DATABASE/SCHEMA/TABLE" ),
Schema . refByQualifiedName ( "default/snowflake/123456789/DATABASE/SCHEMA" ))) //
. build ()
val response = applicationField . save ( client ) //
POST /api/meta/entity/bulk 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 {
"entities" : [
{
"typeName" : "ApplicationField" , //
"attributes" : {
"name" : "application-field" , //
"qualifiedName" : "default/app/123456789/application/field" , //
"connectionQualifiedName" : "default/app/123456789" , //
"connectorName" : "app" , //
"parentApplication" : { //
"typeName" : "Application" , //
"uniqueAttributes" : { //
"qualifiedName" : "default/app/123456789/application"
}
},
"applicationParentQualifiedName" : "default/app/123456789/application" , //
"applicationFieldOwnedAssets" : [ //
{
"typeName" : "Table" , //
"uniqueAttributes" : { //
"qualifiedName" : "default/snowflake/123456789/DATABASE/SCHEMA/TABLE"
}
},
{
"typeName" : "Schema" ,
"uniqueAttributes" : {
"qualifiedName" : "default/snowflake/123456789/DATABASE/SCHEMA"
}
}
]
}
}
]
}
Available relationships
Every level of the App structure is an Asset
, and can therefore be related to the following other assets.
AtlasGlossaryTerm
A glossary term provides meaning to an asset. The link terms to assets snippet provides more detail on setting this relationship.
Link
A link provides additional context to an asset, by providing a URL to additional information.
Readme
A README provides rich documentation for an asset. The add asset READMEs snippet provides more detail on setting this relationship.
Process
A process provides lineage information for an asset. An asset can be both an input and an output for one or more processes. The lineage snippets provide more detail on creating and working with lineage.
5 months ago 2024-11-14
2 weeks ago 2025-04-02