Hello, I am basically not from the ContentServer development team. and my core skill set is MS Dynamics 365. We are looking to use 'Get Content' REST API to download the file using below
REST API (UI is Dynamics CRM).
https://developer.opentext.com/alpha/cs.exe/api/v1/nodes/{id}/content/{filename}
I have tried using C# code to get the content. What is the format of the Content response? and how can I use the content to save it as a file?
Please advise. Any programming language example works for me.
var client = new RestClient("https://xxxx.****.com/OTCS/cs.exe/api/v2/nodes/41681696/content/.pdf");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
request.AddHeader("otcsticket", "/NVhbnazqiWRBbXQzdSJm7RG1B5q+jFomnx8qBWmdYxK83d4WqtlV9WX1oIrBe/21CWDHAlArQkaZy5wtFlK46lsZHU6TVY5iVoQwX35X/0zqg5ixjN9aA==");
request.AlwaysMultipartFormData = true;
request.AddParameter("action", "download");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
And also please find the attached sample content response. If I save it as a file, it won't work.
Best Regards
Sandeep BG