# Retrieve logs

**URL:** <https://community.ofelia.com/t/retrieve-logs/11437>\
**Category:** Q&A\
**Created:** [13 December 2022 08:00 UTC](https://community.ofelia.com/t/retrieve-logs/11437 "2022-12-13T08:00:09Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christ\_Bryan](https://avatars.discourse-cdn.com/v4/letter/c/a88e57/32.png) [@Christ\_Bryan](https://community.ofelia.com/u/Christ_Bryan)\
**Post date:** [13 December 2022 08:00 UTC](https://community.ofelia.com/t/retrieve-logs/11437/1 "2022-12-13T08:00:09Z")

</div>

Hello,

I had executed my Bonita solution several times in order to have collect&nbsp;a huge amount of data. I would like to do process mining and for that I need the logs being generated from my Bonita solution. Please how can I retrieve my logs?

Thanks.

---

<div class="post-metadata">

**Author:** ![thalia.cruz](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/thalia.cruz/32/1230_2.png) [@thalia.cruz](https://community.ofelia.com/u/thalia.cruz)\
**Post date:** [13 December 2022 13:36 UTC](https://community.ofelia.com/t/retrieve-logs/11437/2 "2022-12-13T13:36:56Z")

</div>

hello&nbsp;[Christ\_Bryan](http://community.ofelia.com/users/christbryan "View user profile."),

To know more about logs, you can take a look at&nbsp;https://documentation.bonitasoft.com/bonita/2022.2/setup-dev-environment/logging

Myabe for your need, you can also use the Case API:&nbsp;https://documentation.bonitasoft.com/bonita/2022.2/api/cases-process-instance-api

Cheers!

---

<div class="post-metadata">

**Author:** ![Christ\_Bryan](https://avatars.discourse-cdn.com/v4/letter/c/a88e57/32.png) [@Christ\_Bryan](https://community.ofelia.com/u/Christ_Bryan)\
**Post date:** [13 December 2022 13:43 UTC](https://community.ofelia.com/t/retrieve-logs/11437/3 "2022-12-13T13:43:47Z")

</div>

Hello,

Is it possible to retrieve the information stored in the h2 database from the BDM?

---

<div class="post-metadata">

**Author:** ![Christ\_Bryan](https://avatars.discourse-cdn.com/v4/letter/c/a88e57/32.png) [@Christ\_Bryan](https://community.ofelia.com/u/Christ_Bryan)\
**Post date:** [13 December 2022 13:49 UTC](https://community.ofelia.com/t/retrieve-logs/11437/4 "2022-12-13T13:49:59Z")

</div>

It seems like the links don't help. I recently saw a webinar on process analytics with Bonita and with that you do process mining and to do it you have to retrieve logs, but I don't know where and how to retrieve logs. Don't know if you get my issue.

&nbsp;

---

<div class="post-metadata">

**Author:** ![thalia.cruz](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/thalia.cruz/32/1230_2.png) [@thalia.cruz](https://community.ofelia.com/u/thalia.cruz)\
**Post date:** [15 December 2022 14:26 UTC](https://community.ofelia.com/t/retrieve-logs/11437/5 "2022-12-15T14:26:24Z")

</div>

Hello&nbsp;[Christ\_Bryan](http://community.ofelia.com/users/christbryan "View user profile."),

To&nbsp;access your h2 BDM database, open the project explorer contextual menu of your BDM and choose Browse data (h2 console). You may run from here some SQL queries.

These links might help you:&nbsp;https://documentation.bonitasoft.com/bonita/2022.2/getting-started/define-business-data-model

If I understand well, you'll need to get the information of the cases (the instances of your processes) to analyze them. To fetch those&nbsp;can use the Case API. This example might help:&nbsp;https://documentation.bonitasoft.com/bonita/2022.2/api/manage-a-process#\_query\_archived\_process\_instances

Cheers!

---

<div class="post-metadata">

**Author:** ![Christ\_Bryan](https://avatars.discourse-cdn.com/v4/letter/c/a88e57/32.png) [@Christ\_Bryan](https://community.ofelia.com/u/Christ_Bryan)\
**Post date:** [16 December 2022 09:22 UTC](https://community.ofelia.com/t/retrieve-logs/11437/6 "2022-12-16T09:22:49Z")

</div>

Hello Thalia,

Saw the second link and it redirected me to a querry&nbsp;code, where do I have to enter the code and obtain de information?

Below is a screen of the code

https://ibb.co/hVqc3bm

---

<div class="post-metadata">

**Author:** ![thalia.cruz](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/thalia.cruz/32/1230_2.png) [@thalia.cruz](https://community.ofelia.com/u/thalia.cruz)\
**Post date:** [20 December 2022 21:55 UTC](https://community.ofelia.com/t/retrieve-logs/11437/7 "2022-12-20T21:55:32Z")

</div>

Hey&nbsp;[Christ\_Bryan](http://community.ofelia.com/users/christbryan "View user profile."),

Indeed the example is using the Java APIs. If you're not using a Java application, you can use the REST APIs to get the equivalent&nbsp;information from your own application.

For example, for querying the archived process instances: Search archived cases&nbsp;(using the process id of your case to list all related cases of&nbsp;that process) https://documentation.bonitasoft.com/bonita/2022.2/api/cases-process-instance-api#\_search\_for\_a\_case

If you're not sure how the REST API&nbsp;work, take a look at this:&nbsp;https://documentation.bonitasoft.com/bonita/2022.2/api/rest-api-overview

Hope this helps

---

<div class="post-metadata">

**Author:** ![Christ\_Bryan](https://avatars.discourse-cdn.com/v4/letter/c/a88e57/32.png) [@Christ\_Bryan](https://community.ofelia.com/u/Christ_Bryan)\
**Post date:** [2 January 2023 11:58 UTC](https://community.ofelia.com/t/retrieve-logs/11437/8 "2023-01-02T11:58:00Z")

</div>

Hello you all,

Finally extracted the event data using the REST API technique.

Thanks for all your support.

Cheers,

---

<div class="post-metadata">

**Author:** ![Christ\_Bryan](https://avatars.discourse-cdn.com/v4/letter/c/a88e57/32.png) [@Christ\_Bryan](https://community.ofelia.com/u/Christ_Bryan)\
**Post date:** [3 January 2023 10:52 UTC](https://community.ofelia.com/t/retrieve-logs/11437/9 "2023-01-03T10:52:05Z")

</div>

For that I used the information from the website as I said (REST API) and the tutorial on Postman still from Bonitasoft tutorial to obtain the information. Here is the link to the tutorial:&nbsp;https://www.youtube.com/watch?v=DUgyEhIc3zQ

&nbsp;

---

<div class="post-metadata">

**Author:** ![thalia.cruz](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/thalia.cruz/32/1230_2.png) [@thalia.cruz](https://community.ofelia.com/u/thalia.cruz)\
**Post date:** [3 January 2023 11:18 UTC](https://community.ofelia.com/t/retrieve-logs/11437/10 "2023-01-03T11:18:09Z")

</div>

Happy to hear that!

Related question:&nbsp;http://community.ofelia.com/node/38001#node-38039
