In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

user/v2/inputfiles API not posting file into file browser t

vimalkumar2
5 - Atom

I am using below API calls to pass data file into my dummy alteryx workflow and download the same file.

 

Step1: http:{yourhostname}/api/user/v2/inputfiles

Step2: http:{yourhostname}/api/user/v2/workflows/{appId}/jobs  

Step3: http:{yourhostname}/v1/jobs/{id}/output/{outputId}

 

Error: Output API is not returning the file uploaded in 1st step.

 

 Here is my sample code to upload file by api/user/v2/inputfiles

 

using (var httpClient = new HttpClient())
{
using (var form = new MultipartFormDataContent())
{
form.Add(new StreamContent(File.OpenRead(filePath)), "inputFile", Path.GetFileName(filePath));


httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", tokenInfo);
var response = await httpClient.PostAsync("http:{yourhostname}/api/user/v2/inputfiles", form);
response.EnsureSuccessStatusCode();

var responseBody = await response.Content.ReadAsStringAsync();
return responseBody;
}

}

 

Kindly suggest if anything wrong with my code and workflow.

0 REPLIES 0
Labels
Top Solution Authors