Skip to content

BundleService

Method LwM2M request Description
putAcl put /1028/{bundleId}/0
alias: /bundle/{bundleId}/acl
Write acls
getValues get /1028/{bundleId}/1
alias: /bundle/{bundleId}/values
Get bundle values
getDataLogPeriod get /1028/{bundleId}/2
alias: /bundle/{bundleId}/data-log-period
Get data log acquisition period
putDataLogPeriod put /1028/{bundleId}/2
alias: /bundle/{bundleId}/data-log-period
Write data-log acquisition period in configuration
getDataLogCryptoGroupId get /1028/{bundleId}/3
alias: /bundle/{bundleId}/data-log-crypto-group-id
Get data log encryption group id
putDataLogCryptoGroupId put /1028/{bundleId}/3
alias: /bundle/{bundleId}/data-log-crypto-group-id
Write data-log acquisition period in configuration
create post /1028/{bundleId}/65535
alias: /bundle/{bundleId}/create
Create a new bundle
getName get /1028/{bundleId}/4
alias: /bundle/{bundleId}/name
Read bundle name
putName put /1028/{bundleId}/4
alias: /bundle/{bundleId}/name
Write bundle name in configuration

putAcl

Minimal Tap Firmware version: 1.0

Write acls

Parameters

Name Type Description Notes
bundleId number (uint16) Group id
rights ReadWriteRights Rights

Returns

Nothing

Authorization

  • Configuration mode is required to perform this request.

Example

import { Tap } from "@iotize/tap";
import '@iotize/tap/ext/configurator';


const tap: Tap = ...;

await tap.configurator.setupConfigMode();

const bundleId = ...;
const rights = ...;
const response = await tap.service.bundle.putAcl(bundleId, rights);
const value = response.body();
console.log(`putAcl: ${value}`);

getValues

Minimal Tap Firmware version: 1.0

Get bundle values

Parameters

Name Type Description Notes
bundleId number (uint16) Bundle id

Returns

Uint8Array

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const bundleId = ...;
const response = await tap.service.bundle.getValues(bundleId);
const value = response.body();
console.log(`getValues: ${value}`);

getDataLogPeriod

Minimal Tap Firmware version: 1.0

Get data log acquisition period

Parameters

Name Type Description Notes
bundleId number (uint16) 0: no Data log for this bundle. (-1) : Log this bundle whenever one of its variables is written. Other values: number of minutes between each log of the Bundle.

Returns

number (uint32)

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const bundleId = ...;
const response = await tap.service.bundle.getDataLogPeriod(bundleId);
const value = response.body();
console.log(`getDataLogPeriod: ${value}`);

putDataLogPeriod

Minimal Tap Firmware version: 1.0

Write data-log acquisition period in configuration

Parameters

Name Type Description Notes
bundleId number (uint16) Bundle id
value number 0: no Data log for this bundle. (-1) : Log this bundle whenever one of its variables is written. Other values: number of minutes between each log of the Bundle.

Returns

Nothing

Authorization

  • Configuration mode is required to perform this request.

Example

import { Tap } from "@iotize/tap";
import '@iotize/tap/ext/configurator';


const tap: Tap = ...;

await tap.configurator.setupConfigMode();

const bundleId = ...;
const value = ...;
const response = await tap.service.bundle.putDataLogPeriod(bundleId, value);
const value = response.body();
console.log(`putDataLogPeriod: ${value}`);

getDataLogCryptoGroupId

Minimal Tap Firmware version: 1.0

Get data log encryption group id

Parameters

Name Type Description Notes
bundleId number (uint16) Bundle id

Returns

number (uint16)

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const bundleId = ...;
const response = await tap.service.bundle.getDataLogCryptoGroupId(bundleId);
const value = response.body();
console.log(`getDataLogCryptoGroupId: ${value}`);

putDataLogCryptoGroupId

Minimal Tap Firmware version: 1.0

Write data-log acquisition period in configuration

Parameters

Name Type Description Notes
bundleId number (uint16) Bundle id
value number

Returns

Nothing

Authorization

  • Configuration mode is required to perform this request.

Example

import { Tap } from "@iotize/tap";
import '@iotize/tap/ext/configurator';


const tap: Tap = ...;

await tap.configurator.setupConfigMode();

const bundleId = ...;
const value = ...;
const response = await tap.service.bundle.putDataLogCryptoGroupId(bundleId, value);
const value = response.body();
console.log(`putDataLogCryptoGroupId: ${value}`);

create

Minimal Tap Firmware version: 1.0

Create a new bundle

Parameters

Name Type Description Notes
bundleId number (uint16) Bundle id

Returns

Nothing

Authorization

  • Configuration mode is required to perform this request.

Example

import { Tap } from "@iotize/tap";
import '@iotize/tap/ext/configurator';


const tap: Tap = ...;

await tap.configurator.setupConfigMode();

const bundleId = ...;
const response = await tap.service.bundle.create(bundleId);
const value = response.body();
console.log(`create: ${value}`);

getName

Minimal Tap Firmware version: 1.0

Read bundle name

Parameters

Name Type Description Notes
bundleId number (uint16) Bundle id

Returns

string

Example

import { Tap } from "@iotize/tap";

const tap: Tap = ...;


const bundleId = ...;
const response = await tap.service.bundle.getName(bundleId);
const value = response.body();
console.log(`getName: ${value}`);

putName

Minimal Tap Firmware version: 1.0

Write bundle name in configuration

Parameters

Name Type Description Notes
bundleId number (uint16) Bundle id
name string Name

Returns

Nothing

Authorization

  • Configuration mode is required to perform this request.

Example

import { Tap } from "@iotize/tap";
import '@iotize/tap/ext/configurator';


const tap: Tap = ...;

await tap.configurator.setupConfigMode();

const bundleId = ...;
const name = ...;
const response = await tap.service.bundle.putName(bundleId, name);
const value = response.body();
console.log(`putName: ${value}`);