# Using DQL in REST API Request

**URL:** https://forum.opensearch.org/t/using-dql-in-rest-api-request/17873
**Category:** OpenSearch
**Created:** [February 13, 2024, 6:00am UTC](https://forum.opensearch.org/t/using-dql-in-rest-api-request/17873 "2024-02-13T06:00:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![shxiao](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@shxiao](https://forum.opensearch.org/u/shxiao)
#### Post date: [February 13, 2024, 6:00am UTC](https://forum.opensearch.org/t/using-dql-in-rest-api-request/17873/1 "2024-02-13T06:00:43Z")

</div>

**Describe the issue** :

Wondering if there’s a way that we could directly invoke rest api request with some dql as payload and get the logs?  
or another way to ask that question is how could I fetch the corresponding request body query with the dql: **level.keyword:INFO**

```auto
"query": {
  "bool": {
    "must": [],
    "filter": [
      {
        "bool": {
          "should": [
            {
              "match": {
                "level.keyword": "INFO"
              }
            }
          ],
          "minimum_should_match": 1
        }
      },
      {
        "range": {
          "@timestamp": {
            "gte": "2024-02-12T23:00:00.000Z",
            "lte": "2024-02-12T23:30:00.000Z",
            "format": "strict_date_optional_time"
          }
        }
      }
    ],
    "should": [],
    "must_not": []
  }
},

```
