I have followed the shorten_url api documentation to create a new shortened URL, however in response I am only getting a confirmation and not the urlID as per the documentation.
I am doing this via Kibana's dev-tools:
Request:
POST /api/shorten_url
{
"url": "/app/dashboards#/view/1d73b1f0-fe7d-11ea-9dd2-93882e373ff0?_a=(description...."
}
Response:
#! Deprecation: [types removal] Specifying types in document index requests is deprecated, use the typeless endpoints instead (/{index}/_doc/{id}, /{index}/_doc, or /{index}/_create/{id}).
{
"_index" : "api",
"_type" : "shorten_url",
"_id" : "3JqrZXUByUcARzs8PpFk",
"_version" : 1,
"result" : "created",
"_shards" : {
"total" : 2,
"successful" : 1,
"failed" : 0
},
"_seq_no" : 7,
"_primary_term" : 1
}
Also no new URL object gets created under saved objects. Could anyone help?
Update:
If I do this using curl from command line it works and returns the urlId.... But still curious why is isn't the same response from dev-tools.
I am assuming this is because dev-tools sends the command towards elasticsearch while with curl we send the command towards kibana (curl localhost:5601/api/shared_url) which basically tells me thath this is a kibana API and not an ES API. Is that correct?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.