In the Find API, there is a has_reference parameter which is an object with fields type and id. However,
- There is no example I can find of how to format that as a URL (e.g., for a curl get)
- This comment implies that I can send the request as JSON. But my attempts to do so does not work
curl -b cookie.txt -k -H 'Content-Type: application/json' -XGET 'https://localhost:5601/api/saved_objects/_find' -d '
{
"type": "visualization",
"hasReference": {
"type": "index-pattern",
"id": "728b8d30-5977-11ea-a830-91c011d847a4"
}
}
> '
{"statusCode":400,"error":"Bad Request","message":"[request query.type]: expected at least one defined value but got [undefined]"}
- Note that if I include the type in the URL I will get data but it is obvious that the hasReference parameter as JSON request body was not processed.
Does anyone know how to either format a has_reference parameter or in general, send GET requests as JSON body to Kibana?