Issue Description:
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 you make a test directly in ACS, then the same error is happening:
https://\***************/rest/profileAndServices/profile/byUuid?uuid_parameter=xxxxxx-xxxx-xxxx-xxxx-xxxxxx&__securitytoken=...
And if you make 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.
Objective: To find the cause of the error while sending API Calls
Environment: Adobe Campaign Standard
Cause: Best Practices not used
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)