Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Query
  • Access management
  • Pricing policy
    • SDK
      • Overview
      • Authentication
        • All methods
        • create-query
        • get-query
        • get-query-status
        • stop-query
        • get-query-results
      • YQL and JSON type mapping
    • Apache Airflow™
  • Integration
  • Audit Trails events
  • FAQ

In this article:

  • Request
  • Response
  • Example
  1. Reference
  2. HTTP API
  3. Methods
  4. get-query

get-query

Written by
Yandex Cloud
Updated at October 28, 2024
  • Request
  • Response
  • Example

The method returns information about a query, including query metada, its execution status, and an array of results.

When using the HTTP API, authenticate and specify the required headers. You can also specify optional headers for setting up request execution. The HTTP API may return errors while running.

RequestRequest

GET request to /queries/{query_id}?project={folder_id}, where {folder_id} is the folder ID and {query_id} is the query ID.

ResponseResponse

If successful, an HTTP response with code 200 and query information is returned.

{
  "name": "<query_name>",
  "type": "<query_type>",
  "text": "<query_text>",
  "description": "<description>",
  "meta": {
    "started_at": "2022-09-03T14:53:00.067Z",
    "finished_at": "2022-09-03T14:53:00.067Z"
  },
  "issues": {
    "details": [
      {
        "position": {
          "row": 0,
          "column": 0,
          "file": "string"
        },
        "message": "string",
        "end_position": {
          "row": 10,
          "column": 10,
          "file": "string"
        },
        "issue_code": 0,
        "severity": "FATAL",
        "issues": [
        ],
        "status": 0
      }
    ],
    "message": "string",
    "status": 0
  },
  "result_sets": [
    {
      "rows": 0,
      "truncated": true
    }
  ],
  "status": "RUNNING",
  "id": "string"
}
Field Description
name Query name.
type Query type: STREAMING and ANALYTICS.
text Query text.
description Query description.
meta.started_at Query execution start time.
meta.finished_at Query execution end time.
issues If there are execution errors, contains an Issue object.
result_sets Array of query execution results.
result_sets[].rows Number of rows with query execution results.
result_sets[].truncated The number of rows with query execution results exceeded the limit and was truncated.

ExampleExample

Request:

curl \
  --request 'GET' \
  'https://api.yandex-query.cloud.yandex.net/api/fq/v1/queries/cseugn35bc3r********?project=b1gaue5b382m********' \
  --header 'accept: application/json'

Response:

{
  "name": "",
  "type": "ANALYTICS",
  "text": "select 1",
  "description": "",
  "meta": {
    "started_at": "2022-09-03T15:02:36.827Z",
    "finished_at": "2022-09-03T15:02:36.827Z"
  },
  "issues": [],
  "result_sets": [
    {
      "rows": 110,
      "truncated": false
    }
  ],
  "status": "FINISHED",
  "id": "csqugo80f0l3********"
}

Was the article helpful?

Previous
create-query
Next
get-query-status
© 2025 Direct Cursus Technology L.L.C.