curl --request POST \
--url https://app.teable.ai/api/table/%7BtableId%7D/field/%7BfieldId%7D/auto-fill \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"viewId":"viwXXXXXXX","filter":"string","orderBy":"string","groupBy":"string","ignoreViewQuery":"string","mode":"all"}'const url = 'https://app.teable.ai/api/table/%7BtableId%7D/field/%7BfieldId%7D/auto-fill';
const options = {
method: 'POST',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
},
body: '{"viewId":"viwXXXXXXX","filter":"string","orderBy":"string","groupBy":"string","ignoreViewQuery":"string","mode":"all"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}const http = require('https');
const options = {
method: 'POST',
hostname: 'app.teable.ai',
port: null,
path: '/api/table/%7BtableId%7D/field/%7BfieldId%7D/auto-fill',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
viewId: 'viwXXXXXXX',
filter: 'string',
orderBy: 'string',
groupBy: 'string',
ignoreViewQuery: 'string',
mode: 'all'
}));
req.end();import http.client
conn = http.client.HTTPSConnection("app.teable.ai")
payload = "{\"viewId\":\"viwXXXXXXX\",\"filter\":\"string\",\"orderBy\":\"string\",\"groupBy\":\"string\",\"ignoreViewQuery\":\"string\",\"mode\":\"all\"}"
headers = {
'Authorization': "Bearer REPLACE_BEARER_TOKEN",
'content-type': "application/json"
}
conn.request("POST", "/api/table/%7BtableId%7D/field/%7BfieldId%7D/auto-fill", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.teable.ai/api/table/{tableId}/field/{fieldId}/auto-fill",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'viewId' => 'viwXXXXXXX',
'filter' => '<string>',
'orderBy' => '<string>',
'groupBy' => '<string>',
'ignoreViewQuery' => '<string>',
'mode' => 'all'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.teable.ai/api/table/{tableId}/field/{fieldId}/auto-fill"
payload := strings.NewReader("{\n \"viewId\": \"viwXXXXXXX\",\n \"filter\": \"<string>\",\n \"orderBy\": \"<string>\",\n \"groupBy\": \"<string>\",\n \"ignoreViewQuery\": \"<string>\",\n \"mode\": \"all\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.teable.ai/api/table/{tableId}/field/{fieldId}/auto-fill")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"viewId\": \"viwXXXXXXX\",\n \"filter\": \"<string>\",\n \"orderBy\": \"<string>\",\n \"groupBy\": \"<string>\",\n \"ignoreViewQuery\": \"<string>\",\n \"mode\": \"all\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teable.ai/api/table/{tableId}/field/{fieldId}/auto-fill")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"viewId\": \"viwXXXXXXX\",\n \"filter\": \"<string>\",\n \"orderBy\": \"<string>\",\n \"groupBy\": \"<string>\",\n \"ignoreViewQuery\": \"<string>\",\n \"mode\": \"all\"\n}"
response = http.request(request)
puts response.read_body{
"taskId": "<string>",
"rowCount": 123,
"processedCount": 123,
"isLimited": true
}Auto-fill a field by AI
Automatically generate suggestions for filling a specific field
Required token scopes: record|update
curl --request POST \
--url https://app.teable.ai/api/table/%7BtableId%7D/field/%7BfieldId%7D/auto-fill \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"viewId":"viwXXXXXXX","filter":"string","orderBy":"string","groupBy":"string","ignoreViewQuery":"string","mode":"all"}'const url = 'https://app.teable.ai/api/table/%7BtableId%7D/field/%7BfieldId%7D/auto-fill';
const options = {
method: 'POST',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
},
body: '{"viewId":"viwXXXXXXX","filter":"string","orderBy":"string","groupBy":"string","ignoreViewQuery":"string","mode":"all"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}const http = require('https');
const options = {
method: 'POST',
hostname: 'app.teable.ai',
port: null,
path: '/api/table/%7BtableId%7D/field/%7BfieldId%7D/auto-fill',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
viewId: 'viwXXXXXXX',
filter: 'string',
orderBy: 'string',
groupBy: 'string',
ignoreViewQuery: 'string',
mode: 'all'
}));
req.end();import http.client
conn = http.client.HTTPSConnection("app.teable.ai")
payload = "{\"viewId\":\"viwXXXXXXX\",\"filter\":\"string\",\"orderBy\":\"string\",\"groupBy\":\"string\",\"ignoreViewQuery\":\"string\",\"mode\":\"all\"}"
headers = {
'Authorization': "Bearer REPLACE_BEARER_TOKEN",
'content-type': "application/json"
}
conn.request("POST", "/api/table/%7BtableId%7D/field/%7BfieldId%7D/auto-fill", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.teable.ai/api/table/{tableId}/field/{fieldId}/auto-fill",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'viewId' => 'viwXXXXXXX',
'filter' => '<string>',
'orderBy' => '<string>',
'groupBy' => '<string>',
'ignoreViewQuery' => '<string>',
'mode' => 'all'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.teable.ai/api/table/{tableId}/field/{fieldId}/auto-fill"
payload := strings.NewReader("{\n \"viewId\": \"viwXXXXXXX\",\n \"filter\": \"<string>\",\n \"orderBy\": \"<string>\",\n \"groupBy\": \"<string>\",\n \"ignoreViewQuery\": \"<string>\",\n \"mode\": \"all\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.teable.ai/api/table/{tableId}/field/{fieldId}/auto-fill")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"viewId\": \"viwXXXXXXX\",\n \"filter\": \"<string>\",\n \"orderBy\": \"<string>\",\n \"groupBy\": \"<string>\",\n \"ignoreViewQuery\": \"<string>\",\n \"mode\": \"all\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teable.ai/api/table/{tableId}/field/{fieldId}/auto-fill")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"viewId\": \"viwXXXXXXX\",\n \"filter\": \"<string>\",\n \"orderBy\": \"<string>\",\n \"groupBy\": \"<string>\",\n \"ignoreViewQuery\": \"<string>\",\n \"mode\": \"all\"\n}"
response = http.request(request)
puts response.read_body{
"taskId": "<string>",
"rowCount": 123,
"processedCount": 123,
"isLimited": true
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Set the view you want to fetch. When provided, records will follow that view's filter and sort settings. When omitted, the API queries the table without applying a view.
"viwXXXXXXX"
A filter object for complex query conditions based on fields, operators, and values. Use our visual query builder at https://app.teable.ai/developer/tool/query-builder to build filters.
An array of sort objects that specifies how the records should be ordered.
An array of group objects that specifies how the records should be grouped.
When a viewId is specified, configure this to true will ignore the view's filter, sort, etc
all, emptyOnly Was this page helpful?

