notes="Returns a set of unique asset types based on assets that are either owned by the tenant or assigned to the customer which user is performing the request.",produces=MediaType.APPLICATION_JSON_VALUE)
notes="Deprecated. See 'getAssetProfileNames' API from Asset Profile Controller instead."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH,
"- Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: \n\n"+
"Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n"+
@ -304,12 +304,12 @@ public class DeviceController extends BaseController {
"The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'.\n"+
"You may find the example of device with different type of credentials below: \n\n"+
"- Credentials type: <b>\"Access token\"</b> with <b>device ID</b> and with <b>device ID</b> below: \n\n"+
"- Credentials type: <b>\"X509\"</b> with <b>device profile ID</b> below: \n\n"+
"Note: <b>credentialsId</b> - format <b>Sha3Hash</b>, <b>certificateValue</b> - format <b>PEM</b> (with \"--BEGIN CERTIFICATE----\" and -\"----END CERTIFICATE-\").\n\n"+
notes="Returns a set of unique device profile names based on devices that are either owned by the tenant or assigned to the customer which user is performing the request."
+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH)
notes="Deprecated. See 'getDeviceProfileNames' API from Device Profile Controller instead."+TENANT_OR_CUSTOMER_AUTHORITY_PARAGRAPH,
Assert.assertNotNull("Asset Profile Infos page data is null!",assetProfileInfos);
Assert.assertEquals("Asset Profile Infos Page data is empty! Expected to have default profile created + count value!",1+count,assetProfileInfos.getTotalElements());
Assert.assertNotNull("Device Profile Infos page data is null!",deviceProfileInfos);
Assert.assertEquals("Device Profile Infos Page data is empty! Expected to have default profile created + count value!",1+count,deviceProfileInfos.getTotalElements());
@Query("SELECT new org.thingsboard.server.common.data.EntityInfo(ap.id, 'ASSET_PROFILE', ap.name) "+
"FROM AssetProfileEntity ap WHERE ap.tenantId = :tenantId AND EXISTS (SELECT 1 FROM AssetEntity a WHERE a.tenantId = :tenantId AND a.assetProfileId = ap.id)")
@Query("SELECT new org.thingsboard.server.common.data.EntityInfo(dp.id, 'DEVICE_PROFILE', dp.name) "+
"FROM DeviceProfileEntity dp WHERE dp.tenantId = :tenantId AND EXISTS (SELECT 1 FROM DeviceEntity dv WHERE dv.tenantId = :tenantId AND dv.deviceProfileId = dp.id)")