Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask 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