# JAVA Client for AuditRecords not working

**URL:** https://community.cumulocity.com/t/java-client-for-auditrecords-not-working/4357
**Category:** Forum
**Tags:** cumulocity
**Created:** [November 6, 2020, 2:33pm UTC](https://community.cumulocity.com/t/java-client-for-auditrecords-not-working/4357 "2020-11-06T14:33:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![florian.gopp](https://avatars.discourse-cdn.com/v4/letter/f/d78d45/32.png) [@florian.gopp](https://community.cumulocity.com/u/florian.gopp)
#### Post date: [November 6, 2020, 2:33pm UTC](https://community.cumulocity.com/t/java-client-for-auditrecords-not-working/4357/1 "2020-11-06T14:33:37Z")

</div>

Hi Guys,

seems like the JAVA Client for the AuditRecords API is not working. When I try to get a page I always get an empty page. It doesn’t matter if I use the getAuditRecordsByFilter() or getAuditRecords() method. Both return an empty result set. When I query the API using Postman I get a lot of entries on the same tenant!

When I try to fetch only one AuditRecord using the GId I get an API error:

```auto
{
    "Name": "com.cumulocity.sdk.client.SDKException",
    "Message": "Http status code: 500\n{error=\"general/internalError\",message=\"Failed to evaluate expression 'hasRole('ROLE_AUDIT_READ') or hasDevicePermission(this.auditManagementService.findById(this.id), 'AUDIT', 'READ')' : EL1008E:(pos 30): Property or field 'id' cannot be found on object of type 'com.cumulocity.audit.rest.resource.AuditRecordResource' - maybe not public?\",info=\"https://www.cumulocity.com/guides/reference-guide/#error_reporting\",details=\"null\"}",
    "StackTrace": [
        "com.cumulocity.sdk.client.ResponseParser.checkStatus(ResponseParser.java:74)",
        "com.cumulocity.sdk.client.ResponseParser.parse(ResponseParser.java:56)",
        "com.cumulocity.sdk.client.RestConnector.get(RestConnector.java:127)",
...
    ]
}

```

Same request using Postman works as well. Can anyone confirm that bug?

---

<div class="post-metadata">

### Author: ![Gyan\_Awasthi1](https://avatars.discourse-cdn.com/v4/letter/g/eada6e/32.png) [@Gyan\_Awasthi1](https://community.cumulocity.com/u/Gyan_Awasthi1)
#### Post date: [December 17, 2020, 10:20am UTC](https://community.cumulocity.com/t/java-client-for-auditrecords-not-working/4357/2 "2020-12-17T10:20:25Z")

</div>

@florian.gopp are you still getting this error? If yes, can you share your tenant details?

---

<div class="post-metadata">

### Author: ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)
#### Post date: [April 2, 2021, 3:45pm UTC](https://community.cumulocity.com/t/java-client-for-auditrecords-not-working/4357/3 "2021-04-02T15:45:22Z")

</div>


