GroupService¶
Method | LWM2M request | Description |
---|---|---|
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 |
create | POST /1025/{groupId}/65535 alias: /group/{groupId}/create |
Create group with id groupId |
getAlias | GET /1025/{groupId}/5 alias: /group/{groupId}/alias |
Get group alias |
getName | GET /1025/{groupId}/0 alias: /group/{groupId}/name |
Get the name of the group |
getSessionLifetime | GET /1025/{groupId}/4 alias: /group/{groupId}/session-lifetime |
Get the maximum session lifetime |
putAlias | PUT /1025/{groupId}/5 alias: /group/{groupId}/alias |
Write group alias |
putName | PUT /1025/{groupId}/0 alias: /group/{groupId}/name |
Write group name |
putSessionLifetime | PUT /1025/{groupId}/4 alias: /group/{groupId}/session-lifetime |
Write session lifetime |
changePassword¶
Minimal Tap Firmware version: >= 1.0
Update password
Change groupId password using an ASCII string
Example¶
let myService = new GroupService();
let groupId = 56; // Integer | Group id
let password = password_example; // String |
try {
let call = myService.changePassword(groupId, password);
let value = (await call).body();
console.log(`changePassword: ${value}`);
} catch (ex) {
// No response from device / response error (ie: device is not connected or request timeout)
console.error(ex);
}
import .GroupService;
ServiceFactory serviceFactory = ...;
GroupService myService = serviceFactory.create(GroupService.class);
Integer groupId = 56; // Integer | Group id
String password = password_example; // String |
try {
Call<Void> call = myService.changePassword(groupId, password);
Response<Void> response = call.execute();
if (response.isSuccessful()){
System.out.println(response.body());
}
else{
System.out.println(DeviceResponseError.createErrorMessage(response));
}
} catch (ApiException e) {
System.err.println("Exception when calling GroupService#changePassword");
e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...
let ApiResponse<Any> = try tap.service.group.changePassword(groupId, password);
print("Response:" + response.body())
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
groupId | Integer | Group id | |
password | String | [optional] |
Return type¶
null (empty response body)
Authorization¶
No authorization required
changePasswordKey¶
Minimal Tap Firmware version: >= 1.0
Change password using bytes data
Change groupId password using binary data. If SCRAM multi-hash mode: StoredKey+ServerKey+UserSalt+UserIt (40 uchar)
Example¶
let myService = new GroupService();
let groupId = 56; // Integer | Group id
let password = BINARY_DATA_HERE; // Bytes |
try {
let call = myService.changePasswordKey(groupId, password);
let value = (await call).body();
console.log(`changePasswordKey: ${value}`);
} catch (ex) {
// No response from device / response error (ie: device is not connected or request timeout)
console.error(ex);
}
import .GroupService;
ServiceFactory serviceFactory = ...;
GroupService myService = serviceFactory.create(GroupService.class);
Integer groupId = 56; // Integer | Group id
Bytes password = BINARY_DATA_HERE; // Bytes |
try {
Call<Void> call = myService.changePasswordKey(groupId, password);
Response<Void> response = call.execute();
if (response.isSuccessful()){
System.out.println(response.body());
}
else{
System.out.println(DeviceResponseError.createErrorMessage(response));
}
} catch (ApiException e) {
System.err.println("Exception when calling GroupService#changePasswordKey");
e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...
let ApiResponse<Any> = try tap.service.group.changePasswordKey(groupId, password);
print("Response:" + response.body())
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
groupId | Integer | Group id | |
password | BytesBytes | [optional] |
Return type¶
null (empty response body)
Authorization¶
No authorization required
create¶
Minimal Tap Firmware version: >= 1.0
Create group with id groupId
Example¶
let myService = new GroupService();
let groupId = 56; // Integer | Group id
try {
let call = myService.create(groupId);
let value = (await call).body();
console.log(`create: ${value}`);
} catch (ex) {
// No response from device / response error (ie: device is not connected or request timeout)
console.error(ex);
}
import .GroupService;
ServiceFactory serviceFactory = ...;
GroupService myService = serviceFactory.create(GroupService.class);
Integer groupId = 56; // Integer | Group id
try {
Call<Void> call = myService.create(groupId);
Response<Void> response = call.execute();
if (response.isSuccessful()){
System.out.println(response.body());
}
else{
System.out.println(DeviceResponseError.createErrorMessage(response));
}
} catch (ApiException e) {
System.err.println("Exception when calling GroupService#create");
e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...
let ApiResponse<Any> = try tap.service.group.create(groupId);
print("Response:" + response.body())
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
groupId | Integer | Group id |
Return type¶
null (empty response body)
Authorization¶
No authorization required
getAlias¶
Minimal Tap Firmware version: >= 1.0
Get group alias
ID du groupe dont ce groupe hérite les droits. Si l'Alias correspond à l'ID du groupe, alors c'est un Profile, sinon c'est un User.
Example¶
let myService = new GroupService();
let groupId = 56; // Integer | Group id
try {
let call = myService.getAlias(groupId);
let value = (await call).body();
console.log(`getAlias: ${value}`);
} catch (ex) {
// No response from device / response error (ie: device is not connected or request timeout)
console.error(ex);
}
import .GroupService;
ServiceFactory serviceFactory = ...;
GroupService myService = serviceFactory.create(GroupService.class);
Integer groupId = 56; // Integer | Group id
try {
Call<Integer> call = myService.getAlias(groupId);
Response<Integer> response = call.execute();
if (response.isSuccessful()){
System.out.println(response.body());
}
else{
System.out.println(DeviceResponseError.createErrorMessage(response));
}
} catch (ApiException e) {
System.err.println("Exception when calling GroupService#getAlias");
e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...
let ApiResponse<Integer> = try tap.service.group.getAlias(groupId);
print("Response:" + response.body())
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
groupId | Integer | Group id |
Return type¶
Authorization¶
No authorization required
getName¶
Minimal Tap Firmware version: >= 1.0
Get the name of the group
Example¶
let myService = new GroupService();
let groupId = 56; // Integer | Group id
try {
let call = myService.getName(groupId);
let value = (await call).body();
console.log(`getName: ${value}`);
} catch (ex) {
// No response from device / response error (ie: device is not connected or request timeout)
console.error(ex);
}
import .GroupService;
ServiceFactory serviceFactory = ...;
GroupService myService = serviceFactory.create(GroupService.class);
Integer groupId = 56; // Integer | Group id
try {
Call<String> call = myService.getName(groupId);
Response<String> response = call.execute();
if (response.isSuccessful()){
System.out.println(response.body());
}
else{
System.out.println(DeviceResponseError.createErrorMessage(response));
}
} catch (ApiException e) {
System.err.println("Exception when calling GroupService#getName");
e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...
let ApiResponse<String> = try tap.service.group.getName(groupId);
print("Response:" + response.body())
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
groupId | Integer | Group id |
Return type¶
Authorization¶
No authorization required
getSessionLifetime¶
Minimal Tap Firmware version: >= 1.0
Get the maximum session lifetime
Example¶
let myService = new GroupService();
let groupId = 56; // Integer | Group id
try {
let call = myService.getSessionLifetime(groupId);
let value = (await call).body();
console.log(`getSessionLifetime: ${value}`);
} catch (ex) {
// No response from device / response error (ie: device is not connected or request timeout)
console.error(ex);
}
import .GroupService;
ServiceFactory serviceFactory = ...;
GroupService myService = serviceFactory.create(GroupService.class);
Integer groupId = 56; // Integer | Group id
try {
Call<Integer> call = myService.getSessionLifetime(groupId);
Response<Integer> response = call.execute();
if (response.isSuccessful()){
System.out.println(response.body());
}
else{
System.out.println(DeviceResponseError.createErrorMessage(response));
}
} catch (ApiException e) {
System.err.println("Exception when calling GroupService#getSessionLifetime");
e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...
let ApiResponse<Integer> = try tap.service.group.getSessionLifetime(groupId);
print("Response:" + response.body())
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
groupId | Integer | Group id |
Return type¶
Authorization¶
No authorization required
putAlias¶
Minimal Tap Firmware version: >= 1.0
Write group alias
Example¶
let myService = new GroupService();
let groupId = 56; // Integer | Group id to return
let value = 56; // Integer |
try {
let call = myService.putAlias(groupId, value);
let value = (await call).body();
console.log(`putAlias: ${value}`);
} catch (ex) {
// No response from device / response error (ie: device is not connected or request timeout)
console.error(ex);
}
import .GroupService;
ServiceFactory serviceFactory = ...;
GroupService myService = serviceFactory.create(GroupService.class);
Integer groupId = 56; // Integer | Group id to return
Integer value = 56; // Integer |
try {
Call<Void> call = myService.putAlias(groupId, value);
Response<Void> response = call.execute();
if (response.isSuccessful()){
System.out.println(response.body());
}
else{
System.out.println(DeviceResponseError.createErrorMessage(response));
}
} catch (ApiException e) {
System.err.println("Exception when calling GroupService#putAlias");
e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...
let ApiResponse<Any> = try tap.service.group.putAlias(groupId, value);
print("Response:" + response.body())
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
groupId | Integer | Group id to return | |
value | Integer | [optional] |
Return type¶
null (empty response body)
Authorization¶
No authorization required
putName¶
Minimal Tap Firmware version: >= 1.0
Write group name
Example¶
let myService = new GroupService();
let groupId = 56; // Integer | Group id to return
let name = name_example; // String |
try {
let call = myService.putName(groupId, name);
let value = (await call).body();
console.log(`putName: ${value}`);
} catch (ex) {
// No response from device / response error (ie: device is not connected or request timeout)
console.error(ex);
}
import .GroupService;
ServiceFactory serviceFactory = ...;
GroupService myService = serviceFactory.create(GroupService.class);
Integer groupId = 56; // Integer | Group id to return
String name = name_example; // String |
try {
Call<Void> call = myService.putName(groupId, name);
Response<Void> response = call.execute();
if (response.isSuccessful()){
System.out.println(response.body());
}
else{
System.out.println(DeviceResponseError.createErrorMessage(response));
}
} catch (ApiException e) {
System.err.println("Exception when calling GroupService#putName");
e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...
let ApiResponse<Any> = try tap.service.group.putName(groupId, name);
print("Response:" + response.body())
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
groupId | Integer | Group id to return | |
name | String | [optional] |
Return type¶
null (empty response body)
Authorization¶
No authorization required
putSessionLifetime¶
Minimal Tap Firmware version: >= 1.0
Write session lifetime
Example¶
let myService = new GroupService();
let groupId = 56; // Integer | Group id to return
let value = 56; // Integer |
try {
let call = myService.putSessionLifetime(groupId, value);
let value = (await call).body();
console.log(`putSessionLifetime: ${value}`);
} catch (ex) {
// No response from device / response error (ie: device is not connected or request timeout)
console.error(ex);
}
import .GroupService;
ServiceFactory serviceFactory = ...;
GroupService myService = serviceFactory.create(GroupService.class);
Integer groupId = 56; // Integer | Group id to return
Integer value = 56; // Integer |
try {
Call<Void> call = myService.putSessionLifetime(groupId, value);
Response<Void> response = call.execute();
if (response.isSuccessful()){
System.out.println(response.body());
}
else{
System.out.println(DeviceResponseError.createErrorMessage(response));
}
} catch (ApiException e) {
System.err.println("Exception when calling GroupService#putSessionLifetime");
e.printStackTrace();
}
import TapDeviceClient
let tap: TapDevice = // ...
let ApiResponse<Any> = try tap.service.group.putSessionLifetime(groupId, value);
print("Response:" + response.body())
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
groupId | Integer | Group id to return | |
value | Integer | [optional] |
Return type¶
null (empty response body)
Authorization¶
No authorization required