Cumulocity Web SDK - v1023.47.3
    Preparing search index...

    Class FeatureService

    This class allows reading a feature toggles for current tenant.

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Retrieve a specific feature toggle with value for current tenant.

      Example


      (async () => {
      const featureToggleKey = 'my-custom-feature';
      const {data, res} = await featureService.detail(featureToggleKey);
      })();

      Parameters

      • key: string

      Returns Promise<IResult<IFeatureToggle>>

    • Retrieve the feature toggle state for the provided key grouped by tenant.

      Example


      (async () => {
      const featureToggleKey = 'my-custom-feature';
      const {data, res} = await featureService.detailByTenant(featureToggleKey);
      })();

      Parameters

      Returns Promise<IResultList<{ active: boolean; tenantId: string }>>

    • Removes the feature toggle override for current tenant.

      Removal of the override will cause the tenant to use the feature toggle value based on the phase of the feature toggle.

      Example

       (async () => {
      const featureToggleKey = 'my-custom-feature';
      const {data, res} = await featureService.removeTenantOverride({
      key: featureToggleKey,
      active: true,
      });

      Parameters

      Returns Promise<IResult<IFeatureToggle>>

    • Removes the feature toggle override for the provided tenant.

      Removal of the override will cause the tenant to use the feature toggle value based on the phase of the feature toggle.

      Example

       (async () => {
      const featureToggleKey = 'my-custom-feature';
      const {data, res} = await featureService.removeTenantOverrideByTenant({
      key: featureToggleKey,
      active: true,
      }, 't123456');

      Parameters

      Returns Promise<IResult<IFeatureToggle>>