1 Reply Latest reply: Jan 25, 2017 7:16 AM by Rajesh Vaswani RSS

    Creating App with QlikSense Repository Service API (REST)

      Hello everybody,


      I'am trying to create an app by using the qrs api.

      Therefore i have created a websocket in Dot.Net with wich i can receive all apps already.

      However the creation of new apps failed. Does anybody know how i can fix this?


      Here is my code:


                      string xrfkey = "0123456789abcdef";
                      string requestQuery = @"https://<server>/qrs?xrfkey="+xrfkey;
                      HttpWebRequest request = (HttpWebRequest)WebRequest.Create(requestQuery);
                      request.Method = "POST";
                      request.UserAgent = "Windows";
                      request.Accept = "application/json";
                      request.UseDefaultCredentials = true;
                      request.Headers.Add("X-Qlik-xrfkey", xrfkey);
                      string body = @"{""jsonrpc"": ""2.0"",""id"": 0,""method"": ""CreateApp"",""handle"":
                      -1,""params"": [""Test.qvf""]}";
                      byte[] bodyBytes = Encoding.UTF8.GetBytes(body);
                      if (!string.IsNullOrEmpty(body))
                          request.ContentType = "application/json";
                          request.ContentLength = bodyBytes.Length;
                          Stream requestStream = request.GetRequestStream();
                          requestStream.Write(bodyBytes, 0, bodyBytes.Length);
                      HttpWebResponse response = (HttpWebResponse)request.GetResponse();
                      Stream stream = response.GetResponseStream();
                      string responseStream = stream != null ? new StreamReader(stream).ReadToEnd() : string.Empty;





           The remote server returned an error: (404) Not Found.


      I think i have to use the qes API, but i don´t know how i can connect to. The documentation did not help me anymore.


      Best Regards