> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://mezmo.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://mezmo.ferndocs.com/_mcp/server.

# Summarize pipeline health for one or more pipelines

GET https://api.mezmo.com/v3/pipeline/health

Returns overall ingestion health as well as pipeline-specific health, such as lag in a pipeline's sources.

Reference: https://mezmo.ferndocs.com/api-reference/pipeline/pipelines/summarize-pipeline-health-for-one-or-more-pipelines

## Authentication

- `Authorization` header (required) (prefixed with ` Token  `) — Header authentication of the form `Token <token>`

## Request

### Query parameters

- `interval_minutes` (integer, optional, default: 15) — The window interval for measuring ingestion volume
- `pipeline_ids` (list of string, optional) — Return only pipelines with the given IDs

## Response

### 200

Default Response

- `meta` (map from string to any, optional)
- `data` (PipelineHealthGetResponsesContentApplicationJsonSchemaData, optional) — Overall health of data ingestion and pipeline sources

## Types

### PipelineHealthGetResponsesContentApplicationJsonSchemaData

Overall health of data ingestion and pipeline sources

- `interval_minutes` (integer, optional) — The window interval for measuring ingestion volume
- `ingestion_health` (PipelineHealthGetResponsesContentApplicationJsonSchemaDataIngestionHealth, optional)
- `pipeline_health` (PipelineHealthGetResponsesContentApplicationJsonSchemaDataPipelineHealth, optional)

### PipelineHealthGetResponsesContentApplicationJsonSchemaDataIngestionHealth

- `ingestion_metrics_status` (string, optional) — A success or failure message for the ability to fetch metrics related to ingestion routes
- `routes` (list of PipelineHealthGetResponsesContentApplicationJsonSchemaDataIngestionHealthRoutesItems, optional) — Ingestion status code health metrics per route

### PipelineHealthGetResponsesContentApplicationJsonSchemaDataPipelineHealth

- `lag_metrics_status` (string, optional) — A success or failure message for the ability to fetch lag metrics
- `pipelines` (list of PipelineHealthGetResponsesContentApplicationJsonSchemaDataPipelineHealthPipelinesItems, optional) — All active and published pipelines. Inactive or unpublished pipelines are not included.

### PipelineHealthGetResponsesContentApplicationJsonSchemaDataIngestionHealthRoutesItems

- `route` (string, optional) — The route path
- `health` (list of PipelineHealthGetResponsesContentApplicationJsonSchemaDataIngestionHealthRoutesItemsHealthItems, optional) — The health of a specific route measured by changes in status code

### PipelineHealthGetResponsesContentApplicationJsonSchemaDataPipelineHealthPipelinesItems

- `id` (string, optional) — The pipeline id
- `title` (string, optional) — The pipeline title
- `published_at` (datetime, optional) — The date/time of the pipeline's last publish (if at all)
- `sources` (list of PipelineHealthGetResponsesContentApplicationJsonSchemaDataPipelineHealthPipelinesItemsSourcesItems, optional) — Sources associated with this pipeline

### PipelineHealthGetResponsesContentApplicationJsonSchemaDataIngestionHealthRoutesItemsHealthItems

- `status_code` (integer, optional) — The HTTP status code
- `change_percent` (double, optional) — The percentage change for the status code over time. The result is a comparison of the current interval and the same interval offset by `interval_minutes` ago. For example, when `{interval_minutes: 5, offset_minutes: 5}`, that calculates the percentage change in a 5-minute window from 5 minutes ago to a 5-minute window 10 minutes ago.

### PipelineHealthGetResponsesContentApplicationJsonSchemaDataPipelineHealthPipelinesItemsSourcesItems

- `id` (string, optional) — The source id, which can also be the consumer group id
- `type` (string, optional) — The type of source component
- `title` (string, optional) — The title of the source component
- `is_consumer_group` (boolean, optional) — Whether this source is a consumer group that could have lag
- `lag_event_count` (double, optional, nullable)

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "meta": {},
  "data": {
    "interval_minutes": 5,
    "ingestion_health": {
      "ingestion_metrics_status": "Metrics fetched successfully",
      "routes": [
        {
          "route": "/api/v1/logs",
          "health": [
            {
              "status_code": 200,
              "change_percent": -3.5
            },
            {
              "status_code": 500,
              "change_percent": 12.7
            }
          ]
        },
        {
          "route": "/api/v1/metrics",
          "health": [
            {
              "status_code": 200,
              "change_percent": 0
            },
            {
              "status_code": 429,
              "change_percent": 5.2
            }
          ]
        }
      ]
    },
    "pipeline_health": {
      "lag_metrics_status": "Lag metrics up to date",
      "pipelines": [
        {
          "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "title": "payment-service-ingestion",
          "published_at": "2024-04-20T14:45:00Z",
          "sources": [
            {
              "id": "consumer-group-01",
              "type": "kafka-consumer",
              "title": "payment-service-kafka-group",
              "is_consumer_group": true,
              "lag_event_count": 120
            },
            {
              "id": "source-logs-acme",
              "type": "http-source",
              "title": "logs.acme-corp.io",
              "is_consumer_group": false,
              "lag_event_count": null
            }
          ]
        },
        {
          "id": "7b9e1f2a-8c3d-4f9a-9f1e-2d4a5b6c7d8e",
          "title": "auth-gateway-pipeline",
          "published_at": "2024-04-18T08:30:00Z",
          "sources": [
            {
              "id": "consumer-group-auth",
              "type": "kafka-consumer",
              "title": "auth-gateway-kafka-group",
              "is_consumer_group": true,
              "lag_event_count": 0
            }
          ]
        }
      ]
    }
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.mezmo.com/v3/pipeline/health"

payload = {}
headers = {
    "Authorization": "Token <pipeline-service-key>",
    "Content-Type": "application/json"
}

response = requests.get(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.mezmo.com/v3/pipeline/health';
const options = {
  method: 'GET',
  headers: {
    Authorization: 'Token <pipeline-service-key>',
    'Content-Type': 'application/json'
  },
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.mezmo.com/v3/pipeline/health"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", url, payload)

	req.Header.Add("Authorization", "Token <pipeline-service-key>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.mezmo.com/v3/pipeline/health")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Token <pipeline-service-key>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.mezmo.com/v3/pipeline/health")
  .header("Authorization", "Token <pipeline-service-key>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.mezmo.com/v3/pipeline/health', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Token <pipeline-service-key>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.mezmo.com/v3/pipeline/health");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Token <pipeline-service-key>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Token <pipeline-service-key>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.mezmo.com/v3/pipeline/health")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```