# REST API object definitions

**URL:** <https://discuss.elastic.co/t/rest-api-object-definitions/187170>\
**Category:** Kibana\
**Created:** [June 24, 2019, 4:24pm UTC](https://discuss.elastic.co/t/rest-api-object-definitions/187170 "2019-06-24T16:24:19Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matheu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matheu/32/48655_2.png) [@Matheu](https://discuss.elastic.co/u/Matheu)\
**Post date:** [June 24, 2019, 4:24pm UTC](https://discuss.elastic.co/t/rest-api-object-definitions/187170/1 "2019-06-24T16:24:19Z")

</div>

I'm trying to use the Create Object REST API I want to pass what I have obtained from a find call...

```
        "attributes": {
            "title": "ohip_request",
            "timeFieldName": "createdTime",
            "fields": "[{\"name\":\"_id\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_index\",\"type\":\"string\",\"count\":0,\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"name\":\"_score\",\"type\":\"number\",\"count\":0,\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false}...... lots more....

```

but this fails with:  
{"error":"no handler found for uri [/api/saved\_objects/index-pattern/a492d940-9407-11e9-bb2b-65c8f6e0978d?overwrite=true] and method [POST]"}

Where can I find the definition of the "attributes" object, so I can see what properties it has and how they should be set...

---

<div class="post-metadata">

**Author:** ![LizaD](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lizad/32/51074_2.png) [@LizaD](https://discuss.elastic.co/u/LizaD)\
**Post date:** [June 24, 2019, 4:26pm UTC](https://discuss.elastic.co/t/rest-api-object-definitions/187170/2 "2019-06-24T16:26:54Z")

</div>

Hi Matheu,

Here is our API documentation: [https://www.elastic.co/guide/en/kibana/master/api.html](https://www.elastic.co/guide/en/kibana/master/api.html)

Thanks,  
Liza

---

<div class="post-metadata">

**Author:** ![Matheu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matheu/32/48655_2.png) [@Matheu](https://discuss.elastic.co/u/Matheu)\
**Post date:** [June 24, 2019, 4:42pm UTC](https://discuss.elastic.co/t/rest-api-object-definitions/187170/3 "2019-06-24T16:42:51Z")

</div>

Sorry, but this documentation is so basic, it tells me nothing I need to know... All I can find from this document is that attributes has a title property...

Am I even able to pass a fields property in a create object call..? If so what does it look like?  
Is the example above correct..?  
Why is the above failing with a "no handler" error.  
Is the payload incorrect..

At the moment I'm just guessing at what is wrong...

---

<div class="post-metadata">

**Author:** ![LizaD](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lizad/32/51074_2.png) [@LizaD](https://discuss.elastic.co/u/LizaD)\
**Post date:** [June 24, 2019, 5:00pm UTC](https://discuss.elastic.co/t/rest-api-object-definitions/187170/4 "2019-06-24T17:00:07Z")

</div>

Hi Matheu:

I don't find much detail on it either, maybe @joshdover can help share some info on what that error means.

I did try the following short example using curl, it is not fully like yours, but it did not throw that error:

-H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d'  
{  
"attributes": {  
"title": "my-pattern2-\*",  
"timeFieldName": "createdTime",  
"fields": "[{"name":"\_id"}]"  
}  
}  
'

Also what version of Kibana are you using?

---

<div class="post-metadata">

**Author:** ![pgervais](https://avatars.discourse-cdn.com/v4/letter/p/65b543/32.png) [@pgervais](https://discuss.elastic.co/u/pgervais)\
**Post date:** [June 24, 2019, 5:11pm UTC](https://discuss.elastic.co/t/rest-api-object-definitions/187170/5 "2019-06-24T17:11:53Z")

</div>

i need exactly the same info. The docs are of no use at best. I shouldn't have to search through the code in order to get such a basic answer.  
As well, I create index with documents from logstash. I want to do visual after they have been created. Kibana does not create a useful index unless you manually select it and specify the timestamp format via kibana index management. How can I do this via REST?

---

<div class="post-metadata">

**Author:** ![LizaD](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lizad/32/51074_2.png) [@LizaD](https://discuss.elastic.co/u/LizaD)\
**Post date:** [June 24, 2019, 5:23pm UTC](https://discuss.elastic.co/t/rest-api-object-definitions/187170/6 "2019-06-24T17:23:25Z")

</div>

I understand Peter and agree the documentation can be improved, it is possibly lacking information since it is still listed as experimental, let's see what @joshdover thinks and how we can help.

---

<div class="post-metadata">

**Author:** ![joshdover](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joshdover/32/42020_2.png) [@joshdover](https://discuss.elastic.co/u/joshdover)\
**Post date:** [June 24, 2019, 7:50pm UTC](https://discuss.elastic.co/t/rest-api-object-definitions/187170/7 "2019-06-24T19:50:12Z")

</div>

Nothing is jumping out at me as obviously incorrect here. Some details that would help:

- Which version of Kibana are you using?
- Do you have Security enabled?
- What is the full curl command (without any auth credentials) that you are using?
- Do you have `server.basePath` configured in your kibana.yml? If so, you may need to include the basePath in the beginning of the URL.

---

<div class="post-metadata">

**Author:** ![pgervais](https://avatars.discourse-cdn.com/v4/letter/p/65b543/32.png) [@pgervais](https://discuss.elastic.co/u/pgervais)\
**Post date:** [June 24, 2019, 8:17pm UTC](https://discuss.elastic.co/t/rest-api-object-definitions/187170/8 "2019-06-24T20:17:29Z")

</div>

Josh,  
Maybe i need to open another thread to get answers to my questions ? I'm using 7.1.  
No security , no mods whatsover to installation.

_As well, I create index with documents from logstash. I want to do visual after they have been created. Kibana does not create a useful index unless you manually select it and specify the timestamp format via kibana index management. How can I do this via REST?_

---

<div class="post-metadata">

**Author:** ![joshdover](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joshdover/32/42020_2.png) [@joshdover](https://discuss.elastic.co/u/joshdover)\
**Post date:** [June 24, 2019, 8:32pm UTC](https://discuss.elastic.co/t/rest-api-object-definitions/187170/9 "2019-06-24T20:32:39Z")

</div>

Ah I think I just figured it out. It appears you're sending this request to Elasticsearch rather than Kibana. (localhost:5601 if running locally).

If you're using the Console app in the Kibana Dev Tools, this tool can only send requests to Elasticsearch. You'll need to use another way of sending requests other than Console.

---

<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:** [July 22, 2019, 8:33pm UTC](https://discuss.elastic.co/t/rest-api-object-definitions/187170/10 "2019-07-22T20:33:00Z")

</div>

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