I have an Analytic App saved in the Private Studio of my organisation's Gallery. The App contains various user interface tool inputs. How can we access the App User Interface when running the app from an API call?
Solved! Go to Solution.
@amitupadhyay Great question! When running via the API, you can't really access the interface; you can send through the appropriate variables though. You'll need to send json through the payload/body of the POST request. The format is like this:
{"questions": [ { "name": "NAME_OF_INTERFACE_TOOL", "value": "VALUE_TO_SEND" },
{"name": "Second_Tool", "value": "Second_Value" }]}
To get the names of your interface tools, see the workflow tab and use the Name column:
Thank you. This answers my question perfectly. I couldn't find it anywhere else. Really appreciate it.
@amitupadhyay You bet! For what it's worth, The interactive docs may be helpful if you haven't used those before. They're part of the gallery (https://server.domain.com/gallery/api-docs/#!/workflows.json/EnqueuePOST , change out for your server.domain) For the jobs endpoint, they have a model schema on the bottom right which is what I put in my previous post:
Hi, if I understood your use case correctly, you should first call GET /v1/workflows/{appId}/questions/ endpoint to get your app interface parameters. You can build key/value pairs for those "questions" then and post the request to POST /v1/workflows/{appId}/jobs/
Yes, I will be doing the same process. First to gather the questions using GET request and then after assigning values to acquired questions I will give POST request. I am currently facing some API access issues with the admin rights. Otherwise, I would have been informed if the solution works or not.
Thank you for your help.