- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
API request to make a child tag/classification
- Labels:
-
Apache Atlas
Created ‎01-24-2018 03:48 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There's documentation for creating a child/parent relationship for classifications in the UI. What would be the equivalent script for creating the same relationship in the API?
Let's say I have a parent classification named 'security_protection'. I want to create child classifications via API request named 'disk_encryption' and field_encryption'. What would be the v2 API request to do this?
Thanks in advance.
Version 2.6.3
Created ‎02-07-2018 11:38 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your patience. Attached is a sample from one of the internal environments. The attached zip (tag0.zip) has 2 files:
- tag0.json: Top-level tag containing 1000+ sub-types.
- tag0_207.json: One of the child tags that do not have sub-types, but has tag0 as parent.
You can use entity creation APIs to add these types to the Atlas server.
Bulk APIs can be used to add multiple type definitions at the same time. Note that the bulk APIs takes AtlasTypesDef as input, ensure that the posted JSON is in that format.
curl -X POST -u admin:admin -H 'Content-Type: application/json' -d @tags.json http://localhost:21000/api/atlas/v2/types/typedefs
Hope this helps.
Created ‎02-07-2018 11:38 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your patience. Attached is a sample from one of the internal environments. The attached zip (tag0.zip) has 2 files:
- tag0.json: Top-level tag containing 1000+ sub-types.
- tag0_207.json: One of the child tags that do not have sub-types, but has tag0 as parent.
You can use entity creation APIs to add these types to the Atlas server.
Bulk APIs can be used to add multiple type definitions at the same time. Note that the bulk APIs takes AtlasTypesDef as input, ensure that the posted JSON is in that format.
curl -X POST -u admin:admin -H 'Content-Type: application/json' -d @tags.json http://localhost:21000/api/atlas/v2/types/typedefs
Hope this helps.
Created ‎02-19-2018 01:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Once you have the super tag "security_protection"created , following can be POSTed to API to create Types REST v2 API sub classifications. Note that the superTypes list contains the security_protection classification.
http://localhost:21000/api/atlas/v2/types/typedefs?type=classification
{ "classificationDefs":[ { "name":"disk_encryption", "description":"", "superTypes":["security_protection" ], "attributeDefs":[] }, { "name":"field_encryption", "description":"", "superTypes":["security_protection" ], "attributeDefs":[] } ] }
