参考 https://www.cnblogs.com/dance-walter/p/10471950.html
参考 https://www.elastic.co/guide/en/kibana/current/saved-objects-api-create.html
如果需要认证,使用curl保留cookie的方式:
curl -c cookie.txt -XPOST -H 'Content-Type: application/json' -H 'kbn-xsrf: anything' "http://localhost:5601/api/security/v1/login" -d"{\"username\": \"elastic\", \"password\": \"elastic\"}" curl -b @cookie.txt -f -XPOST -H 'Content-Type: application/json' -H 'kbn-xsrf: anything' "http://localhost:5601/api/saved_objects/index-pattern/aaaa" -d"{\"attributes\":{\"title\":\"cus*\"}}"