API Rest Log

Development Status
Stable
Active Installs
Maintainers
Baixa

Last updated: 2024-09-03

Works with CiviCRM 5.69 or higher.

API REST Log

API REST Log maintains a log of API calls made through the REST interface. This is useful if you have a external service which interfaces with CiviCRM through REST, and you would like an audit trail for the actions which the service performs.

This extension was originally developed by Sean Madsen under the name of com.leftjoinlabs.restlog and now maintained under his agreement by iXiam Global Solutions. Thanks Sean for your work!!

Features

  • Log calls to a file and to a database table.
  • View and filter the logged API calls through an interface within CiviCRM.

Demo

Usage

  1. When enabled, this extension will immediately begin logging REST API calls to both a file and a database table.
  2. To change te extensions settings, go to Administer > System Settings > API REST Log Settings (or civicrm/admin/setting/apirestlog?reset=1).
  3. To view the DB log entries, go to Administer > Administer Console > API REST Log (or /civicrm/a/#/apirestlog).
  4. Also find log entries in a file called CiviCRM.APIRest.*.log alongside your CiviCRM log file. (e.g. in Drupal installations this is in: sites/default/files/civicrm/ConfigAndLog).

Features

  • Either DB and/or File log can be dis/enabled in API REST Log Settings page.
  • DB Max entries and limit days can be defined in Settings as well, and it will cleanup the MySQL log table when CiviCRM's Scheduled Job Clean-up Temporary Data and Files is executed.
  • Log File CiviCRM.APIRest.*.log implements same rotation policy as regular CiviCRM log file