Skip to main content

Update table data

Update table data API

Endpoint

Request URL: https://usapi.hottask.com/autodev/CustomTableValue/UD/randomCode/customTableID

Method: POST

  • randomCode: The project randomCode. Example: 7qaucizgxdrb
  • customTableID: The table ID. 123
  • Example: /autodev/CustomTableValue/UD/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:

{
"update": {
"table field definitions...": "The values here is not fixed and depends on the field definitions of the table...."
}
}
  • create - object, required - Table definition key-value pairs

Example Request

JavaScript (Fetch API)

const res = await fetch('https://usapi.hottask.com/autodev/CustomTableValue/UD/randomCode/customTableID', {
method: 'POST',
headers: {
"Authorization": "<Your-Secret-Key>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"update": {
"table field definitions...": "The values here is not fixed and depends on the field definitions of the table...."
}
})
});

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

Python (Requests Library)

import requests
import json

url = 'https://usapi.hottask.com/autodev/CustomTableValue/UD/randomCode/customTableID'
headers = {
"Authorization": "<Your-Secret-Key>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"update": {
"table field definitions...": "The values here is not fixed and depends on the field definitions of the table...."
}
})

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

cURL

curl 'https://usapi.hottask.com/autodev/CustomTableValue/UD/randomCode/customTableID' \
-X POST \
-H 'Authorization: <Your-Secret-Key>' \
-H 'Content-Type: application/json' \
-d '{"update":{"table field definitions...":"The values here is not fixed and depends on the field definitions of the table...."}}'

HTTP Request

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

{
"update": {
"table field definitions...": "The values here is not fixed and depends on the field definitions of the table...."
}
}

Response

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

{
// int - The number of data items that were successfully operated
"Data": 1,
// 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