Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SmartGroupsService

Hierarchy

Index

Constructors

constructor

Methods

create

  • Parameters

    Returns Promise<IResult<IManagedObject>>

    Response wrapped in IResult

    Example

    
       const smartGroup = { name: 'newName', type: 'c8y_DynamicGroup', c8y_IsDynamicGroup: {} };
       const deviceQueryString = 'c8y_DeviceQueryString: "$filter=(name eq 'test*') $orderby=c8y_Hardware.model asc';
       const configurableColumns = [
           {headerName: 'Status', active: false, key: 'status'},
           {headerName: 'Name', active: true, key: 'name', filter: { externalFilterQuery: { name: { names: ['test*'] } } }},
           {headerName: 'Model', active: true, key: 'model'}
       ];
    
       (async () => {
         await smartGroupsService.create({ smartGroup, deviceQueryString, configurableColumns });
      })();
    
       Note: filterConfig has been removed as a default property to the input object.
       Now it is part of the configurable columns properties as it is shown above.
       You can still pass it as an optional parameter.
       ( const filterConfig = [{ name: { names: ['test*'] } }] )
    

delete

  • Parameters

    • entityOrId: IdReference
    • Default value params: any = {}

    Returns Promise<IResult<null>>

    Response wrapped in IResult

detail

isSmartGroup

  • Parameters

    Returns boolean

    boolean

isSmartGroupV2

  • Parameters

    Returns boolean

    boolean

isSmartGroupsV2MicroserviceInstalled

  • isSmartGroupsV2MicroserviceInstalled(): Promise<IResult<boolean>>
  • Returns Promise<IResult<boolean>>

    Response wrapped in IResult

list

removeSmartGroupV2

  • Parameters

    Returns Promise<IResult<null>>

    Response wrapped in IResult

update

updateSmartGroupV2

Generated using TypeDoc