Let's say I post a workitem to Revit engine using the following code
var response = await _flurlClient.Request("https://developer.api.autodesk.com/da/us-east/v3/workitems")
.PostJsonAsync(new
{
activityId = "ActivityID",
arguments = new
{
rvtFile = new
{
url = storageUrl,
Headers = new
{
Authorization = $"Bearer {accessToken}"
}
},
result = new
{
verb = "post",
url = $"{baseUrl}/api/result"
}
}
})
.ReceiveJson();
The response will contain the Id for this workitem. once the work item completes successfully, Forge calls my API endpoint with the output file. My endpoint is implemented as follows:
[HttpPost("Result")]
public async Task<IActionResult> PostResults()
{
await using (var fs = new FileStream("D://Test//l2.xlsx", FileMode.Create))
{
await Request.Body.CopyToAsync(fs);
}
return Ok();
}
The file is correctly saved but I can't get the associated workitem Id (not as a query parameter nor a header). This causes an issue, let's say I submitted two work items (A and B) when I receive a file how I can tell if it is related to work item A or B.