EmailDigestSubscription Get & Update Rest API Endpoint

I am trying to implement weekly email digest subscriptions for members using Rest API call to automate the process of weekly subscription.

Did some analysis on the documentation (https://community.telligent.com/community/10/w/api-documentation/60505/emaildigestsubscriptions-in-process-api-service) and did not find any solution but saying the in-process service. I wanted to check if there is a Rest API Endpoint that's available in the latest version ?

I will be using AWS Lambda functions to call the Rest API Endpoint to update with the below details

      [SubscriptionId]
      ,[UserId]
      ,[Context]
      ,[ContextId]
      ,[DateCreatedUtc]
      ,[Frequency] 

If Option 1 Rest API Endpoint is still development in-progress, I would like check if we can connect to the database to update table [stage.hive.hgcapital.com].[dbo].[te_EmailDigest_Subscription]  to implement the Weekly  Email Digest functionality. 

I will update table with values [SubscriptionId] ,[UserId] ,[Context] ,[ContextId] ,[DateCreatedUtc] ,[Frequency] I want to known whether Telligent can open a connection for Hg AWS server using a secure port/key to connect to Telligent database?

Can you please provide guidance around this or any any help document will be useful


Updated the subject
[edited by: Madhu Nagarajan at 3:39 PM (GMT 0) on Tue, Nov 26 2019]
Parents Reply
  • Hi Madhu ,

    You need to run the in-process api in the user context 

    Apis.Get<IUsers>().RunAsUser((int)UserID, () =>
    {
        var subscription = Apis.Get<IEmailDigestSubscriptions>().GetByGroup(groupId);
        if (subscription != null)
         {
         Apis.Get<IEmailDigestSubscriptions>().Update((int)subscription.Id, frequency);
         }
         else
         Apis.Get<IEmailDigestSubscriptions>().Create("group", groupId, frequency);
    }

    Thanks,

    satish

Children