You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by Matt Gibboney <ma...@gmail.com> on 2017/06/01 19:47:56 UTC

Manage NiFi Users via Rest Api

I am using Apache Nifi 1.1.1.  I want to be able to create, update, and
remove users without having to log on to the NiFi web page.  

I have been trying to use the NiFi processors to do this, and have only been
successful in using the GetHTTP processor to retrieve user information (GET
/tenants/users/{id}).  I used that user information as a template and
modified the "id" with a new UUID, and the "identity".  With this new flow
file I used the PostHTTP (POST /tenants/users) to try and add the new user,
but ended up with a 400 status code.

Any help in the right direction would be much appreciated.  



--
View this message in context: http://apache-nifi-users-list.2361937.n4.nabble.com/Manage-NiFi-Users-via-Rest-Api-tp2075.html
Sent from the Apache NiFi Users List mailing list archive at Nabble.com.

Re: Manage NiFi Users via Rest Api

Posted by Matt Gibboney <ma...@gmail.com>.
Matt, thanks for the information.  

I looked in the user log and found out that I didn't need to create a new
uuid for the user.  When I left those blank the user was created properly.  



--
View this message in context: http://apache-nifi-users-list.2361937.n4.nabble.com/Manage-NiFi-Users-via-Rest-Api-tp2075p2077.html
Sent from the Apache NiFi Users List mailing list archive at Nabble.com.

Re: Manage NiFi Users via Rest Api

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

When a request fails, the reason for the failure will is typically included
in the response body as text/plain. This should provide some insight about
why the requests aren't working. These same details should be in the
logs/nifi-user.log of your NiFi instance.

Also, I would suggest opening the Developer Tools of your web browser while
using the UI to see examples of the requests. The UI using the REST API
exclusively.

If you're attempting to create a new user based off of an existing user
you're probably having issues with the revision and/or identifier. NiFi
will generate the identifier and the revision must start at zero.

Thanks

Matt

On Thu, Jun 1, 2017 at 3:47 PM, Matt Gibboney <ma...@gmail.com>
wrote:

> I am using Apache Nifi 1.1.1.  I want to be able to create, update, and
> remove users without having to log on to the NiFi web page.
>
> I have been trying to use the NiFi processors to do this, and have only
> been
> successful in using the GetHTTP processor to retrieve user information (GET
> /tenants/users/{id}).  I used that user information as a template and
> modified the "id" with a new UUID, and the "identity".  With this new flow
> file I used the PostHTTP (POST /tenants/users) to try and add the new user,
> but ended up with a 400 status code.
>
> Any help in the right direction would be much appreciated.
>
>
>
> --
> View this message in context: http://apache-nifi-users-list.
> 2361937.n4.nabble.com/Manage-NiFi-Users-via-Rest-Api-tp2075.html
> Sent from the Apache NiFi Users List mailing list archive at Nabble.com.
>