You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by Devin Pinkston <pi...@gmail.com> on 2015/10/16 02:13:05 UTC

rest api synchronize

I'm using the REST API to instantiate templates, start process groups, and
also remove those process groups.  However, when i try to delete a process
group through the REST API, I keep getting the following 409 response:

"This NiFi instance has been updated by 'anonymous'. Please refresh to
synchronize the view."

Am i missing something when using the REST API?

Thank you.

Re: rest api synchronize

Posted by Matt Gilman <ma...@gmail.com>.
Devin,

NiFi employs an optimistic locking scheme that requires clients to pass in
a revision when making a mutable request. The revision is comprised of a
version (a number that increments with each modification) and a client id.
The client id can be any string. Typically however, you'll use the client
id that's generated for you when you make your first request (like
retrieving the entire flow). You should continue to use this client id with
all subsequent requests. In order for a mutable request to be accepted, a
client must either have the current version or the client id that last
modified the flow. The second check allows clients to submit requests
asynchronous without having to wait for preceding requests to complete.

I am guessing that based on your error message your not including a client
id in your request and your revision is not current. Each successful
mutable request will contain the updated revision in the response.

Let me know if this helps. If not could you send the requests your making?

Thanks!

Matt

On Thu, Oct 15, 2015 at 8:13 PM, Devin Pinkston <pi...@gmail.com>
wrote:

> I'm using the REST API to instantiate templates, start process groups, and
> also remove those process groups.  However, when i try to delete a process
> group through the REST API, I keep getting the following 409 response:
>
> "This NiFi instance has been updated by 'anonymous'. Please refresh to
> synchronize the view."
>
> Am i missing something when using the REST API?
>
> Thank you.
>