Document ID from logs

I'm using the REST query API to retrieve certain logs from Logstash. For representation I just want to simply present the requested data as a (perma)link to the results on Kibana itself. The 'View single document' guides me directly to that if I were to do this manually. But I wish to do this dynamically based on the API response.

For now the only value I'm missing to construct the URL to a document is the document ID.

The link looks like this: https:///app/kibana#/doc/<doc_id>/<logstash_index>/fluentd?id=<kibana_id>

So the parameters are:

  • Host (resolvable because this is a constant)
  • Document ID (problematic, I can't find a relation anywhere)
  • Logstash index (directly retrievable from the API response)
  • Kibana _id (directly retrievable from the API response)

The missing factor for constructing the URL is the document ID. I've tried executing multiple API queries to see if one would include a document ID, but no success. Is it at all possible to retrieve it? It seems that there must be a link between the ID and the results of the API response, as their containing data is almost identical.

I'm fairly new to using Kibana and its endpoints so please forgive my ignorance! :slight_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.