Create index-patterns from console with Kibana 6.0 or 7+ (v7.0.1)

The URL has been changed in version 6.0.0, here is the new URL:

http://localhost:9200/.kibana/doc/doc:index-pattern:my-index-pattern-name 

This CURL should work for you:

curl -XPOST "http://localhost:9200/.kibana/doc/index-pattern:my-index-pattern-name" -H 'Content-Type: application/json' -d'
{
  "type" : "index-pattern",
  "index-pattern" : {
    "title": "my-index-pattern-name*",
    "timeFieldName": "execution_time"
  }
}'