04/13/2023, 1:37 PM
Hello chaps. I’ve got a c# azure function. Can I use this to invoke the prefect cloud to schedule a job? Or rather invoke a job?

Bianca Hoch

04/13/2023, 5:20 PM
Hello! You could make an an API call to Prefect from your C# Azure Function. It would look something like this: 1. Retrieve an API key from Prefect, which is needed to authenticate your requests. 2. Include a reference to
in your C# Azure Function for making HTTP requests. 3. Instantiate an
, and set the required headers, with the API key as a Bearer token. 4. Create a JSON string representing a POST request to create a new flow run (use the flow's ID). 5. Send the POST request to the Prefect REST API and verify the response. You can read the REST API documentation at