Reputation: 3
I'm running OpenSearch and OpenSearch Dashboards 2.12 using Docker.
I need to create an index pattern (Dashboards Management > Index Patterns) from the command line using curl.
I tried the following command:
curl -u admin:admin -X POST "http://localhost:5601/api/saved_objects/index-pattern/index-pattern-id"
-H 'osd-xsrf: true' -H 'Content-Type: application/json' -d '{ "attributes": { "title": "logs", "timeFieldName": "timestamp" }}'
and recive this response:
{"type":"index-pattern","id":"my-index-pattern-id","attributes":{"title":"logs","timeFieldName":"timestamp"},"references":[],"migrationVersion":{"index-pattern":"7.6.0"},"updated_at":"2024-12-23T05:48:31.484Z","version":"WzEsMV0=","namespaces":["default"]}
but on web interface im cant see this index patern. Where are i`m wrong ?
Upvotes: 0
Views: 22