Package com.cumulocity.sdk.client.audit
Interface AuditRecordApi
-
- All Known Implementing Classes:
AuditRecordApiImpl
public interface AuditRecordApiAPI for creating and retrieving audit records from the platform
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AuditRecordRepresentationcreate(AuditRecordRepresentation auditRecord)Creates an audit record in the platform.AuditRecordRepresentationgetAuditRecord(GId gid)Gets an audit record by idAuditRecordCollectiongetAuditRecords()Gets all audit records from the platformAuditRecordCollectiongetAuditRecordsByFilter(AuditRecordFilter filter)Gets audit records from the platform based on the specified filter
-
-
-
Method Detail
-
getAuditRecord
AuditRecordRepresentation getAuditRecord(GId gid) throws SDKException
Gets an audit record by id- Parameters:
gid- id of the audit record to search for- Returns:
- the audit record with the given id
- Throws:
SDKException- if the audit record is not found
-
create
AuditRecordRepresentation create(AuditRecordRepresentation auditRecord) throws SDKException
Creates an audit record in the platform. The id of the audit record must not be set, since it will be generated by the platform- Parameters:
auditRecord- the audit record to be created- Returns:
- the created audit record with the generated id
- Throws:
SDKException- if the audit record could not be generated
-
getAuditRecords
AuditRecordCollection getAuditRecords() throws SDKException
Gets all audit records from the platform- Returns:
- collection of audit records with paging functionality
- Throws:
SDKException- if the query failed
-
getAuditRecordsByFilter
AuditRecordCollection getAuditRecordsByFilter(AuditRecordFilter filter) throws SDKException
Gets audit records from the platform based on the specified filter- Parameters:
filter- the filter criteria(s)- Returns:
- collection of audit records matched by the filter with paging functionality
- Throws:
SDKException- if the query failed
-
-