Get Pipeline Runs by Workspace API not functioning as expected

Max 31 Reputation points
2022-03-24T07:48:54.533+00:00

Calling the Get Pipeline Runs by Workspace API does not produce the expected results. Calling the API without any filters / sorts in the body produces a paged list of 100 pipeline runs, but as soon as any of the following are passed as body the result set is empty (even though they should surely produce results).

{ "lastUpdatedAfter": "2022-03-01T00:00:00.0000000Z" }

Or

{ "filters": [ { "operand": "Status", "operator": "Equals", "values": [ "Succeeded" ] } ] }

Or

{ "continuationToken": "<Token for next page>" }

All return:

{ "value": [] }

While calling the API with the following body (empty) returns a list of runs (including status "Succeeded", for example).

{}

Any other interactions in the body (sorts, filters, etc.) all lead the API to return an empty value. Playing around with the capitals on the operators (e.g. using "status" instead of "Status") return an error, so the syntax is not the issue here.

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,038 questions
{count} votes

Accepted answer
  1. AnnuKumari-MSFT 33,636 Reputation points Microsoft Employee
    2022-03-28T09:06:57.587+00:00

    Hi @Max ,

    Welcome to Microsoft Q&A platform and thankyou for posting your query.

    As I understand your query, you are trying to fetch the pipeline run history by using a REST API URL inside web activity of Azure Synapse Pipelines. But it's not giving proper result when you are trying to filter out based on few conditions.

    I tried to reproduce the same by creating a Pipeline in my Synapse workspace and adding Web activity having the REST API given in the document: Query Pipeline Runs By Workspace . This is how my configuration looks like inside the Web Activity:

    187357-image.png

    I tried with following filters and it worked well:
    1. Filter 1 : Based on LastUpdated Time:

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

    2. Filter 2: Based on LastUpdated Time as well as PipelineName:

    {  
      "lastUpdatedAfter": "2018-06-16T00:36:44.3345758Z",  
      "lastUpdatedBefore": "2022-06-16T00:49:48.3686473Z",  
      "filters": [  
        {  
          "operand": "PipelineName",  
          "operator": "Equals",  
          "values": [  
            "Pipeline 1"  
          ]  
        }  
      ]  
    }  
    

    3. Filter 3: Based on LastUpdated Time as well as RunStatus:

    {   
      "lastUpdatedAfter": "2018-06-16T00:36:44.3345758Z",  
      "lastUpdatedBefore": "2022-06-16T00:49:48.3686473Z",  
      
      "filters": [  
        {  
          "operand": "Status",  
          "operator": "Equals",  
          "values": [  
            "Succeeded"  
          ]  
        }  
      ]  
    }  
    

    Here is the output what I get:
    187462-image.png

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you.
      Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators

0 additional answers

Sort by: Most helpful

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.