4 Replies Latest reply: Sep 15, 2017 6:05 AM by 艺 夏 RSS

    Is there an NPrinting API command line client?

    Kevin Pinto

      We have NPrinting 17.4.1 (June 2017) and the API looks good.  We want to use it to trigger an NPrinting task after the source dashboard has been reloaded in Publisher.

       

      Is there a Windows command line client for the NPrinting API, for at least the TaskExecutions?

       

      Qlik NPrinting API

       

      If not, I can write my own, but would prefer to not reinvent the wheel.

        • Re: Is there an NPrinting API command line client?
          艺 夏

          Hi Kevin,

           

          I'm writing the command line client now and I'm troubled by NTLM token, I would like to ask if you have written this client and have solved the problem?

           

          In the official document, I noticed that there was a sentence like this:

          Javascript clients must pass the NTLM token using XHR credentials.

          JSA.png

          I don't know how to implement it in my code... Looking forward to your reply.

           

          Thanks & Regards,

          Shyee

            • Re: Is there an NPrinting API command line client?
              Kevin Pinto

              Sorry, I haven't been able to do any work on this.  I wish Qlik would provide a simple command line client to automate basic tasks, including starting a task.

              • Re: Is there an NPrinting API command line client?
                Ruggero Piccoli

                I'm not a developer, so I asked the help of a colleague here who suggest:

                 

                It depends on the library you want to use. For example, if you use jquery, you need only to add the parameter xhrFields.withCredentials to the call.

                Code sample:

                $.ajax({

                   type: "GET",

                   url: service_url,

                   dataType: "json",

                   xhrFields: {

                       withCredentials: true

                   },

                   error: function(XMLHttpRequest, textStatus, errorThrown) { ajaxError(XMLHttpRequest, textStatus, errorThrown); },

                   success: function(json) { DoSomething(json); }

                });

                 

                 

                Best Regards,

                Ruggero

                ---------------------------------------------

                When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.