Why do I get guid -1 for hive assets when calling Atlas v2 API?

129 Views Asked by At

I get GUID=-1 for all hive assets when calling the Apache Atlas V2 API for some reason. Why could that be?

Notes:

  • The reason for the problem is probably simple, but I thought I should add it as question for others to find it as well.
  • I get guid:s of the types when calling /v2/types/typedefs.

Calling

https://omittedpath/atlas/api/atlas/v2/search/basic?excludeDeletedEntities=true&limit=10&offset=0&typeName=hive_table

I get the following:

{
   "queryType":"BASIC",
   "searchParameters":{
      "typeName":"hive_table",
      "excludeDeletedEntities":true,
      "includeClassificationAttributes":false,
      "includeSubTypes":true,
      "includeSubClassifications":true,
      "limit":10,
      "offset":0
   },
   "entities":[
      {
         "typeName":"hive_table",
         "attributes":{
            
         },
         "guid":"-1",
         "status":"ACTIVE",
         "displayText":"aaa1",
         "classificationNames":[
            
         ],
         "meaningNames":[
            
         ],
         "meanings":[
            
         ]
      },
      {
         "typeName":"hive_table",
         "attributes":{
            
         },
         "guid":"-1",
         "status":"ACTIVE",
         "displayText":"atlas_test_table_03",
         "classificationNames":[
            
         ],
         "meaningNames":[
            
         ],
         "meanings":[
            
         ]
      }
   ]
}
1

There are 1 best solutions below

0
On BEST ANSWER

When the user making the request was assigned the permission "admin", the "guid" attribute was assigned an actual value.

In other words: The observed behavior was a result of insufficient permissions.