# Getting Console logs through API or something similar? instead of manually downloading the logs

**URL:** <https://discourse.getdbt.com/t/getting-console-logs-through-api-or-something-similar-instead-of-manually-downloading-the-logs/8661>\
**Category:** Help\
**Tags:** snowflake, dbt-cloud\
**Created:** [June 12, 2023, 1:22am UTC](https://discourse.getdbt.com/t/getting-console-logs-through-api-or-something-similar-instead-of-manually-downloading-the-logs/8661 "2023-06-12T01:22:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MickeyLulz](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@MickeyLulz](https://discourse.getdbt.com/u/MickeyLulz)\
**Post date:** [June 12, 2023, 1:22am UTC](https://discourse.getdbt.com/t/getting-console-logs-through-api-or-something-similar-instead-of-manually-downloading-the-logs/8661/1 "2023-06-12T01:22:13Z")

</div>

## The problem I’m having

Is there a way to get the console log from a job using API or something similar? Instead of downloading the logs manually.

## The context of why I’m trying to do this

I’m using Snowflake. I’m trying to get the runtime of each of my model, where I can store the runtimes in a table in Snowflake and from there I can see the averages and see if there are instances where a job has taken longer than usual. I’ve looked at the ‘run\_results.json’ file but I don’t think the times I see there are the runtime for the creation of the models in my database (correct me if I’m wrong), but it’s for how long a node was executed.

## What I’ve already tried

I’ve looked at the run\_results.json file.

Edit: could Cloud Discovery API be what I’m looking for?

Hopefully everything above makes sense.

---

<div class="post-metadata">

**Author:** ![joellabes](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/joellabes/32/3980_2.png) [@joellabes](https://discourse.getdbt.com/u/joellabes)\
**Post date:** [June 12, 2023, 3:29am UTC](https://discourse.getdbt.com/t/getting-console-logs-through-api-or-something-similar-instead-of-manually-downloading-the-logs/8661/2 "2023-06-12T03:29:56Z")

</div>

Hey @MickeyLulz!

The short answer:

> [@MickeyLulz](#):
>
> Edit: could Cloud Discovery API be what I’m looking for?

Yes! Read more about it at [Introducing the Discovery API](https://www.getdbt.com/blog/introducing-the-discovery-api/) and [About the Discovery API | dbt Developer Hub](https://docs.getdbt.com/docs/dbt-cloud-apis/discovery-api).

Otherwise, you could also check out [the dbt\_artifacts package](https://hub.getdbt.com/brooklyn-data/dbt_artifacts/latest/) which persists run\_results.json to your warehouse.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/getdbt/original/1X/a7a7ca1fe379aaf90952b0e13118a817babcd14f.png) [@system](https://discourse.getdbt.com/u/system)\
**Post date:** [June 19, 2023, 3:30am UTC](https://discourse.getdbt.com/t/getting-console-logs-through-api-or-something-similar-instead-of-manually-downloading-the-logs/8661/3 "2023-06-19T03:30:12Z")

</div>

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