This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
We were wondering if it was possible to retrieve the workflows that are saved on the Gallery.
The reason for this is that there is a handy xml parser tool that allows you to parse the xml of an Alteryx workflow to give you tool details such as:
Input tool - [database where the data is coming from]
Formula tool - [what formulas are used]
Output tool - [database where the data is going]
The workflows that are saved on the Gallery however are stored in the MongoDB, but I assume that to download or run a workflow from the Gallery that there is a method of retrieving the workflow from the Mongo and converting it to its original form.
Does someone know the tool or method that is used to do this so that we might replicate it to pull off all of our workflows on the gallery and then analyse them using the above mentioned xml parser?
Many Thanks in advance.
Oli
Solved! Go to Solution.
Hi Dan,
Thanks for the link I had a look into it but maybe I am just terrible at reading the instructions given but I can't get the macro to work!
I replace the URL and Endpoint in the Macro and provide my admin key and secret but I get a 401 authorisation error.
Does the username have to be included in the URL?
In the meantime (as I haven't really used API before) I have set about making a Log Parser for Alteryx Engine Logs which we will use to read the logs and spit out the SQL tables involved and if they were read from or written to.
Useful for us as it will let us know where data is coming from and going to through Alteryx.
I'd like to use the xmls though!!
Thanks,
Oli
Hi @obridgeman
Do you have the Admin API enabled? The key and secret you need to provide are these 2
Dan
Hi Dan,
I do have the admin key enabled.
It could be that I am using the macro incorrectly and leaving the 'User%' in the string?
Or it could be that our Alteryx instance is behind a single sign on Windows Auth?
Thanks,
Oli
Endpoint URL string in the input box should be %User.GalleryBaseURL%%User.EndPoint1%. These variables correspond to 2 workflow constants defined in your main workflow.
If you're completely building your URL from scratch, make sure it looks like this
https://servername/gallery/api/admin/v1/workflows/
where servername is exactly the url you use to access the gallery.
Edit: did you download the sample that goes along with the macro. I found it was easier to work within the structure defined there. It also contains a list of valid endpoints
Dan
Hi!
Just to add something her; we have developed a workflow that pulls down and saves all assets to a share drive, the workflow is attached and uses the API that @danilang is outlining.
Something to note is that assets may download as .yxzp files because when published the user checked the option to include assets, therefor you will need to create a script which unpackages each of these (well at least we do).
We then use the conditional runner tool (part of the CReW macro pack) to then run a workflow which pulls all files out of the direcory and scans the XML for comment boxes.
I've also attached the script (I've had to change the extension to .txt rather than .bat because I could not attach that) that we trigger once the workflow is ran to unzip the files using the events tab.
Thanks for that Ben,
what version of Alteryx is that created in as the latest version I have access to is 2018.4 and I can't open it.
Thanks,
Oli
Hi @obridgeman
Edit the .yxmd file and any included macros directly in a text editor and change the second lines to <AlteryxDocument yxmdVer="2018.4"> and you should be good to go
Dan
Thanks for all your help dan, is the percent encoder macro a CREW Macro? That's the error I am stuck with at the moment as can't find 'Percent_Encoder.yxmc'.
Thanks,
Oli