Filter named byUuid has been defined in the Profile resource
Description description
Environment
- Campaign Standard
Issues/Symptoms
A filter named ‘byUuid’ has been defined in the Profile resource.
The API request is failing in Postman with this error:
Request: https://mc.adobe.io/***************/campaign/profileAndServices/profile/byUuid?uuid_parameter=xxxxx-xxxx-xxxx-xxxx-xxxx
Response: RST-360011 An error has occurred. Please contact the administrator.
BAS-010040 Cannot convert ‘byUuid’ (text type) to 32-bit integer type (bAS-010011 Invalid data).
If one makes a test directly in ACS, then the same error shows:
https://****************/rest/profileAndServices/profile/byUuid?uuid_parameter=xxxxxx-xxxx-xxxx-xxxx-xxxxxx&__securitytoken=…
And if one makes a test with ‘/rest/head/profile’, then the response is good:
https://*********/rest/head/profile/byUuid?uuid_parameter=xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx&__securitytoken=…
The /rest/head/profile’ is not the expected URL.
Resolution resolution
The hasCustomFilter
parameter has to be set to true.
See below an example of code:
// initialize the sdk
const campaignClient = await CampaignStandard.init(params.tenant, params.apiKey, token)
// Get all profiles from Campaign Standard and filter by uuid
let parameters = {
filters: [ 'byUuid'] ,
uuid_parameter:
uuid, hasCustomFilter: true
}
const profiles = await campaignClient.getAllProfiles(parameters)
Cause
Best Practices not used