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

Shwetha G S commented on ATLAS-847:
-----------------------------------

bq. For pagination it requires total number of records. How do I get that ?
The API doesn't return total number of records currently. Make an API call to 
check if there are any remaining records
bq. Regarding usage of "startKey" the output remain same when I tried 
startKey=any number
For the first page, don't set startKey. For the second page, startKey should be 
equal to the startKey specified in the last record of the previous call(made 
for first page)
bq. the api do not returns audit data in json
Here is the json response from audit API
{noformat}
{  
   "requestId":"qtp966396367-171 - a8c0fada-9c4b-4616-84b2-bccdf90ca54d",
   "events":[  
      {  
         "entityId":"c402c96b-72d8-4d6b-ad15-101b38870140",
         "timestamp":1466764733583,
         "user":"admin",
         "action":"TAG_ADD",
         "details":"Added trait: {\n  
\"jsonClass\":\"org.apache.atlas.typesystem.json.InstanceSerialization$_Struct\",\n
  \"typeName\":\"tag1\",\n  \"values\":{\n    \n  }\n}",
         "eventKey":"c402c96b-72d8-4d6b-ad15-101b38870140:1466764733583",
         "entityDefinition":{  
            
"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
            "id":{  
               
"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
               "id":"c402c96b-72d8-4d6b-ad15-101b38870140",
               "version":0,
               "typeName":"hive_column",
               "state":"ACTIVE"
            },
            "typeName":"hive_column",
            "values":{  
               "name":"id",
               "qualifiedName":"default.t1.id@primary",
               "owner":"sshivalingamurthy",
               "type":"string",
               "table":{  
                  
"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
                  "id":"cebdf4a6-838c-45d7-b166-302c0e4c6c48",
                  "version":0,
                  "typeName":"hive_table",
                  "state":"ACTIVE"
               }
            },
            "traitNames":[  
               "tag1"
            ],
            "traits":{  
               "tag1":{  
                  
"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Struct",
                  "typeName":"tag1",
                  "values":{  

                  }
               }
            }
         }
      },
      {  
         "entityId":"c402c96b-72d8-4d6b-ad15-101b38870140",
         "timestamp":1466764387184,
         "user":"sshivalingamurthy",
         "action":"ENTITY_UPDATE",
         "details":"Updated: {\n  
\"jsonClass\":\"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference\",\n
  \"id\":{\n    
\"jsonClass\":\"org.apache.atlas.typesystem.json.InstanceSerialization$_Id\",\n 
   \"id\":\"c402c96b-72d8-4d6b-ad15-101b38870140\",\n    \"version\":0,\n    
\"typeName\":\"hive_column\",\n    \"state\":\"ACTIVE\"\n  },\n  
\"typeName\":\"hive_column\",\n  \"values\":{\n    \"name\":\"id\",\n    
\"description\":null,\n    \"qualifiedName\":\"default.t1.id@primary\",\n    
\"comment\":null,\n    \"owner\":\"sshivalingamurthy\",\n    
\"type\":\"string\",\n    \"table\":{\n      
\"jsonClass\":\"org.apache.atlas.typesystem.json.InstanceSerialization$_Id\",\n 
     \"id\":\"cebdf4a6-838c-45d7-b166-302c0e4c6c48\",\n      \"version\":0,\n   
   \"typeName\":\"hive_table\",\n      \"state\":\"ACTIVE\"\n    }\n  },\n  
\"traitNames\":[\n    \n  ],\n  \"traits\":{\n    \n  }\n}",
         "eventKey":"c402c96b-72d8-4d6b-ad15-101b38870140:1466764387184",
         "entityDefinition":{  
            
"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
            "id":{  
               
"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
               "id":"c402c96b-72d8-4d6b-ad15-101b38870140",
               "version":0,
               "typeName":"hive_column",
               "state":"ACTIVE"
            },
            "typeName":"hive_column",
            "values":{  
               "name":"id",
               "qualifiedName":"default.t1.id@primary",
               "owner":"sshivalingamurthy",
               "type":"string",
               "table":{  
                  
"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
                  "id":"cebdf4a6-838c-45d7-b166-302c0e4c6c48",
                  "version":0,
                  "typeName":"hive_table",
                  "state":"ACTIVE"
               }
            },
            "traitNames":[  

            ],
            "traits":{  

            }
         }
      },
      {  
         "entityId":"c402c96b-72d8-4d6b-ad15-101b38870140",
         "timestamp":1466764385464,
         "user":"sshivalingamurthy",
         "action":"ENTITY_UPDATE",
         "details":"Updated: {\n  
\"jsonClass\":\"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference\",\n
  \"id\":{\n    
\"jsonClass\":\"org.apache.atlas.typesystem.json.InstanceSerialization$_Id\",\n 
   \"id\":\"c402c96b-72d8-4d6b-ad15-101b38870140\",\n    \"version\":0,\n    
\"typeName\":\"hive_column\",\n    \"state\":\"ACTIVE\"\n  },\n  
\"typeName\":\"hive_column\",\n  \"values\":{\n    \"name\":\"id\",\n    
\"description\":null,\n    \"qualifiedName\":\"default.t1.id@primary\",\n    
\"comment\":null,\n    \"owner\":\"sshivalingamurthy\",\n    
\"type\":\"string\",\n    \"table\":{\n      
\"jsonClass\":\"org.apache.atlas.typesystem.json.InstanceSerialization$_Id\",\n 
     \"id\":\"cebdf4a6-838c-45d7-b166-302c0e4c6c48\",\n      \"version\":0,\n   
   \"typeName\":\"hive_table\",\n      \"state\":\"ACTIVE\"\n    }\n  },\n  
\"traitNames\":[\n    \n  ],\n  \"traits\":{\n    \n  }\n}",
         "eventKey":"c402c96b-72d8-4d6b-ad15-101b38870140:1466764385464",
         "entityDefinition":{  
            
"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
            "id":{  
               
"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
               "id":"c402c96b-72d8-4d6b-ad15-101b38870140",
               "version":0,
               "typeName":"hive_column",
               "state":"ACTIVE"
            },
            "typeName":"hive_column",
            "values":{  
               "name":"id",
               "qualifiedName":"default.t1.id@primary",
               "owner":"sshivalingamurthy",
               "type":"string",
               "table":{  
                  
"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
                  "id":"cebdf4a6-838c-45d7-b166-302c0e4c6c48",
                  "version":0,
                  "typeName":"hive_table",
                  "state":"ACTIVE"
               }
            },
            "traitNames":[  

            ],
            "traits":{  

            }
         }
      },
      {  
         "entityId":"c402c96b-72d8-4d6b-ad15-101b38870140",
         "timestamp":1466764352265,
         "user":"sshivalingamurthy",
         "action":"ENTITY_CREATE",
         "details":"Created: {\n  
\"jsonClass\":\"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference\",\n
  \"id\":{\n    
\"jsonClass\":\"org.apache.atlas.typesystem.json.InstanceSerialization$_Id\",\n 
   \"id\":\"c402c96b-72d8-4d6b-ad15-101b38870140\",\n    \"version\":0,\n    
\"typeName\":\"hive_column\",\n    \"state\":\"ACTIVE\"\n  },\n  
\"typeName\":\"hive_column\",\n  \"values\":{\n    \"name\":\"id\",\n    
\"description\":null,\n    \"qualifiedName\":\"default.t1.id@primary\",\n    
\"comment\":null,\n    \"owner\":\"sshivalingamurthy\",\n    
\"type\":\"string\",\n    \"table\":{\n      
\"jsonClass\":\"org.apache.atlas.typesystem.json.InstanceSerialization$_Id\",\n 
     \"id\":\"cebdf4a6-838c-45d7-b166-302c0e4c6c48\",\n      \"version\":0,\n   
   \"typeName\":\"hive_table\",\n      \"state\":\"ACTIVE\"\n    }\n  },\n  
\"traitNames\":[\n    \n  ],\n  \"traits\":{\n    \n  }\n}",
         "eventKey":"c402c96b-72d8-4d6b-ad15-101b38870140:1466764352265",
         "entityDefinition":{  
            
"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
            "id":{  
               
"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
               "id":"c402c96b-72d8-4d6b-ad15-101b38870140",
               "version":0,
               "typeName":"hive_column",
               "state":"ACTIVE"
            },
            "typeName":"hive_column",
            "values":{  
               "name":"id",
               "qualifiedName":"default.t1.id@primary",
               "owner":"sshivalingamurthy",
               "type":"string",
               "table":{  
                  
"jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
                  "id":"cebdf4a6-838c-45d7-b166-302c0e4c6c48",
                  "version":0,
                  "typeName":"hive_table",
                  "state":"ACTIVE"
               }
            },
            "traitNames":[  

            ],
            "traits":{  

            }
         }
      }
   ]
}
{noformat}


> UI: Audit versioning does not paginate details from Atlas server
> ----------------------------------------------------------------
>
>                 Key: ATLAS-847
>                 URL: https://issues.apache.org/jira/browse/ATLAS-847
>             Project: Atlas
>          Issue Type: Bug
>    Affects Versions: 0.7-incubating
>            Reporter: Hemanth Yamijala
>            Assignee: Kalyani Kashikar
>
> In ATLAS-664, the capability to view Audit events was added to the Atlas 
> admin UI. However, currently, the API call made only fetches the first 100 
> events (which is the default if no count is sent). In order to fetch the next 
> set of events, further API calls need to be made to the Audit API, by 
> providing additional parameters in the API. This JIRA is to track the 
> required changes in UI.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to