Removes managed object with given id.
Response wrapped in IResult
const group = { id: '1' } as IManagedObject;
const params: any = {
withChildren: false
}
(async () => {
await smartGroupsService.delete(group, params);
})();
Additional query params.
Gets the details of managed object
Response wrapped in IResult
const id: string = '1';
const filter: any = { withChildren: false };
(async () => {
const {data, res} = await smartGroupsService.detail(id, filter);
})();
Entity or Id of the ManagedObject.
Filter object.
Checks whether a given managed object is a smart group
boolean
const mo: IManagedObject = {id: 1, type: "c8y_DeviceGroup", c8y_IsDeviceGroup: {}} as IManagedObject;
(() => {
const isSmartGroup = smartGroupsService.isSmartGroup(mo);
})();
Managed object to check.
Checks whether a given managed object is a smart group v2
boolean
const mo: IManagedObject = {id: 1, type: "c8y_DeviceGroup", c8y_IsDeviceGroup: {}} as IManagedObject;
(() => {
const isSmartGroup = smartGroupsService.isSmartGroupV2(mo);
})();
Managed object to check.
Checks if the smart groups v2 microservice is installed.
Response wrapped in IResult
(async () => {
const {data, res} = await smartGroupsService.isSmartGroupsV2MicroserviceInstalled();
})();
Removes smart group v2 managed object with given id.
Response wrapped in IResult
const id: string = '1';
(async () => {
await smartGroupsService.removeSmartGroupV2(id);
})();
entity or Id of the ManagedObject.
Updates smart group managed object with given id.
Response wrapped in IResult
const smartGroup = { id: '1', name: 'newName' };
(async () => {
await smartGroupsService.update(smartGroup);
})();
Partial managed object of the smart group.
Filter object.
Updates smart group v2 managed object with given id.
Response wrapped in IResult
const smartGroupV2 = { id: '1', name: 'newName' };
(async () => {
await smartGroupsService.updateSmartGroupV2(smartGroupV2);
})();
Partial managed object of the smart group v2.
Filter object.
Creates a smart group managed object with columns configuration.
Returns
Response wrapped in IResult
Example