Best way to log API calls that create records

Many of our records are created via an API call from an external source.  Is there a way I can log those calls so I can see what was sent in via the API versus what is in the record now.  I just want an irrefutable way to see what they are sending into the system.

I need to see all the data included in the POST.

  •  ~/custom/include/RestService.php ist an add-on file wich is called before the REST service functions are executed.

    Code of ~/api/rest.php:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    ob_start();
    chdir(dirname(__FILE__).'/../');
    define('ENTRY_POINT_TYPE', 'api');
    require('include/entryPoint.php');
    SugarAutoLoader::load('custom/include/RestService.php');
    $restServiceClass = SugarAutoLoader::customClass('RestService');
    global $service;
    $service = new $restServiceClass();
    $service->execute()
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    So you can add logging of incoming data to such a custom file without touching the core files.

    Harald Kuske
    Principal Solution Architect – Professional Services, EMEA
    hkuske@sugarcrm.com
    SugarCRM Deutschland GmbH

  • Oh I like this idea, might work better than the logic hook.

1 2