Stop and start Synapse pipeline triggers using pipeline

Kumar, Arun 336 Reputation points
2024-09-12T13:13:06.59+00:00

Hello,

Is there a way to stop and start triggers using a Synapse Pipeline. I have tried with API mechanism like below

https://management.azure.com/subscriptions/{subscription_id}/resourceGroups/{wfrd-syn-dev-rg}/providers/Microsoft.Synapse/triggers?api-version={api_version}

But its returning NULL values. The scope i used is https://management.azure.com/.default.

Wondering anyone tried and successful.

Thanks,
Arun

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.
4,997 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Smaran Thoomu 16,890 Reputation points Microsoft Vendor
    2024-09-12T19:38:33.85+00:00

    Hi @Kumar, Arun

    Thank you for using Microsoft Q&A platform and thanks for posting your question here.

    Yes, you can stop and start Synapse pipeline triggers using a Synapse Pipeline. You can use the REST API to stop and start triggers. The API endpoint you are using is correct, but you need to provide the trigger name in the URL.

    Here is an example of how to stop a trigger using the REST API:

    POST {endpoint}/triggers/{triggerName}/stop?api-version=2020-12-01
    

    User's image

    To start a trigger, you can use the following API:

    Make sure to replace the placeholders with the appropriate values for your Synapse workspace. Also, make sure that you have the appropriate permissions to stop and start triggers.

    POST {endpoint}/triggers/{triggerName}/start?api-version=2020-12-01
    

    User's image

    Make sure to replace the placeholders with the appropriate values for your Synapse workspace. Also, make sure that you have the appropriate permissions to stop and start triggers.

    For more information, refer this article: Start Trigger & Stop Trigger

    Similar thread: To stop all the triggers Via API

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.


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.