> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Query Data (Table) API

[Back to API List](https://koreai.mintlify.site/ai-for-service/apis/automation/api-list)

Used to get data from Data Table.

| Field | Value |
| - | - |
| **Method** | POST |
| **Endpoint** | `https://{{host}}/api/public/tables/{{tableName}}/query?sys_limit={{limit_value}}&sys_offset={{offset_value}}` |
| **Content Type** | `application/json` |
| **Authorization** | `auth: {{JWT}}` See [How to generate the JWT Token](https://koreai.mintlify.site/ai-for-service/apis/automation/api-introduction.md#generating-the-jwt-token). |
| **App Access** | Read access to the Data Table from the Data Definition in DaaS. |

## Path Parameters

| Parameter | Description |
| - | - |
| `host` | Environment URL, for example, `https://platform.kore.ai` |
| `tableName` | Name of the Table to fetch data. |
| `sys_limit` | The maximum number of records to be fetched. By default this is set to 10 and the maximum allowed is 100. |
| `sys_offset` | The number of records to be skipped from the beginning of the results dataset. |

## Sample Request

```json theme={null}
curl -X POST 'https://{{host}}/api/public/tables/{{tableName}}/query?sys_limit=4&sys_offset=0' \
  -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
  -H 'content-type: application/json' \
  -d '{
      "query":{
        "expressions": [
            {"field": "firstName", "operand": "=", "value": "Jane"},
            {"field": "lastName", "operand": "=", "value": "Doe"}
        ],
        "operator": "or"
      }
}'
```

## Body Parameters

| Parameter | Description |
| - | - |
| `query` | Filter criteria identifying the rows to be fetched. Accepts `expressions` (array of field/operand/value objects) and `operator` (`and` or `or`). |

## Sample Response

```json expandable=true theme={null}
{
    "hasMore": true,
    "total": 2,
    "metaInfo": [
        {
            "name": "gender",
            "type": "string"
        },
        {
            "name": "lastName",
            "type": "string"
        }
    ],
    "queryResult": [
        {
            "age": "male",
            "last_name": "tony"
        }
    ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.