Skip to content

GroupService

Method LWM2M request Description
getAlias GET /group/{groupId}/alias Get group alias
getName GET /group/{groupId}/name Get the name of the group
getScramUserIteration GET /group/{groupId}/scram-user-iteration Get scram user iteration
getScramUserSalt GET /group/{groupId}/scram-user-salt Get scram user salt
getSessionLifetime GET /group/{groupId}/session-lifetime Get the maximum session lifetime
postPassword POST /group/{groupId}/password Update password
putAlias PUT /group/{groupId}/alias Write group alias
putName PUT /group/{groupId}/name Write group name
putScramUserIteration PUT /group/{groupId}/scram-user-iteration Write scram user iteration
putScramUserSalt PUT /group/{groupId}/scram-user-salt Write scram user salt
putSessionLifetime PUT /group/{groupId}/session-lifetime Write session lifetime

getAlias

Integer getAlias(groupId)

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 com.iotize.android.device.device.api.service.definition.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();
}

Parameters

Name Type Description Notes
groupId Integer Group id

Return type

Integer

Authorization

No authorization required

getName

String getName(groupId)

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 com.iotize.android.device.device.api.service.definition.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();
}

Parameters

Name Type Description Notes
groupId Integer Group id

Return type

String

Authorization

No authorization required

getScramUserIteration

Integer getScramUserIteration(groupId)

Get scram user iteration

SCRAM Hash Iteration: Nombre d'itérations utilisé en SCRAM pour le dernier hashage. Nombre >1000, généré aléatoirement à l'écriture de la conf dans l'IoTize.

Example

let myService = new GroupService();
let groupId = 56; // Integer | Group id

try{
    let call = myService.getScramUserIteration(groupId);
    let value = (await call).body();
    console.log(`getScramUserIteration: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import com.iotize.android.device.device.api.service.definition.GroupService;

ServiceFactory serviceFactory = ...;
GroupService myService = serviceFactory.create(GroupService.class);


Integer groupId = 56; // Integer | Group id
try {
    Call<Integer> call = myService.getScramUserIteration(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#getScramUserIteration");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
groupId Integer Group id

Return type

Integer

Authorization

No authorization required

getScramUserSalt

Integer getScramUserSalt(groupId)

Get scram user salt

User-specific salt utilisé (avec le User Name) pour saller les hashs du password StoredKey et ServerKey. Ecrit par Exec/SetPWD

Example

let myService = new GroupService();
let groupId = 56; // Integer | Group id

try{
    let call = myService.getScramUserSalt(groupId);
    let value = (await call).body();
    console.log(`getScramUserSalt: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import com.iotize.android.device.device.api.service.definition.GroupService;

ServiceFactory serviceFactory = ...;
GroupService myService = serviceFactory.create(GroupService.class);


Integer groupId = 56; // Integer | Group id
try {
    Call<Integer> call = myService.getScramUserSalt(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#getScramUserSalt");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
groupId Integer Group id

Return type

Integer

Authorization

No authorization required

getSessionLifetime

Integer getSessionLifetime(groupId)

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 com.iotize.android.device.device.api.service.definition.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();
}

Parameters

Name Type Description Notes
groupId Integer Group id

Return type

Integer

Authorization

No authorization required

postPassword

postPassword(groupId, password)

Update password

Demande de modification du Pwd, arguments : pwd (16 chars) in no security or 1-hash modes. StoredKey+ServerKey+UserSalt+UserIt (40 uchar) in SCRAM multi-hash mode

Example

let myService = new GroupService();
let groupId = 56; // Integer | Group id
let password = "password_example"; // String | 

try{
    let call = myService.postPassword(groupId, password);
    let value = (await call).body();
    console.log(`postPassword: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import com.iotize.android.device.device.api.service.definition.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.postPassword(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#postPassword");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
groupId Integer Group id
password String [optional]

Return type

null (empty response body)

Authorization

No authorization required

putAlias

putAlias(groupId, value)

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 com.iotize.android.device.device.api.service.definition.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();
}

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

putName(groupId, name)

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 com.iotize.android.device.device.api.service.definition.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();
}

Parameters

Name Type Description Notes
groupId Integer Group id to return
name String [optional]

Return type

null (empty response body)

Authorization

No authorization required

putScramUserIteration

putScramUserIteration(groupId, value)

Write scram user iteration

Example

let myService = new GroupService();
let groupId = 56; // Integer | Group id
let value = 56; // Integer | 

try{
    let call = myService.putScramUserIteration(groupId, value);
    let value = (await call).body();
    console.log(`putScramUserIteration: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import com.iotize.android.device.device.api.service.definition.GroupService;

ServiceFactory serviceFactory = ...;
GroupService myService = serviceFactory.create(GroupService.class);


Integer groupId = 56; // Integer | Group id
Integer value = 56; // Integer | 
try {
    Call<Void> call = myService.putScramUserIteration(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#putScramUserIteration");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
groupId Integer Group id
value Integer [optional]

Return type

null (empty response body)

Authorization

No authorization required

putScramUserSalt

putScramUserSalt(groupId, value)

Write scram user salt

Example

let myService = new GroupService();
let groupId = 56; // Integer | Group id to return
let value = 56; // Integer | 

try{
    let call = myService.putScramUserSalt(groupId, value);
    let value = (await call).body();
    console.log(`putScramUserSalt: ${value}`);
}
catch (ex){
    // No response from device / response error (ie: device is not connected or request timeout)
    console.error(ex);
}
import com.iotize.android.device.device.api.service.definition.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.putScramUserSalt(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#putScramUserSalt");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
groupId Integer Group id to return
value Integer [optional]

Return type

null (empty response body)

Authorization

No authorization required

putSessionLifetime

putSessionLifetime(groupId, value)

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 com.iotize.android.device.device.api.service.definition.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();
}

Parameters

Name Type Description Notes
groupId Integer Group id to return
value Integer [optional]

Return type

null (empty response body)

Authorization

No authorization required