---
type: api
title: Get stream queries
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v9/operation/operation-get-streams-name-queries
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v9/operation/operation-get-streams-name-queries
products:
  - Kibana
---

# Get stream queries

deprecated

Availability: 9.1+

- Server: `https://{kibana_url}`

## Paths

- `GET` `/api/streams/{name}/queries`
- `GET` `/s/{space_id}/api/streams/{name}/queries`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v9/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v9/authentication#basicauth)

#### Path Parameters

- `name` (string · max: 255)
  The name of the stream.

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Fetches all queries linked to a stream that are visible to the current user in the current space.<br/><br/>[Required authorization] Route required privileges: read_stream.

## Request Body

`application/json`

Any of:
- **object**
- **object**
- **object**

## Response

List of queries linked to the stream.

## Code Examples

#### Console

```console
GET /api/streams/{name}/queries
```

#### curl

```curl
curl -X GET "https://{kibana_url}/api/streams/{name}/queries"
```

## Response Examples

#### List queries

```json
{
  "queries": [
    {
      "description": "Count error-level log events grouped by host name",
      "esql": {
        "query": "FROM logs.nginx | WHERE log.level == \u0022error\u0022 | STATS count = COUNT(*) BY host.name"
      },
      "id": "error-count-by-host",
      "severity_score": 75,
      "title": "Error count by host",
      "type": "match"
    },
    {
      "description": "Requests with response time above 2 seconds",
      "esql": {
        "query": "FROM logs.nginx | WHERE http.response_time \u003E 2000"
      },
      "id": "high-latency-requests",
      "severity_score": 50,
      "title": "High latency requests",
      "type": "match"
    }
  ]
}
```

