# "error": "no handler found for uri

**URL:** https://discuss.elastic.co/t/error-no-handler-found-for-uri/145976
**Category:** Kibana
**Created:** [August 24, 2018, 9:16pm UTC](https://discuss.elastic.co/t/error-no-handler-found-for-uri/145976 "2018-08-24T21:16:48Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ccutmt](https://avatars.discourse-cdn.com/v4/letter/c/ee7513/32.png) [@ccutmt](https://discuss.elastic.co/u/ccutmt)
#### Post date: [August 24, 2018, 9:16pm UTC](https://discuss.elastic.co/t/error-no-handler-found-for-uri/145976/1 "2018-08-24T21:16:48Z")

</div>

Hi,

I'm trying to create a new index pattern using the Kibana API and from Dev tools I'm executing this simple code reproduced from the documentation:

```
POST api/saved_objects/index-pattern/testpattern
{
  "attributes": {
    "title": "testpattern-*"
  }
}

```

The response I'm getting is the following:

```
{
  "error": "no handler found for uri [/api/saved_objects/index-pattern/testpattern] and method [POST]"
}

```

Any ideas what I'm doing wrong please? My apologizes for my ignorance but this is the first time using this command and with other I've worked but with this one I can't quite get the hold of it. My final goal is to import a whole index-pattern.

Any help is appreciated.

Thanks

---

<div class="post-metadata">

### Author: ![Bargs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bargs/32/5429_2.png) [@Bargs](https://discuss.elastic.co/u/Bargs)
#### Post date: [August 27, 2018, 4:18pm UTC](https://discuss.elastic.co/t/error-no-handler-found-for-uri/145976/2 "2018-08-27T16:18:55Z")

</div>

Hi @ccutmt

The Dev Tools app is only for communicating with Elasticsearch. It doesn't work with Kibana's APIs. You'll need to use something like cURL or Postman to work with the Kibana APIs.

---

<div class="post-metadata">

### Author: ![ccutmt](https://avatars.discourse-cdn.com/v4/letter/c/ee7513/32.png) [@ccutmt](https://discuss.elastic.co/u/ccutmt)
#### Post date: [August 28, 2018, 10:42pm UTC](https://discuss.elastic.co/t/error-no-handler-found-for-uri/145976/3 "2018-08-28T22:42:55Z")

</div>

Hi @Bargs,

What I've done to work is altered POST method to be as follows:

```
POST api/saved_objects/index-pattern/
{
  "id" : "my-pattern",
  "attributes": {
"title": "my-pattern-*"

  }

} 

```

And the response was the following:

```
{
  "_index": "api",
  "_type": "saved_objects",
  "_id": "index-pattern",
  "_version": 1,
  "result": "created",
  "_shards": {
    "total": 2,
    "successful": 1,
    "failed": 0
  },
  "_seq_no": 0,
  "_primary_term": 1
} 

```

In this case the index-pattern will be named as

> api

Therefore, to have an index pattern named 'my-pattern' , the POST request should be as follows:

```
POST my-pattern/saved_objects/index-pattern/
{
  "id" : "my-pattern",
  "attributes": {
    "title": "my-pattern-*"

  }

}

```

The response was the following:

```
{
  "_index": "my-pattern",
  "_type": "saved_objects",
  "_id": "index-pattern",
  "_version": 1,
  "result": "created",
  "_shards": {
    "total": 2,
    "successful": 1,
    "failed": 0
  },
  "_seq_no": 0,
  "_primary_term": 1
}

```

Then, for my specific index pattern, I've added my specific index mappings in the POST request.

---

<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: [September 25, 2018, 10:54pm UTC](https://discuss.elastic.co/t/error-no-handler-found-for-uri/145976/4 "2018-09-25T22:54:45Z")

</div>

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