---
type: api
title: Get Prometheus build information
description: Get Elasticsearch build information in the format of the Prometheus `/api/v1/status/buildinfo` endpoint.
url: https://www.elastic.co/elastic/docs-builder/docs/4843/api/doc/elasticsearch-serverless/operation/operation-prometheus-status-buildinfo
resource: https://www.elastic.co/elastic/docs-builder/docs/4843/api/doc/elasticsearch-serverless/operation/operation-prometheus-status-buildinfo
products:
  - Elasticsearch Serverless
---

# Get Prometheus build information

Authentication: required

Availability: Preview

## Paths

- `GET` `/_prometheus/{index}/api/v1/status/buildinfo`
- `GET` `/_prometheus/api/v1/status/buildinfo`

#### Path parameters

- `index` (string) — optional, leave it out to use `/_prometheus/api/v1/status/buildinfo`
  An index pattern, accepted for consistency with the other Prometheus endpoints.
The response doesn't depend on it.

## Description

Get Elasticsearch build information in the format of the Prometheus `/api/v1/status/buildinfo` endpoint.
Prometheus-compatible clients, such as Grafana, call this endpoint to identify the backend and the features it supports.

## Response

`application/json`

- `status` (string)
  The status of the request. It is always `success`.
- `data` (object)
  The Elasticsearch build information.
  - `application` (string)
    The name of the application. It is always `Elasticsearch`.
  - `version` (string)
    The Elasticsearch version.
  - `revision` (string)
    The commit hash of the Elasticsearch build.
  - `buildDate` (union oneOf)
    The date of the Elasticsearch build.
    One of: `string` or `number`
## Code examples

#### Console

```console
GET /_prometheus/api/v1/status/buildinfo
```

#### JavaScript

```javascript
const response = await client.prometheus.statusBuildinfo();
```

#### Python

```python
resp = client.prometheus.status_buildinfo()
```

#### curl

```curl
curl -X GET "$ELASTICSEARCH_URL/_prometheus/api/v1/status/buildinfo" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### PHP

```php
$resp = $client->prometheus()->statusBuildinfo();
```

#### Ruby

```ruby
response = client.prometheus.status_buildinfo
```

## Response examples

#### A successful response

`application/json`

A successful response from `GET /_prometheus/api/v1/status/buildinfo`.

```json
{
  "status": "success",
  "data": {
    "application": "Elasticsearch",
    "version": "9.5.0",
    "revision": "00000000",
    "buildDate": "2026-07-09T22:10:13.578182715Z"
  }
}
```

