---
title: "Extended observability — pushing API logs to Grafana / Loki"
img: https://s3.us-east-2.amazonaws.com/unified-article-images/extended_observability_pushing_api_logs_to_grafana_loki-icon.png
date: 2023-04-27T00:00:00.000Z
tag: Guides
description: "We're excited to add another option for external observability, you can send API call logs from Unified.to directly to a Grafana Loki–compatible endpoint...."
url: "https://docs.unified.to/guides/extended_observability_pushing_api_logs_to_grafana_loki"
---

# Extended observability — pushing API logs to Grafana / Loki
------
_April 27, 2023_

We're excited to add another option for external observability: you can send **API call logs** from [Unified.to](https://unified.to/) directly to a **Grafana Loki**–compatible endpoint. directly to a **Grafana Loki**–compatible endpoint. This is the same class of logs we already support for [Datadog](https://docs.unified.to/guides/extended_observability_pushing_api_logs_to_your_datadog_instance); you choose where they go in your [workspace settings](https://app.unified.to/settings/workspace).


[**Grafana Cloud**](https://grafana.com/products/cloud/) and [**Grafana Loki**](https://grafana.com/oss/loki/) are commonly used for log aggregation and querying. Unified delivers logs using Loki's standard HTTP push API.


Setting it up is easy! Here's how:

- **Prepare your endpoint and credentials**
    - In [**Grafana Cloud**](https://grafana.com/docs/grafana-cloud/), open your stack and note the **logs / Loki** ingest base URL (no path) — often `https://logs-prod-XX.grafana.net` (your region may differ). If you use **self-hosted Loki**, use that base URL instead.
    - Create or copy a **logs token** (or the username + token pair your provider documents for Basic auth). **Set** **`grafana_site`** **explicitly** for EU/regional Grafana Cloud stacks or self-hosted Loki; if you leave it blank, our API falls back to a default US Grafana Cloud logs host, which may not match your region.
- **Enter values in workspace settings**
    - Open [Workspace settings](https://app.unified.to/settings/workspace) (or use the Workspace API) and choose **Grafana** under external logging. Configure:
        - **Loki base URL** (`grafana_site`): Base URL only (for example [https://logs-prod-XX.grafana.net](https://logs-prod-xx.grafana.net/))
        - **Authentication: Basic** (Grafana Cloud: user/instance id + token), **Bearer** (if your gateway expects a bearer token), or **Legacy** (single field — see below).
        - **Token / API key** (`grafana_apikey`): Your secret or legacy `user:token` string, depending on mode.
- **Confirm logs are flowing**
    - Make a sample call to the Unified API (for example, list an object on a connection). In **Grafana Explore** (or any Loki client), run LogQL such as `{job="unified-api"}`. Log lines include JSON with the route **`path`**, `integration_type`, `status`, and other API-call fields.

## Why does Grafana / Loki matter for [Unified.to](https://unified.to/) users?


By sending your logs directly to your own Loki stack or Grafana Cloud, you get immediate visibility into what's happening in your environment. This allows you to quickly debug issues, get notified about errors, and more.
Currently, we support both inbound API calls and webhook calls. 


However, we're constantly improving our product, and we're looking forward to supporting more log types in the future. So, please [send us feedback](https://unified.to/contact) so we can better understand what you need.


## About Unified.to


If you're not familiar with Unified API, it's a single API that you can use to read and write data to third-party integrations using our unified data model. This makes it easy to integrate with multiple systems and eliminates the need for separate API calls for each integration.


We hope this new feature makes your life easier and your work more efficient!


[Get started with Unified.to](https://app.unified.to/)