Hey all, I'm looking to see if anyone has example analytic apps for using a file reference ID as described in Gallery API: Inputfiles Endpoint. As someone who is not very familiar with how these temporary files are stored on alteryx servers, anything would be helpful. I've tried a few variations and for each I receive a file not found error.
Any example workflows, input or direction as to where to look is appreciated.
Thank you
Assuming you have an analytic app with a File Browse tool, to upload a file into this tool, you will need to use the /user/v2/inputfiles endpoint. This endpoint will return you the reference Id, which you can use in the /user/v2/workflows/{appId}/jobs to submit the job.
You may want to review this https://community.alteryx.com/t5/Alteryx-Server-Knowledge-Base/How-to-Pass-in-Excel-Worksheet-Name-i... and use it as an example.
Hi,
Yue mentioned that we have to use the /user/v2/inputfiles endpoint. But i couldn't find any reference on how to use this endpoint.
I get this response:
{ "data": null, "exceptionName": "UnknownException", "innerExceptionMessage": "", "message": "Unknown error.\nInvalidOperationException\nRequestID: 29dc6e4f30334eaba707332d2e8efbb6" }
What exactly the body structure for the call?
Thank you.
@Abdulaziz-Aljandal Please use Postman or curl command for this endpoint. The interactive document is not able to post form data.
@CodyPedersen @Abdulaziz-Aljandal - Were you ever able to successfully use the InputFiles Endpoint using the Gallery API. I have a javascript application where I'm embedding my analytic app. Everything works except the File Browse tool, and I'm trying to figure out how to make it work. Any suggestions are appreciated!
@clarab do you have an example of how to make this request in postman? I have the following but I get an authorisation error.
Alternatively is it possible to use the download tool in Alteryx to publish the file?
@avanibhatnagar - Actually I used a workaround for now (I have been using this before the new API user/v2/inputfiles came).
The workaround is simple instead of taking the file via Browse tool. Just write the data to a table in the database and then take the parameters from an API call to query the database to get the "Uploaded data".
So, whenever a user uploads a file the data in the file goes to a database and then trigger the workflow with the required parameters to get the uploaded data.
@cgoodman3 The authorization should look like this:
The API key and secret are taken from My Profile > Keys. The user must have "Enable API" option set to Yes.
Thanks @clarab I've got it working when using the full API credentials, it doesn't work using the subscription (private studio) api credentials.
Just to follow up. I get the following error message when retrieving the job status.
The upload file is a .xlsx with only two columns and contains Sheet1 so I use the JSON body as suggested in this post - https://community.alteryx.com/t5/Alteryx-Server-Knowledge-Base/How-to-Pass-in-Excel-Worksheet-Name-i...
Could you provide help on this?