Skip to main content

Get Table Data Collection

Get Table Data Collection API

Endpoint

Request URL: https://usapi.hottask.com/autodev/CustomTableValue/Page/{{randomCode}}/{{customTableID}}

Method: POST

  • randomCode: The project randomCode. Example: 7qaucizgxdrb
  • customTableID: The table ID. 123
  • Example: /autodev/CustomTableValue/Page/7qaucizgxdrb/123

Request Headers

The API request must include the following headers:

  • customauth: project auth token - string, required - The secret key for authenticating the API request
  • Content-Type: application/json - string, required - The content type of the request payload (must be application/json)

Request Body

The request body should contain the following parameters:

{
// object, required - The filter object
"pageFilter": {
"PageNo": 1,
"pageSize": 20,
"OrderByField": "ID",
"IsAsc": true,
"Filter": [
{
"name": "ID",
"op": "Equal",
"value": 1
},
{
"name": "ID",
"op": "GreaterThan",
"value": 1
},
{
"name": "ID",
"op": "GreaterThanOrEqual",
"value": 1
},
{
"name": "ID",
"op": "LessThan",
"value": 1
},
{
"name": "ID",
"op": "LessThanOrEqual",
"value": 1
},
{
"name": "Name",
"op": "StringContains",
"value": "Ben"
}
]
}
}
  • pageFilter - object, required - The filter object

Example Request

JavaScript (Fetch API)

const res = await fetch('https://usapi.hottask.com/autodev/CustomTableValue/Page/{{randomCode}}/{{customTableID}}', {
method: 'POST',
headers: {
"Authorization": "<Your-Secret-Key>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"pageFilter": {
"PageNo": 1,
"pageSize": 20,
"OrderByField": "id",
"IsAsc": true,
"Filter": [
{
"name": "id",
"op": "Equal",
"value": 1
}
]
}
})
});

const data = await res.json();
console.log(data);

Python (Requests Library)

import requests
import json

url = 'https://usapi.hottask.com/autodev/CustomTableValue/Page/{{randomCode}}/{{customTableID}}'
headers = {
"Authorization": "<Your-Secret-Key>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"pageFilter": {
"PageNo": 1,
"pageSize": 20,
"OrderByField": "id",
"IsAsc": true,
"Filter": [
{
"name": "id",
"op": "Equal",
"value": 1
}
]
}
})

response = requests.post(url, headers=headers, json=data)
data = response.json()
print(data)

cURL

curl 'https://usapi.hottask.com/autodev/CustomTableValue/Page/{{randomCode}}/{{customTableID}}' \
-X POST \
-H 'Authorization: <Your-Secret-Key>' \
-H 'Content-Type: application/json' \
-d '{"pageFilter":{"PageNo":1,"pageSize":20,"OrderByField":"id","IsAsc":true,"Filter":[{"name":"id","op":"Equal","value":1}]}}'

HTTP Request

POST /autodev/CustomTableValue/Page/{{randomCode}}/{{customTableID}} HTTP/1.1
Host: usapi.hottask.com
Authorization: <Your-Secret-Key>
Content-Type: application/json

{
"pageFilter": {
"PageNo": 1,
"pageSize": 20,
"OrderByField": "id",
"IsAsc": true,
"Filter": [
{
"name": "id",
"op": "Equal",
"value": 1
}
]
}
}

Response

The API response will be a JSON object with the following structure:

{
// object - The table query results
"Data": {
"List": [
{
"id": 4,
"table field definitions...": "The content here is not fixed and depends on the field definitions of the table...."
}
],
"VirtualCount": 123
},
// string - API version
"Version": "1.0.0",
// boolean - Operation success status
"Success": true,
// integer - HTTP status code
"Code": 200,
// string - Error message if any
"Message": ""
}

Error Handling