azure-data-factoryazure-synapse

Azure Synapse API returns empty array with filters in POST request, but works without them


I'm trying to query pipeline runs in Azure Synapse using the Synapse REST API (queryPipelineRuns). When I make a POST request with empty Post body, it works and returns the pipeline runs. However, when I add filters such as lastUpdatedAfter or others (e.g., Status, PipelineName), the response is always an empty array [].

Here’s my POST request body that is returning an empty result:

{
    "method": "POST",
    "headers": {
        "Content-Type": "application/json"
    },
    "url": "https://WorkspaceName.dev.azuresynapse.net/queryPipelineRuns?api-version=2020-12-01",
    "connectVia": {
        "referenceName": "AutoResolveIntegrationRuntime",
        "type": "IntegrationRuntimeReference"
    },
    "body": {
        "lastUpdatedAfter": "2024-06-16T00:36:44.3345758Z"
    },
    "authentication": {
        "type": "MSI",
        "resource": "https://dev.azuresynapse.net"
    }
}

Solution

  • According to the MS document lastUpdatedAfter and lastUpdatedBefore are mandatory fields while applying filter. So, in the request body provide the value as below:

    {  
      "lastUpdatedAfter": "2024-06-16T00:36:44.3345758Z",  
      "lastUpdatedBefore": "2025-06-16T00:49:48.3686473Z"  
    } 
    

    enter image description here

    Then you will get the output as below:

    enter image description here

    For more information you can refer to this.