Found similar issue reported in Same index-pattern created with kibana UI and REST command which got auto-closed due to lack of response.
Version: Kibana-oss 7.10.2
Issue: Say an index pattern say journal-2021.07.27 is created through Stack management page of Kibana UI.
Next, if using the kibana saved objects REST API, an index pattern with same name is created:
curl -XPOST http://localhost:5601/api/saved_objects/index-pattern/journal-2021.07.27 -H 'kbn-xsrf: true' -H 'Content-type: application/json' -d'{"attributes": {"title" : "journal-2021.07.27"}}'
Response -> {"type":"index-pattern","id":"journal-2021.07.27","attributes":{"title":"journal-2021.07.27"},"references":,"migrationVersion":{"index-pattern":"7.6.0"},"updated_at":"2021-07-29T05:19:30.633Z","version":"WzQsMV0="}
This creates two index patterns in kibana with exact same name, which is not expected and seems like a bug.
Any suggestions if its already fixed in recent versions of kibana?