<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: QlikSense: ODAG API 500 internal server error in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/QlikSense-ODAG-API-500-internal-server-error/m-p/1776964#M13766</link>
    <description>&lt;P&gt;Found a solution.&lt;/P&gt;&lt;P&gt;For others who also have this Problem.&lt;/P&gt;&lt;P&gt;The Problem is, that this code is implemented in .Net Framework. I also try with .Net Core. .Net Core works perfect, but not .Net Framework.&lt;/P&gt;&lt;P&gt;In my case .Net Framework sends the Header "Expect: 100-continue" this works for QRS API but not for ODAG API. To disable the Header i added this line of code:&lt;/P&gt;&lt;P&gt;System.Net.ServicePointManager.Expect100Continue = false;&lt;/P&gt;&lt;P&gt;before creating the request. Now it works perfect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 24 Jan 2021 19:52:27 GMT</pubDate>
    <dc:creator>onkellepie</dc:creator>
    <dc:date>2021-01-24T19:52:27Z</dc:date>
    <item>
      <title>QlikSense: ODAG API 500 internal server error</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/QlikSense-ODAG-API-500-internal-server-error/m-p/1774903#M13717</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;i have a small c# command line tool and want to create an ODAG Link like described here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense-developer/November2020/apis/ODAGserviceAPI/index.html?page=9" target="_blank"&gt;OdagService − post /links - Qlik | Help&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But it returns 500 internal server error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Virtuell Proxy is configured correctly. Normal GET Requests are working (like about or get all available Links). But POST Requests are not working.&lt;/P&gt;&lt;P&gt;If i exactly do the same within a ASP.Net Website with CodeBehind it works fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The goal is to implement a backend-service to create ODAG Apps automatically.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My sample code:&lt;/P&gt;&lt;P&gt;using System;&lt;BR /&gt;using System.Collections.Generic;&lt;BR /&gt;using System.IO;&lt;BR /&gt;using System.Linq;&lt;BR /&gt;using System.Net;&lt;BR /&gt;using System.Net.Http;&lt;BR /&gt;using System.Security.Cryptography.X509Certificates;&lt;BR /&gt;using System.Text;&lt;BR /&gt;using Newtonsoft;&lt;BR /&gt;using Newtonsoft.Json;&lt;/P&gt;&lt;P&gt;namespace ODAG_API_Test&lt;BR /&gt;{&lt;BR /&gt;class Program&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;static void Main(string[] args)&lt;BR /&gt;{&lt;BR /&gt;Console.Clear();&lt;BR /&gt;Console.WriteLine("Test Create Link");&lt;BR /&gt;Console.Read();&lt;BR /&gt;SendPostRequest();&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;public static string SendPostRequest()&lt;BR /&gt;{&lt;BR /&gt;try&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;string json = "{\"id\":\"\",\"name\":\"UniqueAppName_320\",\"templateApp\":\"4f563fff-744a-4d29-80ae-a3c087baf6bd\",\"rowEstExpr\":\"1=1\",\"privileges\":[],\"properties\":{\"rowEstRange\":[{\"context\":\"*\",\"highBound\":100}],\"genAppLimit\":[{\"context\":\"User_*\",\"limit\":5}],\"appRetentionTime\":[{\"context\":\"User_*\",\"retentionTime\":\"unlimited\"}],\"publishTo\":[],\"targetSheet\":[{\"context\":\"User_*\",\"sheetId\":\"\"}]},\"tags\":[],\"selectionApp\":\"950ed3b0-2696-4337-ae94-85547b1ea9f7\"}";&lt;BR /&gt;&lt;BR /&gt;Console.WriteLine("Start webRequest");&lt;BR /&gt;var httpWebRequest = (HttpWebRequest)WebRequest.Create("&lt;A href="https://SERVER/odag_api_test/api/odag/v1/links?xrfkey=QVad6OMD6iTcrssc" target="_blank"&gt;https://SERVER/odag_api_test/api/odag/v1/links?xrfkey=QVad6OMD6iTcrssc&lt;/A&gt;");&lt;BR /&gt;httpWebRequest.ContentType = "application/json";&lt;BR /&gt;httpWebRequest.Method = "POST";&lt;BR /&gt;httpWebRequest.Headers.Add("hdr-reload", @"DOMAIN\USER");&lt;BR /&gt;httpWebRequest.Headers.Add("X-Qlik-xrfkey", "QVad6OMD6iTcrssc");&lt;/P&gt;&lt;P&gt;using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))&lt;BR /&gt;{&lt;BR /&gt;streamWriter.Write(json);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();&lt;BR /&gt;string result;&lt;BR /&gt;using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))&lt;BR /&gt;{&lt;BR /&gt;result = streamReader.ReadToEnd();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Console.WriteLine(result);&lt;/P&gt;&lt;P&gt;return result;&lt;BR /&gt;}&lt;BR /&gt;catch(WebException exc)&lt;BR /&gt;{&lt;BR /&gt;Console.WriteLine("ERROR");&lt;BR /&gt;Console.WriteLine(exc.Message);&lt;BR /&gt;Console.WriteLine(exc.Response);&lt;BR /&gt;Console.WriteLine(exc.Status);&lt;BR /&gt;return "ERROR";&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help to understand this or any hints how to solve this Problem?&lt;/P&gt;&lt;P&gt;There are no informations about my queries within the Qlik Logs (or i dont find them?!)&lt;/P&gt;&lt;P&gt;I currently on QlikSense November 2020 SR3&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks and Regards&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 00:49:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/QlikSense-ODAG-API-500-internal-server-error/m-p/1774903#M13717</guid>
      <dc:creator>onkellepie</dc:creator>
      <dc:date>2024-11-16T00:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: QlikSense: ODAG API 500 internal server error</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/QlikSense-ODAG-API-500-internal-server-error/m-p/1776964#M13766</link>
      <description>&lt;P&gt;Found a solution.&lt;/P&gt;&lt;P&gt;For others who also have this Problem.&lt;/P&gt;&lt;P&gt;The Problem is, that this code is implemented in .Net Framework. I also try with .Net Core. .Net Core works perfect, but not .Net Framework.&lt;/P&gt;&lt;P&gt;In my case .Net Framework sends the Header "Expect: 100-continue" this works for QRS API but not for ODAG API. To disable the Header i added this line of code:&lt;/P&gt;&lt;P&gt;System.Net.ServicePointManager.Expect100Continue = false;&lt;/P&gt;&lt;P&gt;before creating the request. Now it works perfect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jan 2021 19:52:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/QlikSense-ODAG-API-500-internal-server-error/m-p/1776964#M13766</guid>
      <dc:creator>onkellepie</dc:creator>
      <dc:date>2021-01-24T19:52:27Z</dc:date>
    </item>
  </channel>
</rss>

