Cumulocity Web SDK - v1021.62.8
    Preparing search index...

    Class AuditService

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Creates a new audit record for a given source.

      Parameters

      • entity: IAuditRecord

        Audit record object with mandantory fragments. IAuditRecord implements the [[IEvent]] interface.

      Returns Promise<IResult<IAuditRecord>>

      Response wrapped in [[IResult]]

      Example


      const mandantoryObject: IAuditRecord = {
      type: AuditRecordType.ALARM,
      time: '2018-05-02T10:08:00Z',
      severity: Severity.MAJOR,
      source: {id: 1}
      };

      (async () => {
      const {data, res} = await auditService.create(mandantoryObject);
      })();
    • Gets the list of audit records filtered by parameters.

      Parameters

      • filter: object = {}

        Object containing filters for querying audit records.

        Example


        const filter: object = {
        severity: Severity.MAJOR,
        pageSize: 100,
        withTotalPages: true
        };

        (async () => {
        const {data, res, paging} = await auditService.list(filter);
        })();

      Returns Promise<IResultList<IAuditRecord>>

      Response wrapped in [[IResultList]]