如何从Azure中的Web API应用运行每周报告 [英] How to run weekly reports from an Web API app in Azure

查看:88
本文介绍了如何从Azure中的Web API应用运行每周报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们的 Azure App Service Web应用程序 , 和 ASP.NET Web API

In our Azure App Service Web App, with ASP.NET Web API and Azure SQL Server database, how can we automate the process of running our weekly reports from an Web API app in Azure? Note: We don't mean running custom reports such as Azure resource usage reports etc. We're talking about our own business related reports that need to run automatically weekly. Does Application Insights service has that functionality or something else?

推荐答案

@namwam,根据情况的不同,可能会有不同的方法来设计和安排报告的自动化,因为报告可能需要Azure SQL Server数据库中的数据,您可以创建一个Web作业以从数据库中获取数据以生成 您需要的报告并使用Azure Scheduler对其进行安排,请参考https://azure.microsoft.com/en-us/services/scheduler/.计划作业后,可以利用Azure Scheduler API从Webapi运行它,也可以计划作业在以下位置运行 重复间隔.

@namwam, depending on the scenario, there might be different ways you can design and schedule automation of reports, since the report might need data from your Azure SQL Server Database, you can create a web job to fetch data from your database to generate the report you need and schedule it with Azure Scheduler, please refer to https://azure.microsoft.com/en-us/services/scheduler/. Once the job is scheduled, you can leverage Azure Scheduler API to run it from your webapi or you can schedule the job to run at recurring intervals.

下面是用于运行计划作业的REST API调用.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}/run?api-version=2016-03 -01
Below is the REST API call to run a scheduled job.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}/run?api-version=2016-03-01


这篇关于如何从Azure中的Web API应用运行每周报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆