# Create data view api

**URL:** https://discuss.elastic.co/t/create-data-view-api/324641
**Category:** Elasticsearch
**Created:** [February 3, 2023, 10:52am UTC](https://discuss.elastic.co/t/create-data-view-api/324641 "2023-02-03T10:52:23Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Neelam\_Zanvar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/neelam_zanvar/32/103116_2.png) [@Neelam\_Zanvar](https://discuss.elastic.co/u/Neelam_Zanvar)
#### Post date: [February 3, 2023, 10:52am UTC](https://discuss.elastic.co/t/create-data-view-api/324641/1 "2023-02-03T10:52:23Z")

</div>

Hi  
I have filebeat installed on one machine. and elasticsearch and kibana on one machine. and logstash on another machine. I am using an ansible playbook which picks logs using filebeat and ships it to logstash. Eevrything is working fine. index pattern is also getting created. But getting an issue while creating data view.  
curl -X POST "elasticip:5601/api/data\_views/data\_view" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d'  
{  
"data\_view": {  
"title": "logstash-\*",  
"name": "My Logstash Data View"  
}  
}  
' -u user:pwd

but getting a 404 not found error. Even when i try to execute this command manually on elastic machine. Note elastic is a private ip. Ansible m/c has a public ip

---

<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: [March 3, 2023, 10:52am UTC](https://discuss.elastic.co/t/create-data-view-api/324641/2 "2023-03-03T10:52:30Z")

</div>

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