Skip to content

ESQL: Get and list APIs should use async execution id format #127187

Description

@nik9000

Description

The get and list APIs for ESQL should use the same async execution id format that the async API uses. You should be able to do a _query/async which returns an id and use that id immediately in the get running query API.

The API also shouldn't return node, coordinating_node, or data_node or anything. That's a concept that's not universally applicable. So:

{ "queries" : {
 "abc:1234": {    <---- use the encoding returned by async search
  "node": "abc",   <---- zap this
  "id": 1234,   <---- zap this
  "start_time_millis": 14585858875292,
  "running_time_nanos": 762794,
  "query": "FROM logs* | STATS BY hostname"
  },
 "abd:1729": {    <---- use the encoding returned by async search
  "node": "abd",   <---- zap this
  "id":1729,   <---- zap this
  "start_time_millis": 14585858823573,
  "running_time_nanos": 90231,
  "query": "FROM orders | LOOKUP country_code ON country"
  }
 } 
}
GET /_query/queries/abc:1234    <---- use the encoding returned by async search

{
  "id": 1234,   <---- zap this
  "node": "abc",   <---- zap this
  "start_time_millis": 14585858875292,
  "running_time_nanos": 762794,
  "query": "FROM logs* | STATS BY hostname"
  "coordinating_node": "oTUltX4IQMOUUVeiohTt8A"      <---- zap this
  "data_nodes" : [ "DwrYwfytxthse49X4", "i5msnbUyWlpe86e7"]      <---- zap this
}

Activity

  1. self-assigned this
    on Apr 22, 2025
  2. added and removed
    needs:triageRequires assignment of a team area label
    on Apr 22, 2025
  3. elasticsearchmachine commented on Apr 22, 2025

    @elasticsearchmachine
    Collaborator

    Pinging @elastic/es-analytical-engine (Team:Analytics)

  4. added a commit that references this issue on Apr 28, 2025
    0383960
  5. added a commit that references this issue on Jun 12, 2025
    936f338
  6. added 2 commits that reference this issue on Jun 12, 2025
    6645bf9
    8594201
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions