2 Replies Latest reply: Jan 13, 2016 5:10 AM by Oriol TG RSS

    Qlik Sense SDK and API

    Oriol TG

      Hello,

       

      I have been working the last days into an aplication on .NET to be able to check if an app name exists in a stream deleting the application if exists and uploading and publishing the new one or only upload and publish the app if the application is new.

      I started with the SDK being able to comunicate with the server and also create and delete applications but not uploading and publishing so I tried with the API. With the API I was able to perform the operations related with GET and PUT but not with DELETE seeming to me the way to call that operation similar than the put, so I was forced to combine the SDK and the API.

      I supose is not the proper way to do that but I don't know if there is something that have to be taken into account when working with Delete operations.

       

      With PUT operation as an example trying to publish an app it returns the following REST message

       

      {"id":"ea81f723-475f-4356-b31d-dae12983b8ca","createdDate":"2015-12-22T12:35:38.405Z","modifiedDate":"2015-12-22T12:35:39.733Z","modifiedByUserName":"SENSE\\comuser","owner":{"id":"76a556eb-cf1a-43f9-9efe-0cb2de121433","userId":"comuser","userDirectory":"SENSE","name":"comuser","privileges":null},"customProperties":[],"name":"Conector","appId":"","publishTime":"2015-12-22T12:35:39.717Z","published":true,"tags":[],"description":"","stream":{"id":"aaec8d41-5201-43ab-809f-3063750dfafd","name":"Everyone","privileges":null},"fileSize":145429,"lastReloadTime":"2015-12-17T15:56:52.000Z","thumbnail":"","savedInProductVersion":"2.1.1","migrationHash":"a9527c3f7197d59e79f5618a6900798d73ec9188","dynamicColor":"","availabilityStatus":0,"privileges":null,"schemaPath":"App"}

       

      But trying to delete the application it returns me an HTML code starting with:

       

      Aplicacion no encontrada System.Exception: The HTTP request header is incorrect: <!doctype html>

      <html>

        <head>

        <meta charset="utf-8"/>

        <meta http-equiv="X-UA-Compatible" content="IE=edge"/>

        <meta name="google" value="notranslate"/>

        <title>400 - Bad request</title>

        <link rel="shortcut icon" href="data:image/x-

       

      For the PUT operation I use the direction "/qrs/app/" + appId + "/publish" with the parameter "stream" specifying the stream id where I want to publish the application, with the Delete operation I use the direction "/qrs/app/"+applicationId with no parameters, I don't know if I have left something but I would like to know the proper way to perform the Delete operations.

       

      Thanks in advance for your help.