# Error: "no handler found for uri \[/api/security/role/my\_kibana\_role?pretty\] and method \[PUT\]"

**URL:** <https://discuss.elastic.co/t/error-no-handler-found-for-uri-api-security-role-my-kibana-role-pretty-and-method-put/207482>\
**Category:** Kibana\
**Created:** [November 12, 2019, 9:57am UTC](https://discuss.elastic.co/t/error-no-handler-found-for-uri-api-security-role-my-kibana-role-pretty-and-method-put/207482 "2019-11-12T09:57:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniellienert](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniellienert/32/31435_2.png) [@daniellienert](https://discuss.elastic.co/u/daniellienert)\
**Post date:** [November 12, 2019, 9:57am UTC](https://discuss.elastic.co/t/error-no-handler-found-for-uri-api-security-role-my-kibana-role-pretty-and-method-put/207482/1 "2019-11-12T09:57:02Z")

</div>

Hey there,

I would like to add Kibana roles using the role management API as described in:

[https://www.elastic.co/guide/en/kibana/7.4/role-management-api-put.html](https://www.elastic.co/guide/en/kibana/7.4/role-management-api-put.html)

For a

```
PUT /api/security/role/my_kibana_role
{
  "metadata" : {
    "version" : 1
  },
  "kibana": [
    {
      "base": [],
      "feature": {
        "dashboard": ["read"]
      },
      "spaces": [
        "marketing"
      ]
    }
  ]
}

```

I only get the following error back:

```
{
  "error": "no handler found for uri [/api/security/role/my_kibana_role?pretty] and method [PUT]"
}

```

Currently I have the Basic licensed version of XPACK installed.

Is this API included in the Basic License, do I have to enable it through some config?

Any hints are appreciated 🙂

Thanks in advance,  
Daniel

---

<div class="post-metadata">

**Author:** ![azasypkin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/azasypkin/32/42216_2.png) [@azasypkin](https://discuss.elastic.co/u/azasypkin)\
**Post date:** [November 13, 2019, 1:14pm UTC](https://discuss.elastic.co/t/error-no-handler-found-for-uri-api-security-role-my-kibana-role-pretty-and-method-put/207482/2 "2019-11-13T13:14:47Z")

</div>

Hi @daniellienert,

It seems you're using Kibana own Dev Tools to hit Kibana API - it's not supported. Kibana Dev Tools can only query Elasticsearch APIs, but not the ones exposed by Kibana. For those you need to use `curl` or similar HTTP client (there is a `Copy as cURL` button on every such snippet in documentation):

```auto
curl -X PUT "localhost:5601/api/security/role/my_kibana_role" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d'
{
  "metadata" : {
    "version" : 1
  },
  "elasticsearch": {
    "cluster" : [],
    "indices" : []
  },
  "kibana": [
    {
      "base": [],
      "feature": {
       "discover": [
          "all"
        ],
        "visualize": [
          "all"
        ],
        "dashboard": [
          "all"
        ],
        "dev_tools": [
          "read"
        ],
        "advancedSettings": [
          "read"
        ],
        "indexPatterns": [
          "read"
        ],
        "timelion": [
          "all"
        ],
        "graph": [
          "all"
        ],
        "apm": [
          "read"
        ],
        "maps": [
          "read"
        ],
        "canvas": [
          "read"
        ],
        "infrastructure": [
          "all"
        ],
        "logs": [
          "all"
        ],
        "uptime": [
          "all"
        ]
      },
      "spaces": [
        "*"
      ]
    }
  ]
}
'

```

---

<div class="post-metadata">

**Author:** ![daniellienert](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniellienert/32/31435_2.png) [@daniellienert](https://discuss.elastic.co/u/daniellienert)\
**Post date:** [November 13, 2019, 2:11pm UTC](https://discuss.elastic.co/t/error-no-handler-found-for-uri-api-security-role-my-kibana-role-pretty-and-method-put/207482/3 "2019-11-13T14:11:28Z")

</div>

Thanks @azasypkin,

now I also found the note 🙂

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/b/2b580e1630278d00ad50076685054f5ceac3900c.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 11, 2019, 2:11pm UTC](https://discuss.elastic.co/t/error-no-handler-found-for-uri-api-security-role-my-kibana-role-pretty-and-method-put/207482/4 "2019-12-11T14:11:33Z")

</div>

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