Get Pipeline Runs by Workspace API always showing Empty response

Pavel Reynoso 0 Reputation points Microsoft Employee
2023-06-29T15:32:02.1666667+00:00

Following the documentation here:
https://learn.microsoft.com/en-us/rest/api/synapse/data-plane/pipeline-run/query-pipeline-runs-by-workspace

Is always returning empty response

I send this json

{
    "url": "https://{endpoint-name}.dev.azuresynapse.net/queryPipelineRuns?api-version=2020-12-01",
    "connectVia": {
        "referenceName": "AutoResolveIntegrationRuntime",
        "type": "IntegrationRuntimeReference"
    },
    "method": "POST",
    "headers": {
        "Content-type": "application/json"
    },
    "body": "{  \n  \"lastUpdatedAfter\": \"2023-06-28T00:00:00.3345758Z\",  \n  \"lastUpdatedBefore\": \"2023-06-28T11:37:16.3686473Z\"  \n}  ",
    "authentication": {
        "type": "MSI",
        "resource": "https://dev.azuresynapse.net/"
    }
}

get

{
	"value": [],
	"ADFWebActivityResponseHeaders": {
		"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
		"x-ms-correlation-request-id": "db847fb8-3aa2-429f-ad83-0372945f4aef",
		"x-ms-request-id": "555ede0c-7b64-4ebb-b874-4655baad1cc6",
		"Date": "Thu, 29 Jun 2023 15:19:16 GMT",
		"Server": "Kestrel;Microsoft-HTTPAPI/2.0",
		"Content-Length": "17",
		"Content-Type": "application/json; charset=utf-8"
	},
	"effectiveIntegrationRuntime": "AutoResolveIntegrationRuntime (West US 2)",
	"executionDuration": 0,
	"durationInQueue": {
		"integrationRuntimeQueue": 0
	},
	"billingReference": {
		"activityType": "ExternalActivity",
		"billableDuration": [
			{
				"meterType": "AzureIR",
				"duration": 0.016666666666666666,
				"unit": "Hours"
			}
		]
	}
}

value[] showing empty reponse while in the pipeline runs I get:
User's image

The pipelines were published and executed at the same time in order to get the Running pipelines

These are the filter with which I'm testing

{ "lastUpdatedAfter": "@{adddays(utcnow(),int(pipeline().parameters.QueryRunDays))}", "lastUpdatedBefore": "@{utcnow()}", "filters": [ { "operand": "PipelineName", "operator": "Equals", "values": [ "@{pipeline().parameters.PipelineName}" ] }, { "operand": "Status", "operator": "In", "values": [ "InProgress", "Queued" ] } ] }
QueryRunDays=-1
PipelineName=examplepipeline

ant my task looks like this
User's image

Can I get some help to check this in order to get correct data from the api call

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,375 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AnnuKumari-MSFT 34,556 Reputation points Microsoft Employee Moderator
    2023-06-30T18:16:57.92+00:00

    Hi Pavel Reynoso ,

    Welcome to Microsoft Q&A platform and thanks for posting your question here. Thankyou for the detailed screenshot of each and every component of your pipeline including monitoring as well. As per my understanding, you are not able to get the pipeline run details via REST API.

    Looking at the details of your pipeline execution, it looks like you have run the pipeline in Debug mode. REST API wont be able to fetch the details in debug mode.

    Kindly trigger the pipeline after you publish it. And then check if you are able to get the values correctly.

    Hope it helps. In case even after triggering the pipeline , it doesn't work, then please do approach back here for further discussion. Kindly accept the answer if it was helpful. Thankyou


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.