Skip to content

AclService

Method LWM2M request Description
getInstanceId GET /acl/{objectId}/instance-id Get ACL object instance id
getList GET /acl/{objectId}/list Get ACL list
getObjectId GET /acl/{objectId}/object-id Get acl object id
getOwner GET /acl/{objectId}/owner Get ACL group owner id
putList PUT /acl/{objectId}/list Write ACL
putOwner PUT /acl/{objectId}/owner Set access control owner group

getInstanceId

Integer getInstanceId(objectId)

Get ACL object instance id

Example

let myService = new AclService();
let objectId = 56; // Integer | 

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

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


Integer objectId = 56; // Integer | 
try {
    Call<Integer> call = myService.getInstanceId(objectId);
    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 AclService#getInstanceId");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
objectId Integer

Return type

Integer

Authorization

No authorization required

getList

ListAclEntry getList(objectId)

Get ACL list

Ressource contenant les droits d'un groupe sur cet objet : * ressource instance ID = Short Server ID du groupe

Example

let myService = new AclService();
let objectId = 56; // Integer | 

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

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


Integer objectId = 56; // Integer | 
try {
    Call<ListAclEntry> call = myService.getList(objectId);
    Response<ListAclEntry> 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 AclService#getList");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
objectId Integer

Return type

ListAclEntry

Authorization

No authorization required

getObjectId

Integer getObjectId(objectId)

Get acl object id

Example

let myService = new AclService();
let objectId = 56; // Integer | 

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

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


Integer objectId = 56; // Integer | 
try {
    Call<Integer> call = myService.getObjectId(objectId);
    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 AclService#getObjectId");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
objectId Integer

Return type

Integer

Authorization

No authorization required

getOwner

Integer getOwner(objectId)

Get ACL group owner id

Example

let myService = new AclService();
let objectId = 56; // Integer | 

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

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


Integer objectId = 56; // Integer | 
try {
    Call<Integer> call = myService.getOwner(objectId);
    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 AclService#getOwner");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
objectId Integer

Return type

Integer

Authorization

No authorization required

putList

putList(objectId)

Write ACL

Example

let myService = new AclService();
let objectId = 56; // Integer | 

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

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


Integer objectId = 56; // Integer | 
try {
    Call<Void> call = myService.putList(objectId);
    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 AclService#putList");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
objectId Integer

Return type

null (empty response body)

Authorization

No authorization required

putOwner

putOwner(objectId, ownerId)

Set access control owner group

Example

let myService = new AclService();
let objectId = 56; // Integer | 
let ownerId = 56; // Integer | 

try{
    let call = myService.putOwner(objectId, ownerId);
    let value = (await call).body();
    console.log(`putOwner: ${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.AclService;

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


Integer objectId = 56; // Integer | 
Integer ownerId = 56; // Integer | 
try {
    Call<Void> call = myService.putOwner(objectId, ownerId);
    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 AclService#putOwner");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
objectId Integer
ownerId Integer

Return type

null (empty response body)

Authorization

No authorization required