Alteryx Connect

Definitive answers from Connect experts.
How To: Use the Connect REST API with Designer This guide will walk you through how to login to the Connect API and download Connect entries in JSON format. Attached to this guide is a macro you can use to download all entries listed in an input file.   Prerequisites   Product - Alteryx Connect 2018.2+ Product - Alteryx Designer   Procedure (Alteryx Designer)   Log in to the REST API with your credentials. The API login endpoint is http://HOSTNAME:PORT/rest/1/login  In Designer, configure the URL of the Download tool to the API login endpoint. Set the HTTP Action to POST and pass your username and password in the payload data. In the DownloadHeaders field of the Download tool output, make note of the JSESSIONID. IMPORTANT: The DownloadData field also contains the JSESSIONID returned in the session_cookie field of the API response, but generally '=' is encoded to '\u003d'. The only value you need for the next step is JSESSIONID=xxxxxxxxxxxxxx NOTE: The JSESSIONID is valid for 30 minutes Make note of an xid from Connect. If you don't already have one, you can grab one from the URL of a Connect entry in Connect. Make a GET request on the Get Entry API endpoint. The Get Entry API endpoint is http://HOSTNAME:PORT/rest/1/entry/{xid} Example: http://localhost:1900/rest/1/entry/10b603fa-5c89-4bf6-b865-b243b303c760 In the basic Tab of the Download tool, select the Get Entry API endpoint as the URL In the headers tab, pass a variable called cookie with the value from step 3 (JSESSIONID=xxxx) Explore the Connect REST API documentation to learn more. Have fun!     Common Issues   I logged in successfully, but I get a 401 response when trying to get an xid. Typically this occurs when you are not passing a cookie containing an active JSESSIONID in the header of the request. Refer to Step 4 above. I logged in successfully, but I get a 400 response when trying to get an xid. Check your values in the Download Tool Headers and ensure that the name of the variable is cookie and the value is JSESSIONID={id}    Additional Resources   Connect REST API Documentation
View full article