Jump to content

Pingzinggolf

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by Pingzinggolf

  1. I am trying to build a trigger and I am hitting a road block.

     When a record is inserted into the table... use the value for "#inserted.email" and look in another table called "CM_Contacts" and see if there is a record with that email address.

    If there is a record send email to person A

    If not then send email to person B

    As the code stands now I am only getting the NOT found part even after I put a email address in from the CM_Contats table.

     

    Capture.PNG

  2. I am new to coding to REST API and could use some help.

    I am trying to get my token in a C# application.  I think I am close but I am getting back - Bad request

     

    Here is my code.  Any help would be appreciated.

               var baseUri = new Uri("https://c2afw1111111111111.caspio.com/");
                var encodedConsumerKey = HttpUtility.UrlEncode("111111111111111111111111111");
                var encodedConsumerKeySecret = HttpUtility.UrlEncode("111111111111111111111111111");
                var encodedPair = Base64Encode(String.Format("{0}:{1}", encodedConsumerKey, encodedConsumerKeySecret));

                var requestToken = new HttpRequestMessage
                {
                    Method = HttpMethod.Post,
                    RequestUri = new Uri(baseUri, "oauth/token"),
                    Content = new StringContent("grant_type=client_credentials")
                };

                requestToken.Content.Headers.ContentType = new MediaTypeWithQualityHeaderValue("application/x-www-form-urlencoded") { CharSet = "UTF-8" };
                requestToken.Headers.TryAddWithoutValidation("Authorization", String.Format("Basic {0}", encodedPair));


                using (HttpClient client = new HttpClient())
                {
                    using (HttpResponseMessage response = client.SendAsync(requestToken).Result)
                    {
                        using (HttpContent content = response.Content)
                        {
                            var json = content.ReadAsStringAsync().Result;
                        }
                    }
                }

  3. I am new to API and I am in Swagger and looking at - GET- /v2/tables/{tableName}/records

    I can select based on one COL - Example...

    https://********.caspio.com/rest/v2/tables/Incoming_Leads/records?q.where=Lead_Source%3D'Medical%20Physicist%20Opportunity%20in%20Missouri%20Available'

    How do I select with 2 fields like

    Select * from table where Lead_Source='asdfasdf" and Email = 'asdfasdfasdf'

    https://********.caspio.com/rest/v2/tables/Incoming_Leads/records?q.where=Lead_Source%3D'Medical%20Physicist%20Opportunity%20in%20Missouri%20Available'?????????????

    I tried to add 2 fields to the WHERE clause but I am not sure how.

     

    Thanks

    https://c2afw033.caspio.com/rest/v2/tables/Incoming_Leads/records?q.where=Lead_Source%3D'Medical%20Physicist%20Opportunity%20in%20Missouri%20Available'
×
×
  • Create New...