How to create or delete Kibana index pattern using API

Display, search, create or delete the Kibana index pattern using API.