Optional
realtime: RealtimeCreates a new operation.
Operation object with mandantory fragments.
Response wrapped in [[IResult]]
Example
const mandantoryObject: Partial<IOperationBulk> = {
creationRamp: 15,
groupId: '149044',
operationPrototype: {
c8y_Restart: {},
description: 'Restart device',
deviceId: device.id,
status: 'PENDING'
},
startDate: '2018-02-15T16:01:00.000Z'
};
(async () => {
const {data, res} = await operationBulkService.create(mandantoryObject);
})();
Removes an bulk operation with given id.
Operation object or id.
Example
const id: number = 1;
(async () => {
const {data, res} = await operationBulkService.delete(id);
})();
Response wrapped in [[IResult]]
Gets the details of selected bulk operation.
Response wrapped in [[IResult]]
Example
const bulkOperationId: number = 1;
(async () => {
const {data, res} = await operationBulkService.detail(bulkOperationId);
})();
Gets the list of bulk operations filtered by parameters.
Object containing filters for querying alarms.
Example
const filter: object = {
pageSize: 100,
withTotalPages: true
};
(async () => {
const {data, res, paging} = await operationBulkService.list(filter);
})();
Response wrapped in [[IResultList]]
Updates a new operation.
Response wrapped in [[IResult]]
Example
const updateObject: Partial<IOperationBulk> = {
creationRamp: 15,
groupId: '149044',
operationPrototype: {
c8y_Restart: {},
description: 'Restart device',
deviceId: device.id,
status: 'PENDING'
},
startDate: '2018-02-15T16:01:00.000Z'
};
(async () => {
const {data, res} = await operationBulkService.update(updateObject);
})();
This class allows for managing bulk operations.