{"swagger":"2.0","info":{"description":"An app that manages audit and metrics","version":"1.0.0","title":"Analytics App API","contact":{"email":"hunnithan@desknetinc.com"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"paths":{"/audit":{"post":{"summary":"Audit Insert","description":"Inserts audit data into the datastore\n","produces":["application/json"],"parameters":[{"name":"data","in":"body","description":"creates a new audit entity in the datastore","schema":{"$ref":"#/definitions/AuditEntity"}}],"tags":["Audit"],"responses":{"200":{"description":"Insertion to data store was successful","schema":{"type":"object"}},"400":{"description":"Failed to insert data due to bad request"},"500":{"description":"Failed to insert data due to internal error"}}}},"/audit/get":{"post":{"summary":"Get audit changes","description":"Get all the data from the data store\n","produces":["application/json"],"parameters":[{"name":"auditQuery","in":"body","description":"Conditions on which data is to be retrieved from datastore.","schema":{"$ref":"#/definitions/AuditQuery"}}],"tags":["Audit"],"responses":{"200":{"description":"Insertion to data store was successful","schema":{"type":"array","items":{"$ref":"#/definitions/AuditEntity"}}},"400":{"description":"Failed to insert data due to bad request"},"500":{"description":"Failed to insert data due to internal error"}}}}},"definitions":{"AuditEntity":{"type":"object","required":["clientId","env","userId","itemId","changedData","timeStamp"],"properties":{"clientId":{"type":"string","example":"hunnithan"},"env":{"type":"string","example":"dev"},"userId":{"type":"string","example":"PRELOGON"},"itemId":{"type":"integer","example":895},"changedData":{"type":"string","example":"changedby : hima"},"timeStamp":{"type":"integer","format":"int64","example":1484255750293}}},"AuditQuery":{"type":"object","required":["clientId","env","filterBy","id","pageSize","start","end","pagingOffset"],"properties":{"filterBy":{"type":"string","example":"user"},"id":{"type":"string","example":"PRELOGON"},"pageSize":{"type":"integer","example":50000},"start":{"type":"string","format":"yyyy-MM-dd'T'HH:mm:ss.SSSZ","example":"1900-01-01T08:08:56.235-0530"},"end":{"type":"string","format":"yyyy-MM-dd'T'HH:mm:ss.SSSZ","example":"2020-12-01T08:08:56.235-0530"},"pagingOffset":{"type":"string","example":0},"clientId":{"type":"string","example":"hunnithan"},"env":{"type":"string","example":"dev"}}}},"host":"virtserver.swaggerhub.com","basePath":"/himapratap/AAP/1.0.0","schemes":["https"]}