Dev Space

Customize and extend the power of Alteryx with SDKs, APIs, custom tools, and more.
SOLVED

How to open the App Interface of an Analytic App saved in Gallery when running using API?

amitupadhyay
8 - Asteroid

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?

5 REPLIES 5
patrick_digan
17 - Castor
17 - Castor

@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:

patrick_digan_0-1648209639928.png

 

 

amitupadhyay
8 - Asteroid

Thank you. This answers my question perfectly. I couldn't find it anywhere else. Really appreciate it.

patrick_digan
17 - Castor
17 - Castor

@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:

patrick_digan_0-1648212861528.png

 

PetrT
Alteryx
Alteryx

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/

amitupadhyay
8 - Asteroid

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.