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.