[ 
https://issues.apache.org/jira/browse/ATLAS-1728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15962673#comment-15962673
 ] 

Sharmadha Sainath edited comment on ATLAS-1728 at 4/10/17 10:03 AM:
--------------------------------------------------------------------

[~sababaig] 

Created type by POSTing following JSON to api/atlas/v2/types/typedefs

{code}
{
   "structDefs":[

   ],
   "entityDefs":[
      {
         "description":"description",
         "category":"ENTITY",
         "name":"delete_type",
         "updateTime":12345,
         "typeVersion":"0.1",
         "attributeDefs":[
           {
               "name":"name",
               "isOptional":false,
               "isUnique":true,
               "isIndexable":false,
               "typeName":"string",
               "valuesMaxCount":1,
               "cardinality":"SINGLE",
               "valuesMinCount":0
           }
],
         "version":12345,
"guid":"0975fubdbiuudubnjbi89jbksi909jnd",
"createTime":12345
      }
   ],
   "classificationDefs":[

   ],
   "enumDefs":[

   ]
}
{code}

Deleted the type by sending the same JSON to same API.

Reference : 
http://atlas.incubator.apache.org/api/v2/resource_TypesREST.html#resource_TypesREST_deleteAtlasTypeDefs_DELETE


was (Author: ssainath):
[~sababaig] 

Created type by POSTing following JSON to api/atlas/v2/types/typedefs

{code}
{
   "structDefs":[

   ],
   "entityDefs":[
      {
         "description":"description",
         "category":"ENTITY",
         "name":"delete_type",
         "updateTime":12345,
         "typeVersion":"0.1",
         "attributeDefs":[
           {
               "name":"name",
               "isOptional":false,
               "isUnique":true,
               "isIndexable":false,
               "typeName":"string",
               "valuesMaxCount":1,
               "cardinality":"SINGLE",
               "valuesMinCount":0
           }
],
         "version":12345,
"guid":"0975fubdbiuudubnjbi89jbksi909jnd",
"createTime":12345
      }
   ],
   "classificationDefs":[

   ],
   "enumDefs":[

   ]
}
{code}

Deleted the type by POSTing the same JSON to same API.

Reference : 
http://atlas.incubator.apache.org/api/v2/resource_TypesREST.html#resource_TypesREST_deleteAtlasTypeDefs_DELETE

> Type deletion is allowed even when instance of the type exists.
> ---------------------------------------------------------------
>
>                 Key: ATLAS-1728
>                 URL: https://issues.apache.org/jira/browse/ATLAS-1728
>             Project: Atlas
>          Issue Type: Bug
>          Components:  atlas-core
>    Affects Versions: 0.8-incubating, 0.9-incubating
>            Reporter: Sharmadha Sainath
>
> 1.Created a type 
> 2.Created instance of the type. 
> 3.Deleted the type - Succeeded with 204
> 4.The instance still exists after deletion with ACTIVE status . The entity 
> definition has only the attributes removed and able to search and find the 
> entity using Basic search
> Entity def of entity of deleted type :
> {code}
> {  
>    referredEntities:{  
>    },
>    entity:{  
>       typeName:"deltype",
>       guid:"cfc08f54-6d4b-4e46-800b-2cecd0b68140",
>       status:"ACTIVE",
>       createdBy:"admin",
>       updatedBy:"admin",
>       createTime:1491816571151,
>       updateTime:1491816571151,
>       version:0,
>       classifications:[  
>       ]
>    }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to