Enable APIs
After onboarding the tenant account, enable or disable specific API(s) (External API, Journey API), based on the services agreed upon in the contract..
Pre-requisites
Make sure the following things are in place, before enabling the API:
- Tenant ID must be available.
- Database access (preferably via a secure SQL client) to update the
DMPChannelandDMPCampaignChannelMappingtables. - Knowledge of the DMPChannel IDs for each API type say:
- For External API, the
DMPChannelIdis 25 - For Journey API (Trigger API), the
DMPChannelIdis 31
- For External API, the
Enable API
To enable the API in CDP and assign it with a specific tenant, follow the steps below:
- Confirm API entries exist in the
DMPChanneltable.- To check if the External and Journey API definitions exist in the
DMPChanneltable, run the below query.SELECT * FROM DMPChannel WHERE ID IN (25, 31);
- If the External API is missing, run the query below to insert the
External
API.
-- Example: Already existing ID is 25 -- Only needed if External API is not yet defined INSERT INTO DMPChannel ( ID, NAME, DESCRIPTION, DisplayName, ECDisplayName, Preference, Config, TYPE ) VALUES ( 25, 'EXTERNAL API', 'EXTERNAL API', 'External API', 'Trigger API', 21, '{"isSegChannelCap":1}', trapi );
- If the Journey API is missing, run the query below to insert the Journey
API.
-- Example: Already existing ID is 31 INSERT INTO DMPChannel ( ID, NAME, DESCRIPTION, DisplayName, ECDisplayName, Preference, Config, TYPE ) VALUES ( 31, 'JOURNEY API', 'JOURNEY API', 'Journey API', 'Trigger API', 21, '{"isSegChannelCap":1}', 'trapi' );
- To check if the External and Journey API definitions exist in the
- After including the API, enable the API for a specific Tenant. For a given
tenant say Tenant ID = 1234, insert entries into the
DMPCampaignChannelMappingtable.- To enable the External API for the specific tenant, run the query
below:
-- Update <Tenant ID> with actaul Tenant ID INSERT INTO DMPCampaignChannelMapping (CampaignId,DMPChannelId,Status,ImpressionCap,ImpressionEnabled,FrequencyCaps,EmailScheduleTimeInMins,IcDisabled,CampaignUserIdPriorityId) VALUES(<Tenant ID>,25,1,100000,0,'{"monthly":{"value":15000},"weekly":{"value":13500},"daily":{"value":20000,"isPersistent":0},"lifetime":100000}',10,1,5);
- To enable the Journey API for the specific tenant, run the query
below:
-- Update <Tenant ID> with actaul Tenant ID INSERT INTO DMPCampaignChannelMapping (CampaignId,DMPChannelId,Status,ImpressionCap,ImpressionEnabled,FrequencyCaps,EmailScheduleTimeInMins,IcDisabled,CampaignUserIdPriorityId) VALUES (<Tenant ID>,31,1,100000,0,'{"monthly":{"value":15000},"weekly":{"value":13500},"daily":{"value":200,"isPersistent":0},"lifetime":100000}',10,0,84);
- To enable the External API for the specific tenant, run the query
below: