Skip to content

GroupService

Method LwM2M request Description
getName get /1025/{groupId}/0
alias: /group/{groupId}/name
Get the name of the group
putName put /1025/{groupId}/0
alias: /group/{groupId}/name
Write group name
changePassword post /1025/{groupId}/2
alias: /group/{groupId}/password
Update password
changePasswordKey post /1025/{groupId}/2
alias: /group/{groupId}/password-key
Change password using bytes data
getSessionLifetime get /1025/{groupId}/4
alias: /group/{groupId}/session-lifetime
Get the maximum session lifetime
putSessionLifetime put /1025/{groupId}/4
alias: /group/{groupId}/session-lifetime
Write session lifetime in configuration
getAlias get /1025/{groupId}/5
alias: /group/{groupId}/alias
Get group alias
putAlias put /1025/{groupId}/5
alias: /group/{groupId}/alias
Write group alias in configuration
create post /1025/{groupId}/65535
alias: /group/{groupId}/create
Create group

getName

Minimal Tap Firmware version: 1.0

Get the name of the group

Parameters

Name Type Description Notes
groupId number (uint16) Group id

Returns

string

Example

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

const tap: Tap = ...;


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

putName

Minimal Tap Firmware version: 1.0

Write group name

Parameters

Name Type Description Notes
groupId number (uint16) Group id to return
name string optional

Returns

Nothing

Example

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

const tap: Tap = ...;


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

changePassword

Minimal Tap Firmware version: 1.0

Update password

Parameters

Name Type Description Notes
groupId number (uint16) Group id
password string optional

Returns

Nothing

Example

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

const tap: Tap = ...;


const groupId = ...;
const password = ...;
const response = await tap.service.group.changePassword(groupId, password);
const value = response.body();
console.log(`changePassword: ${value}`);

changePasswordKey

Minimal Tap Firmware version: 1.0

Change password using bytes data

Parameters

Name Type Description Notes
groupId number (uint16) Group id
password Uint8Array optional

Returns

Nothing

Example

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

const tap: Tap = ...;


const groupId = ...;
const password = ...;
const response = await tap.service.group.changePasswordKey(groupId, password);
const value = response.body();
console.log(`changePasswordKey: ${value}`);

getSessionLifetime

Minimal Tap Firmware version: 1.0

Get the maximum session lifetime

Parameters

Name Type Description Notes
groupId number (uint16) Group id

Returns

number (uint16)

Example

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

const tap: Tap = ...;


const groupId = ...;
const response = await tap.service.group.getSessionLifetime(groupId);
const value = response.body();
console.log(`getSessionLifetime: ${value}`);

putSessionLifetime

Minimal Tap Firmware version: 1.0

Write session lifetime in configuration

Parameters

Name Type Description Notes
groupId number (uint16) Group id to return
value number optional

Returns

Nothing

Example

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

const tap: Tap = ...;


const groupId = ...;
const value = ...;
const response = await tap.service.group.putSessionLifetime(groupId, value);
const value = response.body();
console.log(`putSessionLifetime: ${value}`);

getAlias

Minimal Tap Firmware version: 1.0

Get group alias

Parameters

Name Type Description Notes
groupId number (uint16) Group id

Returns

number (uint16)

Example

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

const tap: Tap = ...;


const groupId = ...;
const response = await tap.service.group.getAlias(groupId);
const value = response.body();
console.log(`getAlias: ${value}`);

putAlias

Minimal Tap Firmware version: 1.0

Write group alias in configuration

Parameters

Name Type Description Notes
groupId number (uint16) Group id to return
value number optional

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 groupId = ...;
const value = ...;
const response = await tap.service.group.putAlias(groupId, value);
const value = response.body();
console.log(`putAlias: ${value}`);

create

Minimal Tap Firmware version: 1.0

Create group

Parameters

Name Type Description Notes
groupId number (uint16) Group 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 groupId = ...;
const response = await tap.service.group.create(groupId);
const value = response.body();
console.log(`create: ${value}`);