Skip to content

sugarcrm/ventana

Repository files navigation

Ventana Build Status Coverage Status Sauce Test Status

Ventana is a client to help connecting and making requests to a SugarCRM REST API on multiple versions.

Currently this library provides a JavaScript connector.

Alternatively, a PHP connector is available here.

Please contribute to help us grow this client connector.

Sauce Test Status

Usage example

You just need to require the module and create an instance of the Api class:

    const Ventana = require('@sugarcrm/ventana');
    const SugarApi = Ventana.getInstance({
        serverUrl: app.config.serverUrl,
        platform: app.config.platform,
        timeout: app.config.serverTimeout,
        clientID: app.config.clientID,
    });

    // Fetch the app metadata
    SugarApi.getMetadata();

    // Fetch `Accounts` records
    SugarApi.records('read', 'Accounts');

    // Favorite a specific contact
    SugarApi.favorite('Contacts', <recordId>, true);

You can find the full documentation here.

Contributing

See Contributing guidelines.