I am a beginner in programming and have recently learnt and used http uri to get data and then parse json string from the stream using C# in SSIS and was able to load the data into sql server database.
Below is the sample code I used..
System.Uri uri = new Uri("API URL");
WebRequest webRequest = HttpWebRequest.Create(uri);
HttpWebRequest httpWebRequest = (HttpWebRequest)webRequest;
NetworkCredential networkCredential = new NetworkCredential("LOGIN","Password");
credentialCache.Add(uri,"Basic",networkCredential);
WebResponse webResponse = webRequest.GetResponse();
...
However I am trying to setup the same type of connection for another api which uses POST method.
The query looks something like.. URL + JSON API query which is similar to..
{"JSON" : {
"name": "Dataset",
"ColumnSelect": ["Name","Age","Email"],
"sort":["Name"],
"filterList": [
{
"Attribute": "Age",
"Operator": ">",
"Value": ["25"]
}],"returnObject"
I am not sure how this can be used to query the data and load data to sql like the http request. Can someone please advise me on the right direction to achieve this. Thank you for all your help.