Skip to content

BundleService

Method LWM2M request Description
getAclgroupId GET /bundle/{bundleId}/acl/{groupId} Get acls
getDatalogPeriod GET /bundle/{bundleId}/datalog-period Get datalog period
getValues GET /bundle/{bundleId}/values Get bundle values
putAclgroupId PUT /bundle/{bundleId}/acl/{groupId} Write acls
putDatalogPeriod PUT /bundle/{bundleId}/datalog-period Write datalog period

getAclgroupId

getAclgroupId(bundleId, groupId)

Get acls

Example

let myService = new BundleService();
let bundleId = 56; // Integer | Bundle id
let groupId = 56; // Integer | Group id

try{
    let call = myService.getAclgroupId(bundleId, groupId);
    let value = (await call).body();
    console.log(`getAclgroupId: ${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.BundleService;

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


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

Parameters

Name Type Description Notes
bundleId Integer Bundle id
groupId Integer Group id

Return type

null (empty response body)

Authorization

No authorization required

getDatalogPeriod

Integer getDatalogPeriod(bundleId)

Get datalog period

Example

let myService = new BundleService();
let bundleId = 56; // Integer | 0 : no Data log for this bundle (-1) : Log this bundle whenever one of its variables changesOther values : number of minutes between each log (… if there is a change in value?)

try{
    let call = myService.getDatalogPeriod(bundleId);
    let value = (await call).body();
    console.log(`getDatalogPeriod: ${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.BundleService;

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


Integer bundleId = 56; // Integer | 0 : no Data log for this bundle (-1) : Log this bundle whenever one of its variables changesOther values : number of minutes between each log (… if there is a change in value?)
try {
    Call<Integer> call = myService.getDatalogPeriod(bundleId);
    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 BundleService#getDatalogPeriod");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
bundleId Integer 0 : no Data log for this bundle (-1) : Log this bundle whenever one of its variables changesOther values : number of minutes between each log (… if there is a change in value?)

Return type

Integer

Authorization

No authorization required

getValues

byte[] getValues(bundleId)

Get bundle values

Example

let myService = new BundleService();
let bundleId = 56; // Integer | Bundle id

try{
    let call = myService.getValues(bundleId);
    let value = (await call).body();
    console.log(`getValues: ${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.BundleService;

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


Integer bundleId = 56; // Integer | Bundle id
try {
    Call<byte[]> call = myService.getValues(bundleId);
    Response<byte[]> 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 BundleService#getValues");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
bundleId Integer Bundle id

Return type

byte[]

Authorization

No authorization required

putAclgroupId

putAclgroupId(bundleId, groupId)

Write acls

Example

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

try{
    let call = myService.putAclgroupId(bundleId, groupId);
    let value = (await call).body();
    console.log(`putAclgroupId: ${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.BundleService;

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


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

Parameters

Name Type Description Notes
bundleId Integer Group id
groupId Integer Group id

Return type

null (empty response body)

Authorization

No authorization required

putDatalogPeriod

putDatalogPeriod(bundleId, value)

Write datalog period

Example

let myService = new BundleService();
let bundleId = 56; // Integer | Bundle id
let value = 56; // Integer | 

try{
    let call = myService.putDatalogPeriod(bundleId, value);
    let value = (await call).body();
    console.log(`putDatalogPeriod: ${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.BundleService;

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


Integer bundleId = 56; // Integer | Bundle id
Integer value = 56; // Integer | 
try {
    Call<Void> call = myService.putDatalogPeriod(bundleId, 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 BundleService#putDatalogPeriod");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
bundleId Integer Bundle id
value Integer

Return type

null (empty response body)

Authorization

No authorization required