I need to retrieve azure data factory pipelines execution logs. I've tried with Web Acticity by using the following request:
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelineruns/{runId}?api-version=2018-06-01
Unfortunatelly I have the following error:
Invoking Web Activity failed with HttpStatusCode - 'NotFound', message - 'The requested resource does not exist on the server. Please verify the request server and retry'
Should I set some additionall configuration to be able to retrieve these logs?
CodePudding user response:
You can get a list of pipeline runs using
And here is a simple WebActivity setup:
Input
{
"url": " https://management.azure.com/subscriptions/b83c1td3-c5b6-44fb-v5ba-2b83a074c13f/resourceGroups/myrg/providers/Microsoft.DataFactory/factories/ktestadf/pipelineruns/0bdaba11-47b7-4885-9796-5801b4bb856a?api-version=2018-06-01 ",
"method": "GET",
"headers": {
"Content-Type": "application/json"
},
"authentication": {
"type": "MSI",
"resource": " https://management.azure.com/ "
}
}
You can get a pipeline run ID from here manually to test.
I did repro before posting this and the only reason this error pops is cause any value you provided is wrong or does not already exist (in case of pipeline run id)