3 Replies Latest reply: Apr 2, 2018 3:14 AM by sudeep pakalakunja RSS

    App Object Approval

    sudeep pakalakunja

      Hi Everyone,

       

      I need some information on app objects( sheets) approval. Is it same as app objects publish. In the development hub i can see only the end point for publish in the site. Can anybody help me out with some information on this?

       

      Thank you in advance.

        • Re: App Object Approval
          Miguel Lemos Dias

          Hello,

           

          Have you seen this:

           

          Have a look at Qlik Sense QMC Utilitiesif helps

          Sheet Approver

          The Sheet Approver enables users to approve published sheets in an app, thus, making them base sheets of the Qlik Sense application. In addition, it's possible to un-approve sheets as well and push them back to the community.

           

          I've managed to do it using the REST API. I can tell you how if you want to do it this way (programmatically).

           

          Best regards

          Miguel Dias

            • Re: App Object Approval
              Miguel Lemos Dias

              Hi,

               

              Here's how to use REST API (QRS) to approve a sheet:

              • Connecto to QRS using a about request (GET): https://<server>/qrs/about?xrfkey=0123456789abcdef
              • Discover the sheet object IDs (in QMC->App Objects)
              • Create a JSON object with a list of the App Objects to be approved:

              { items: [{

                          type: "App.Object",

                          objectID: 'b9f0845e-5e22-499e-9586-86123024aa23'

                      },

              {

                          type: "App.Object",

                          objectID: 'f8a7c893-9ccf-4031-9400-42a283cfb3fc'

                      }

              ] }

              • Use this object as the body (application/json) of the request (POST): https://<server>/qrs/selection?xrfkey=0123456789abcdef
              • This request will respond with a JSON (the selection object)
              • Get the id of the selection
              • Create a new JSON object (set the date to current time):

              {

                      "latestModifiedDate": "2018-01-04T17:22:00.000Z",

                      "type": "App.Object",

                      "properties": [{

                          "name": "approved",

                          "value": true,

                          "valueIsDifferent": false,

                          "valueIsModified": true

                      }]

                  }

              • Use the ID of the selection in the previous step and paste on the next request. Use the JSON as the body of the request (PUT): https://<server>/qrs/selection/SELECTION_ID/app/object/synthetic?xrfkey=0123456789abcdef
              • View the response to confirm it was successfull
              • Delete the selection (it is no longer needed). Make this request using again the selection ID (DELETE): https://<server>/qrs/selection/SELECTION_ID?xrfkey=0123456789abcdef

              Using POSTMAN and notepad to create the JSONs it is possible to do this. Later it can be done in C# or with some other programming language.

               

              Best regards

              Miguel Dias