Optional
realtime: Realtimeentity or id of registration.
Example
const id = 'abc';
(async () => {
const {data, res} = await deviceRegistrationService.accept(id);
})();
Accepts the device registration for all registrations in pending acceptance.
Response wrapped in IResultList
Example
(async () => {
const {data, res} = await deviceRegistrationService.acceptAll();
})();
Bootstraps the device with given id.
entity or id of registration.
for details see IDeviceBootstrapOptions
Example
const id: 'abc';
const options: IDeviceBootstrapOptions = {
basicAuthToken: 'Basic dGVuYW50L3VzZXJuYW1lOnBhc3N3b3Jk',
basicAuth: {
user: 'username',
pass: 'password'
}
};
(async () => {
const {data, res} = await deviceRegistrationService.bootstrap(id, options);
})();
Creates a new device registration.
Response wrapped in IResult
Example
const mandantoryObject: IDeviceRegistrationCreate = {
id: 1,
};
(async () => {
const {data, res} = await deviceRegistrationService.create(mandantoryObject);
})();
Device registration object with mandantory fragments.
entity or id of the registration.
Example
const id = 'abc';
(async () => {
const {data, res} = await deviceRegistrationService.delete(id);
// data will be null
})();
Gets the details of device registration.
Response wrapped in IResult
Example
const entityId: number = 1;
(async () => {
const {data, res} = await deviceRegistrationService.detail(entityId);
})();
Entity or Id of the entity.
Gets limitation information for registering devices to the platform
Response wrapped in IResult
Example
(async () => {
const {data, res} = await deviceRegistrationService.limit();
})();
Object containing filters for querying registrations.
Example
const filter: object = {
pageSize: 100,
withTotalPages: true
};
(async () => {
const {data, res, paging} = await deviceRegistrationService.list(filter);
})();
This class allows registration of a new device.