# Show latest document data on the dashboard

**URL:** https://discuss.elastic.co/t/show-latest-document-data-on-the-dashboard/191945
**Category:** Kibana
**Created:** [July 24, 2019, 5:14am UTC](https://discuss.elastic.co/t/show-latest-document-data-on-the-dashboard/191945 "2019-07-24T05:14:47Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![syedsfayaz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/syedsfayaz/32/46657_2.png) [@syedsfayaz](https://discuss.elastic.co/u/syedsfayaz)
#### Post date: [July 24, 2019, 5:14am UTC](https://discuss.elastic.co/t/show-latest-document-data-on-the-dashboard/191945/1 "2019-07-24T05:14:47Z")

</div>

Hi

I am trying to create a custom dashboard either on canvas or on kibana to show the build status of last run or running jenkins job.

I want to get data from jenkins api and show its status (Success, Failure, In progress)  
I also want to show some of the build parameters of the jenkins jobs.

For example if I am getting data from 5 different jenkins jobs.  
A, B , C, D

How Can I show the top value or latest document based on time stamp on markdown or any other panel.

---

<div class="post-metadata">

### Author: ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)
#### Post date: [July 24, 2019, 5:43pm UTC](https://discuss.elastic.co/t/show-latest-document-data-on-the-dashboard/191945/2 "2019-07-24T17:43:19Z")

</div>

Hey @syedsfayaz assuming that you've already indexed your data into Elasticsearch, you can use the "Top Hit" aggregation to do this similar to the following:

 ![41%20AM](https://us1.discourse-cdn.com/elastic/original/3X/8/7/87e0866c1f0454c8f802a886855f2dd36be21bbd.png)

---

<div class="post-metadata">

### Author: ![syedsfayaz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/syedsfayaz/32/46657_2.png) [@syedsfayaz](https://discuss.elastic.co/u/syedsfayaz)
#### Post date: [July 24, 2019, 6:12pm UTC](https://discuss.elastic.co/t/show-latest-document-data-on-the-dashboard/191945/3 "2019-07-24T18:12:10Z")

</div>

@Brandon_Kobel Thanks for your reply. I am still figuring out how to get build data of specific Jenkins jobs in ES. I remember trying to use top-hit but I did not see data. I will get back to you once I try this with Jenkins.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [August 21, 2019, 6:12pm UTC](https://discuss.elastic.co/t/show-latest-document-data-on-the-dashboard/191945/4 "2019-08-21T18:12:18Z")

</div>

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