api/2.0/sql/history/queries endpoint does not return query execution time

Octavian1
Contributor

Hi,

I cannot see the query execution time in the response to the "api/2.0/sql/history/queries" request.

Basically, I get only the following fields:
{
"next_page_token":...,
"has_next_page":...,
"res":[
  {
     "query_id":...,
     "status":..,
     "query_text":...,
     "query_start_time_ms":...,
     "execution_end_time_ms":...,
     "query_end_time_ms":...,
     "user_id":...,
     "user_name":...,
     "spark_ui_url":...,
     "endpoint_id":...,
     "rows_produced":...,
     "lookup_key":...,
     "executed_as_user_id":...,
     "executed_as_user_name":...,
     "is_final":..,
     "channel_used":{
       "name":...,
       "dbsql_version":...
     },
     "plans_state":...,
     "statement_type":...,
     "warehouse_id":...,
     "duration":...,
     "canSubscribeToLiveQuery":...
  },
  ...
]
}
There is an execution_end_time_ms (which is equal to the query_end_time_ms), but no execution time (which is part of the duration), as it can be seen in Query History UI, see screenshot attached.
Is there another way to get the query execution time?

Thank you!