The NiFi API can be used to start and stop processors or process groups, and this might solve your use case. But NiFi does not have an API to run a processor only once, immediately, separate from its configured schedule. I have solved similar problems in the past by creating two separate upstream sources - one for scheduled operation, and one for ad-hoc operation. GenerateFlowFile, GetFile, or similar processors can be used to inject a flowfile where you need to kick off the flow.
Thanks, James On Wed, Feb 21, 2018 at 5:57 PM, <[email protected]> wrote: > Thanks a lot. > > But I want to know if there is a REST API that triggers a dataflow on > demand? > I don't find the API in the page. > > > > > 发件人: > Charlie Meyer <[email protected]> > 收件人: > [email protected] > 日期: > 2018/02/22 09:36 > 主题: > Re: Is there a REST API to run a dataflow on demand? > > > > Yep, when you make the changes in the UI, open developer tools in your > browser and see what calls to the nifi api it is making then mimic those > with code. > > The nifi team also kindly publishes > https://nifi.apache.org/docs/nifi-docs/rest-api/index.html which help a > lot. > > Best of luck! > > -Charlie > > On Wed, Feb 21, 2018 at 7:34 PM, <[email protected]> wrote: > > > Hi, team, > > > > We set up several NiFi dataflows for data processing. > > These dataflows are configured to run once per day in the midnight. > > > > But sometimes, some dataflows are failed,I want to run the dataflow > again > > immediately after fixing the issue instead of waiting for running it in > > the midnight to > > make sure that the issue is really fixed. > > > > The only way I know to do this is to change the time of running the > > dataflow to the 5 mintutes from now for example > > and then change it back to midnight. > > > > It's a little inconvenient. > > > > Is there any REST API that I can use to trigger the dataflow on demand > > i.e. without change the time back and forth? > > > > Thanks > > > > Boying > > > > > > > > 本邮件内容包含保密信息。如阁下并非拟发送的收件人,请您不要阅读、保存、对 > 外 > > 披露或复制本邮件的任何内容,或者打开本邮件的任何附件。请即回复邮件告知发 > 件 > > 人,并立刻将该邮件及其附件从您的电脑系统中全部删除,不胜感激。 > > > > > > This email message may contain confidential and/or privileged > information. > > If you are not the intended recipient, please do not read, save, > forward, > > disclose or copy the contents of this email or open any file attached to > > this email. We will be grateful if you could advise the sender > immediately > > by replying this email, and delete this email and any attachment or > links > > to this email completely and immediately from your computer system. > > > > > > > > > > > > > > > 本邮件内容包含保密信息。如阁下并非拟发送的收件人,请您不要阅读、保存、对外 > 披露或复制本邮件的任何内容,或者打开本邮件的任何附件。请即回复邮件告知发件 > 人,并立刻将该邮件及其附件从您的电脑系统中全部删除,不胜感激。 > > > This email message may contain confidential and/or privileged information. > If you are not the intended recipient, please do not read, save, forward, > disclose or copy the contents of this email or open any file attached to > this email. We will be grateful if you could advise the sender immediately > by replying this email, and delete this email and any attachment or links > to this email completely and immediately from your computer system. > > > >
