[ https://issues.apache.org/jira/browse/ATLAS-543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shwetha G S updated ATLAS-543: ------------------------------ Assignee: Harish Jaiprakash > Entity Instance requests should not require ID element for new Entities > ----------------------------------------------------------------------- > > Key: ATLAS-543 > URL: https://issues.apache.org/jira/browse/ATLAS-543 > Project: Atlas > Issue Type: Bug > Affects Versions: 0.6-incubating > Environment: Ubuntu 14, OpenJDK 64-Bit 1.7.0_95 > Reporter: Joseph Niemiec > Assignee: Harish Jaiprakash > Priority: Minor > > When utilizing the REST API to create an 'new' Entity Instance of a given > Type all ID elements for the class and structs are required, requests without > these elements will fail despite the fact a random GUID will be assigned at > instance time. > ##### > Example 1 (Good Entity Posts correctly) > ##### > { > "jsonClass": > "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference", > "id": { > "jsonClass": > "org.apache.atlas.typesystem.json.InstanceSerialization$_Id", > "id": "-984848", > "version": 0, > "typeName": "HDFS_RESOURCE" > }, > "typeName": "HDFS_RESOURCE", > "values": { > "name": "Cluser_A_DevFolder_A", > "description": "Fully Public Dev Folder", > "resource": { > "jsonClass": > "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference", > "id": { > "jsonClass": > "org.apache.atlas.typesystem.json.InstanceSerialization$_Id", > "id": "-2630837415522", > "version": 0, > "typeName": "HDFS_OBJECT" > }, > "typeName": "HDFS_OBJECT", > "values": { > "uri": "/user/dev/a", > "isDir" : true > }, > "traitNames": [], > "traits": {} > } > }, > "traitNames": ["Public"], > "traits": { > "Public": { > "jsonClass": > "org.apache.atlas.typesystem.json.InstanceSerialization$_Struct", > "typeName": "Public", > "values": { } > } > } > } > #### > Example #2 Bad Entity that fails. > #### > { > "jsonClass": > "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference", > "typeName": "HDFS_RESOURCE", > "values": { > "name": "Cluser_A_DevFolder_A", > "description": "Fully Public Dev Folder", > "resource": { > "jsonClass": > "org.apache.atlas.typesystem.json.InstanceSerialization$_Reference", > "typeName": "HDFS_OBJECT", > "values": { > "uri": "/user/dev/a", > "isDir" : true > }, > "traitNames": [], > "traits": {} > } > }, > "traitNames": ["Public"], > "traits": { > "Public": { > "jsonClass": > "org.apache.atlas.typesystem.json.InstanceSerialization$_Struct", > "typeName": "Public", > "values": { } > } > } > } -- This message was sent by Atlassian JIRA (v6.3.4#6332)