How to get and create users in elasticsearch with API by using python

I want to get and create users in elasticsearch with python. I'm trying to use API. I'm following this documentation. I send a get request with Postman in this URL:


I send this request for getting users but I got this error message:

    "error": "no handler found for uri [/opendistro/security/api/internalusers] and method [GET]"

I also want to create a user with username and email but here I found this for creating user:

  "password": "kirkpass",
  "backend_roles": ["captains", "starfleet"],
  "attributes": {
    "attribute1": "value1",
    "attribute2": "value2"

There are no options for username and password

my two questions are:

  1. Why I'm getting an error when I try to get users?
  2. How can I create users with username and email by using an API


Do you have an openDistro installation? In this case you should ask here:

Be aware that openDistro of ElasticSearch is not the same as the one available by elastic. If you have an Elastic Installation you can check the API here:

This requires that you have at least the ElasticSearch Basic License(when using 6.8.0 or later or 7.1.0 or later) or a Gold License.

Best regards

1 Like

Thanks. I got my mistake. I thought openDistro is an inbuilt plugin of elasticsearch. Now, I'll install it.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.