Tutorial: System.registerUsage

System.registerUsage

(Internal use) Manually registers the component application of workspace being used with the licensing service.

Example

Below is an example of the data values that gets sent.

async function registerUsage() {
    const app = await fin.System.getCurrent();
    return await fin.System.registerUsage({
        type: 'workspace-licensing',
        // example values for the following data object
        data: {
            apiVersion: '1.0',
            componentName: 'home',
            componentVersion: '1.0',
            allowed: true,
            rejectionCode: ''
        }
    });
}

registerUsage().then(() => console.log('Successfully registered component application')).catch(err => console.log(err));