Optional
realtime: RealtimeCreates a new operation.
Operation object with mandantory fragments.
Response wrapped in [[IResult]]
Example
const mandantoryObject: IOperation = {
com_cumulocity_model_WebCamDevice: {
name: 'take picture',
parameters: {
duration: '5s',
quality: 'HD'
}
},
deviceId: device.id,
};
(async () => {
const {data, res} = await operationService.create(mandantoryObject);
})();
Gets the details of selected operation.
Entity or Id of the entitytabs.service.ts.
Response wrapped in [[IResult]]
Example
const operationId: number = 1;
(async () => {
const {data, res} = await operationService.detail(operationId);
})();
Gets the list of operations filtered by parameters.
Object containing filters for querying operations.
Example
const filter: object = {
pageSize: 100,
withTotalPages: true
};
(async () => {
const {data, res, paging} = await operationService.list(filter);
})();
Response wrapped in [[IResultList]]
Updates operation data.
Operation is partially updatable.
Response wrapped in [[IResult]]
Example
const partialUpdateObject: Partial<IOperation> = {
com_cumulocity_model_WebCamDevice: {
name: 'take picture',
parameters: {
duration: '2s',
quality: 'HD',
ratio: '16:9'
}
},
deviceId: device.id,
};
(async () => {
const {data, res} = await operationService.update(partialUpdateObject);
})();
This class allows for managing operations on a device.