Cumulocity Web SDK - v1021.62.8
    Preparing search index...

    Class SmartRulesService

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Deactivates smart rule for given entities list.

      Parameters

      • rule: Partial<IRule>

        Smart rule managed object.

      • entitiesOrIdsList: IdReference[]

        List of entities or Id of the ManagedObjects.

      Returns Promise<IResult<IRule>>

      Response wrapped in [[IResult]]

      Example


      const rule: IRule = {id: '1', enabledSources: ['2', '3'],...};
      const entityOrIdList: IdReference[] = ['2'];
      (async () => {
      const {data, res} = await smartRulesService.bulkDeactivateEnabledSources(rule, entityOrIdList);
      })();
    • Checks if the smart rules microservice is subscribed and available to user.

      Example


      (async () => {
      const isAvailable = await smartRulesService.isMicroserviceAvailable();
      })();

      Returns Promise<boolean>