Connect to your Alteryx Server APIs and string together calls to manage workflows, users, collections, and permissions. All versions of the APIs are accessible through this tool.
* pip_system_certs enables python to use the OS Certificates to verify SSL Certs.
In the event of SSL verification errors, private certs can be added using the below guide. Consult your IT admin before making changes to certificates.
Adding-Certificates-to-newer-python-based-connectors
Python Packages required: oauthlib, requests_oauthlib
Compatible with Designer and Server 2021.4
Initial release.
Compatible with AMP and e1 engine.
Known Limitation
DCM not supported yet.
This tool uses a .yxi file format. A .yxi file is a package that includes an Alteryx Tool and all of its dependencies zipped into a single file. When this file is imported into Alteryx, the tool is added to the tool palette in the category specified by the tool.
When sharing a workflow that uses a .yxi tool, the tool is not included and must be installed by the recipient.
This is super useful - it's the API toolkit that the server has been lacking all this time!
Thank you
I've very happy there is a supported tool for the Gallery API, so first of all, thank you Alteryx.
It appears to work well when testing as I successfully retrieve records both in the authentication output and the success output anchor; though I get a lot of (seemingly inconsequential) field conversion errors for different endpoints:
/v3/collections:
/v3/users:
/admin/v2/users:
/v3/workflows:
Would you be able to look into removing these field conversion errors please for your next version? Assuming it's not only me seeing them when I use the tool.
That would be much appreciated,
Tim
@TimManning0422, Thank you for the feedback. You are correct that the conversion errors are inconsequential. This part of the macro is there to fill in metadata for the expected responses, and those values are in a table that is then filtered before being rolled up with a crosstab. I agree that it shouldn't have any conversion errors when run successfully. The good news is there should be a way to clean that up so these don't appear. I've added this to the list of enhancements for the next version.
- Jarrod
@JarrodT thanks for the response.
The only other bit of feedback I have at the moment is the speed of the tool for applications such as event triggering.
My understanding is that this tool needed to be python based for better reliability, but having to open python, activate the environment etc takes a long time.
It would be great if (even just for the POST call to trigger gallery jobs) there was an option to not use python, but instead use alteryx's native tools for better performance in workflows which are running sub 1 minute.
Once again, thank you for building an easy to use tool for calling the API, hopefully the above is possible (though I'm confident the field conversions from my comment above are much easier to deal with!).
Tim
@TimManning0422 v1.2.2 includes the conversion error fix. Thank you for your suggestion!
Can this be used to download workflows? If so how?
@csh8428, Yes. You can download workflows via the API using one of the following GET Endpoints:
/admin/v1/{appId}/package
/v1/workflows/{appId}/package
/v3/workflows/{workflowId}/package
Getting this error? Is there anything I need to do to fix this?
Error: Server API (1): HTTPSConnectionPool(host='myserver.mycompany.com', port=443): Max retries exceeded with url: //oauth2/token (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)')))
Error: Server API (1): Tool #684: The test "Error retrieving authorization token" failed: ExpectedNumRecords==0, NumRecords(#1)==1
Error: Server API (1): This machine is missing the following package: pip_system_certs
UPDATE
I figured out I needed to install the package as an admin but that did not seem to fix the authorization problem. Still getting this error now:
Error: Server API (1): Tool #684: The test "Error retrieving authorization token" failed: ExpectedNumRecords==0, NumRecords(#1)==1
I have Access Key and Secret I am using from the Gallery (was just granted API permission) -- do I have to be a full admin for this to work?
Hi, @aehrenwo. If you have API keys, then you should be able to at least authenticate. Some endpoints are admin only and some are accessible to both the admin and user. Are you able to test your API key and secret in the swagger documentation? Also, double check that the keys are copying correctly and you are directing to the right server url. Let me know if that doesn't work. Thanks!
I am getting the same "Max retries exceeded with URL" error. I had just connected a few minutes before and didn't change anything. I can still authenticate in swagger. I am an admin. I tried re-opening designer.
Hi, @StevenWhite. This is showing a certificate verification error. This is usually caused by self-signed certificates that haven't been added to the local machine's cert store. Either your IT can add the certificate, or you can add it locally.
Go through Step 6 here:
Then add the certificate to the MMC:
Let me know if you have any questions or if this doesn't resolve the issue.
Thanks!
Jarrod
@JarrodT I'm still getting the same error. We also tried adding the full certificate to C:\Program Files\Alteryx\bin\RuntimeData\Certificates where python was looking for it. I still keep getting the same error.
Installing pip_system_certs from inside the Alteryx python tool helped fix a similar error @Razb
I already had pip_system_certs installed. We were given a custom version of this tool that is less strict on the cert verification. And that worked for us.
Does this installer generate a log file if there are errors installing?
Installing this on a 22.3 Server and the installer never returns with the "Installation Successful" message.
The Server API Tool does show up with it's icon in the Developer tools section of Designer, but when you drag in onto a workflow you get the blue circle icon and message that the Server API Tool.yxmc can't be found.
@dheissner, did you install the yxi for "all users" or "my account"?
"All Users" will save the tool to ProgramData\Alteryx\Tools and
"my account" will save the tool to AppData\Roaming\Alteryx\Tools
Right-click on the icon and check the path it's using when attempting to open the macro - that will be the nested folder name in the corresponding Tools directory above
Did you restart Designer after installing it? (restart is necessary if it's the first time you are installing that particular yxi's "version")
@JarrodT we tried installing both ways (all users and my account). The yxmc file is out in both locations (ProgramData.. and AppData...) under ServerAPI_1_2\Supporting_Macros.
It's odd that we never get the message box that the install completed? We can restart Designer as we may not have...
@Razb This is a supported tool, so I would refer you to Alteryx support to get a version that works for your environment.