Chanpreet kaur
Chanpreet kaur

Reputation: 43

Unable to fetch activity runs from ADF

I am trying to fetch all the activities of a pipeline running in azure data factory and used this as guide: Activity Runs. I am trying to implement this in postman to check the details.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/pipelineruns/{runId}/queryActivityruns?api-version=2018-06-01

used this to run the query. All my values for subscriptionId, resourceGroupName, factoryName and runID are correct. I know this as I am able to fetch the details about the pipeline using this as my guide: pipeline details and this gives the expected output.

my request body is: request body

my output is: enter image description here

I expected the values field to be populated with list of activities. And further my activities are in trigger mode only

Upvotes: 0

Views: 118

Answers (2)

Chanpreet kaur
Chanpreet kaur

Reputation: 43

Solved the problem by changing the request body:

{
    "filters": [],
    "orderBy": [
        {
            "orderBy": "ActivityRunStart",
            "order": "DESC"
        }
    ],
    "lastUpdatedAfter": "2824-07-01T07:36:18.68422787",
    "lastUpdatedBefore": "2024-07-01T09:21:58.3092"
}

enter image description here

I could not get the activities as the filter parameter and orderby parameter were not added

Upvotes: 1

Aswin
Aswin

Reputation: 7156

Since you have given correct run_id, pipeline name, resource group name, subscription details in the API, one possibility to get the empty response is that there are no activity runs associated with the pipeline run.

  • Verify that there are activity runs associated with the pipeline run. You can do this by going to the ADF portal and checking the pipeline run details.

  • If there are no activity runs associated with the pipeline run, then the response will be empty.

  • Try using a different tool to make the API call. For example, you can try using PowerShell or Azure CLI to make the API call and see if you get a different response. You can check in the Microsoft document on Activity Runs - Query By Pipeline Run itself. Click the Try it button in the code snippet and give all the details and check.

Upvotes: 1

Related Questions