# Kibana dataview namespace

**URL:** <https://discuss.elastic.co/t/kibana-dataview-namespace/317475>\
**Category:** Kibana\
**Created:** [October 26, 2022, 6:47am UTC](https://discuss.elastic.co/t/kibana-dataview-namespace/317475 "2022-10-26T06:47:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dms6978](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dms6978/32/112435_2.png) [@dms6978](https://discuss.elastic.co/u/dms6978)\
**Post date:** [October 26, 2022, 6:47am UTC](https://discuss.elastic.co/t/kibana-dataview-namespace/317475/1 "2022-10-26T06:47:33Z")

</div>

There is "namespace" properties of the data\_view object when create Data Views.  
(doc: [Create data view API | Kibana Guide [master] | Elastic](https://www.elastic.co/guide/en/kibana/master/data-views-api-create.html))

```auto
curl -X POST "kibanahost:port/api/data_views/data_view" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d'
{
 "data_view": {
    "title": "kibana_sample_data_ecommerce",
    "name": "Kibana Sample Data eCommerce",
    "namespaces": ["test", "default"]
  }
}
'

```

But returned message is

> "message":"[request body.data\_view.namespaces]: definition for this key is missing"}

Is the function not implemented? Or is there a problem with my query?

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [October 26, 2022, 10:54am UTC](https://discuss.elastic.co/t/kibana-dataview-namespace/317475/2 "2022-10-26T10:54:16Z")

</div>

Unfortunately the `namespaces` key is only available for the response object, but not on the request.

There is already a github issue discussing this, please feel free to chime in you have further feedback

> <https://github.com/elastic/kibana/issues/140426>
>
> Currently, the \`namespace\` parameter in the data view create API is not taken in…to account. In the code, it is some sort of a read-only parameter.
> 
> We should either update the documentation or fix that in the code.

---

<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:** [November 23, 2022, 10:54am UTC](https://discuss.elastic.co/t/kibana-dataview-namespace/317475/3 "2022-11-23T10:54:56Z")

</div>

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