curl --request POST \
--url https://app.teable.ai/api/table/%7BtableId%7D/view \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"name":"string","type":"grid","description":"string","order":0,"options":{"rowHeight":"short","fieldNameDisplayLines":1,"frozenColumnCount":0,"frozenFieldId":"string"},"sort":{"sortObjs":[{"fieldId":"string","order":"asc"}],"manualSort":true},"filter":{},"group":[{"fieldId":"string","order":"asc"}],"isLocked":true,"shareId":"string","enableShare":true,"shareMeta":{"allowCopy":true,"includeHiddenField":true,"password":"string","includeRecords":true,"submit":{"allow":true,"requireLogin":true}},"columnMeta":{"property1":{"order":0,"width":0,"hidden":true,"statisticFunc":"count"},"property2":{"order":0,"width":0,"hidden":true,"statisticFunc":"count"}}}'const url = 'https://app.teable.ai/api/table/%7BtableId%7D/view';
const options = {
method: 'POST',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
},
body: '{"name":"string","type":"grid","description":"string","order":0,"options":{"rowHeight":"short","fieldNameDisplayLines":1,"frozenColumnCount":0,"frozenFieldId":"string"},"sort":{"sortObjs":[{"fieldId":"string","order":"asc"}],"manualSort":true},"filter":{},"group":[{"fieldId":"string","order":"asc"}],"isLocked":true,"shareId":"string","enableShare":true,"shareMeta":{"allowCopy":true,"includeHiddenField":true,"password":"string","includeRecords":true,"submit":{"allow":true,"requireLogin":true}},"columnMeta":{"property1":{"order":0,"width":0,"hidden":true,"statisticFunc":"count"},"property2":{"order":0,"width":0,"hidden":true,"statisticFunc":"count"}}}'
};
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/view',
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({
name: 'string',
type: 'grid',
description: 'string',
order: 0,
options: {
rowHeight: 'short',
fieldNameDisplayLines: 1,
frozenColumnCount: 0,
frozenFieldId: 'string'
},
sort: {sortObjs: [{fieldId: 'string', order: 'asc'}], manualSort: true},
filter: {},
group: [{fieldId: 'string', order: 'asc'}],
isLocked: true,
shareId: 'string',
enableShare: true,
shareMeta: {
allowCopy: true,
includeHiddenField: true,
password: 'string',
includeRecords: true,
submit: {allow: true, requireLogin: true}
},
columnMeta: {
property1: {order: 0, width: 0, hidden: true, statisticFunc: 'count'},
property2: {order: 0, width: 0, hidden: true, statisticFunc: 'count'}
}
}));
req.end();import http.client
conn = http.client.HTTPSConnection("app.teable.ai")
payload = "{\"name\":\"string\",\"type\":\"grid\",\"description\":\"string\",\"order\":0,\"options\":{\"rowHeight\":\"short\",\"fieldNameDisplayLines\":1,\"frozenColumnCount\":0,\"frozenFieldId\":\"string\"},\"sort\":{\"sortObjs\":[{\"fieldId\":\"string\",\"order\":\"asc\"}],\"manualSort\":true},\"filter\":{},\"group\":[{\"fieldId\":\"string\",\"order\":\"asc\"}],\"isLocked\":true,\"shareId\":\"string\",\"enableShare\":true,\"shareMeta\":{\"allowCopy\":true,\"includeHiddenField\":true,\"password\":\"string\",\"includeRecords\":true,\"submit\":{\"allow\":true,\"requireLogin\":true}},\"columnMeta\":{\"property1\":{\"order\":0,\"width\":0,\"hidden\":true,\"statisticFunc\":\"count\"},\"property2\":{\"order\":0,\"width\":0,\"hidden\":true,\"statisticFunc\":\"count\"}}}"
headers = {
'Authorization': "Bearer REPLACE_BEARER_TOKEN",
'content-type': "application/json"
}
conn.request("POST", "/api/table/%7BtableId%7D/view", 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}/view",
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([
'name' => '<string>',
'description' => '<string>',
'order' => 123,
'options' => [
'fieldNameDisplayLines' => 2,
'frozenColumnCount' => 1,
'frozenFieldId' => '<string>'
],
'sort' => [
'sortObjs' => [
[
'fieldId' => '<string>'
]
],
'manualSort' => true
],
'filter' => [
],
'group' => [
[
'fieldId' => '<string>'
]
],
'isLocked' => true,
'shareId' => '<string>',
'enableShare' => true,
'shareMeta' => [
'allowCopy' => true,
'includeHiddenField' => true,
'password' => '<string>',
'includeRecords' => true,
'submit' => [
'allow' => true,
'requireLogin' => true
]
],
'columnMeta' => [
]
]),
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}/view"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"order\": 123,\n \"options\": {\n \"fieldNameDisplayLines\": 2,\n \"frozenColumnCount\": 1,\n \"frozenFieldId\": \"<string>\"\n },\n \"sort\": {\n \"sortObjs\": [\n {\n \"fieldId\": \"<string>\"\n }\n ],\n \"manualSort\": true\n },\n \"filter\": {},\n \"group\": [\n {\n \"fieldId\": \"<string>\"\n }\n ],\n \"isLocked\": true,\n \"shareId\": \"<string>\",\n \"enableShare\": true,\n \"shareMeta\": {\n \"allowCopy\": true,\n \"includeHiddenField\": true,\n \"password\": \"<string>\",\n \"includeRecords\": true,\n \"submit\": {\n \"allow\": true,\n \"requireLogin\": true\n }\n },\n \"columnMeta\": {}\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}/view")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"order\": 123,\n \"options\": {\n \"fieldNameDisplayLines\": 2,\n \"frozenColumnCount\": 1,\n \"frozenFieldId\": \"<string>\"\n },\n \"sort\": {\n \"sortObjs\": [\n {\n \"fieldId\": \"<string>\"\n }\n ],\n \"manualSort\": true\n },\n \"filter\": {},\n \"group\": [\n {\n \"fieldId\": \"<string>\"\n }\n ],\n \"isLocked\": true,\n \"shareId\": \"<string>\",\n \"enableShare\": true,\n \"shareMeta\": {\n \"allowCopy\": true,\n \"includeHiddenField\": true,\n \"password\": \"<string>\",\n \"includeRecords\": true,\n \"submit\": {\n \"allow\": true,\n \"requireLogin\": true\n }\n },\n \"columnMeta\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teable.ai/api/table/{tableId}/view")
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 \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"order\": 123,\n \"options\": {\n \"fieldNameDisplayLines\": 2,\n \"frozenColumnCount\": 1,\n \"frozenFieldId\": \"<string>\"\n },\n \"sort\": {\n \"sortObjs\": [\n {\n \"fieldId\": \"<string>\"\n }\n ],\n \"manualSort\": true\n },\n \"filter\": {},\n \"group\": [\n {\n \"fieldId\": \"<string>\"\n }\n ],\n \"isLocked\": true,\n \"shareId\": \"<string>\",\n \"enableShare\": true,\n \"shareMeta\": {\n \"allowCopy\": true,\n \"includeHiddenField\": true,\n \"password\": \"<string>\",\n \"includeRecords\": true,\n \"submit\": {\n \"allow\": true,\n \"requireLogin\": true\n }\n },\n \"columnMeta\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"createdBy": "<string>",
"createdTime": "<string>",
"columnMeta": {},
"description": "<string>",
"order": 123,
"options": {
"fieldNameDisplayLines": 2,
"frozenColumnCount": 1,
"frozenFieldId": "<string>"
},
"sort": {
"sortObjs": [
{
"fieldId": "<string>"
}
],
"manualSort": true
},
"filter": {},
"group": [
{
"fieldId": "<string>"
}
],
"isLocked": true,
"shareId": "<string>",
"enableShare": true,
"shareMeta": {
"allowCopy": true,
"includeHiddenField": true,
"password": "<string>",
"includeRecords": true,
"submit": {
"allow": true,
"requireLogin": true
}
},
"lastModifiedBy": "<string>",
"lastModifiedTime": "<string>",
"pluginId": "<string>"
}Post table view
Create a view
curl --request POST \
--url https://app.teable.ai/api/table/%7BtableId%7D/view \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"name":"string","type":"grid","description":"string","order":0,"options":{"rowHeight":"short","fieldNameDisplayLines":1,"frozenColumnCount":0,"frozenFieldId":"string"},"sort":{"sortObjs":[{"fieldId":"string","order":"asc"}],"manualSort":true},"filter":{},"group":[{"fieldId":"string","order":"asc"}],"isLocked":true,"shareId":"string","enableShare":true,"shareMeta":{"allowCopy":true,"includeHiddenField":true,"password":"string","includeRecords":true,"submit":{"allow":true,"requireLogin":true}},"columnMeta":{"property1":{"order":0,"width":0,"hidden":true,"statisticFunc":"count"},"property2":{"order":0,"width":0,"hidden":true,"statisticFunc":"count"}}}'const url = 'https://app.teable.ai/api/table/%7BtableId%7D/view';
const options = {
method: 'POST',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
},
body: '{"name":"string","type":"grid","description":"string","order":0,"options":{"rowHeight":"short","fieldNameDisplayLines":1,"frozenColumnCount":0,"frozenFieldId":"string"},"sort":{"sortObjs":[{"fieldId":"string","order":"asc"}],"manualSort":true},"filter":{},"group":[{"fieldId":"string","order":"asc"}],"isLocked":true,"shareId":"string","enableShare":true,"shareMeta":{"allowCopy":true,"includeHiddenField":true,"password":"string","includeRecords":true,"submit":{"allow":true,"requireLogin":true}},"columnMeta":{"property1":{"order":0,"width":0,"hidden":true,"statisticFunc":"count"},"property2":{"order":0,"width":0,"hidden":true,"statisticFunc":"count"}}}'
};
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/view',
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({
name: 'string',
type: 'grid',
description: 'string',
order: 0,
options: {
rowHeight: 'short',
fieldNameDisplayLines: 1,
frozenColumnCount: 0,
frozenFieldId: 'string'
},
sort: {sortObjs: [{fieldId: 'string', order: 'asc'}], manualSort: true},
filter: {},
group: [{fieldId: 'string', order: 'asc'}],
isLocked: true,
shareId: 'string',
enableShare: true,
shareMeta: {
allowCopy: true,
includeHiddenField: true,
password: 'string',
includeRecords: true,
submit: {allow: true, requireLogin: true}
},
columnMeta: {
property1: {order: 0, width: 0, hidden: true, statisticFunc: 'count'},
property2: {order: 0, width: 0, hidden: true, statisticFunc: 'count'}
}
}));
req.end();import http.client
conn = http.client.HTTPSConnection("app.teable.ai")
payload = "{\"name\":\"string\",\"type\":\"grid\",\"description\":\"string\",\"order\":0,\"options\":{\"rowHeight\":\"short\",\"fieldNameDisplayLines\":1,\"frozenColumnCount\":0,\"frozenFieldId\":\"string\"},\"sort\":{\"sortObjs\":[{\"fieldId\":\"string\",\"order\":\"asc\"}],\"manualSort\":true},\"filter\":{},\"group\":[{\"fieldId\":\"string\",\"order\":\"asc\"}],\"isLocked\":true,\"shareId\":\"string\",\"enableShare\":true,\"shareMeta\":{\"allowCopy\":true,\"includeHiddenField\":true,\"password\":\"string\",\"includeRecords\":true,\"submit\":{\"allow\":true,\"requireLogin\":true}},\"columnMeta\":{\"property1\":{\"order\":0,\"width\":0,\"hidden\":true,\"statisticFunc\":\"count\"},\"property2\":{\"order\":0,\"width\":0,\"hidden\":true,\"statisticFunc\":\"count\"}}}"
headers = {
'Authorization': "Bearer REPLACE_BEARER_TOKEN",
'content-type': "application/json"
}
conn.request("POST", "/api/table/%7BtableId%7D/view", 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}/view",
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([
'name' => '<string>',
'description' => '<string>',
'order' => 123,
'options' => [
'fieldNameDisplayLines' => 2,
'frozenColumnCount' => 1,
'frozenFieldId' => '<string>'
],
'sort' => [
'sortObjs' => [
[
'fieldId' => '<string>'
]
],
'manualSort' => true
],
'filter' => [
],
'group' => [
[
'fieldId' => '<string>'
]
],
'isLocked' => true,
'shareId' => '<string>',
'enableShare' => true,
'shareMeta' => [
'allowCopy' => true,
'includeHiddenField' => true,
'password' => '<string>',
'includeRecords' => true,
'submit' => [
'allow' => true,
'requireLogin' => true
]
],
'columnMeta' => [
]
]),
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}/view"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"order\": 123,\n \"options\": {\n \"fieldNameDisplayLines\": 2,\n \"frozenColumnCount\": 1,\n \"frozenFieldId\": \"<string>\"\n },\n \"sort\": {\n \"sortObjs\": [\n {\n \"fieldId\": \"<string>\"\n }\n ],\n \"manualSort\": true\n },\n \"filter\": {},\n \"group\": [\n {\n \"fieldId\": \"<string>\"\n }\n ],\n \"isLocked\": true,\n \"shareId\": \"<string>\",\n \"enableShare\": true,\n \"shareMeta\": {\n \"allowCopy\": true,\n \"includeHiddenField\": true,\n \"password\": \"<string>\",\n \"includeRecords\": true,\n \"submit\": {\n \"allow\": true,\n \"requireLogin\": true\n }\n },\n \"columnMeta\": {}\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}/view")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"order\": 123,\n \"options\": {\n \"fieldNameDisplayLines\": 2,\n \"frozenColumnCount\": 1,\n \"frozenFieldId\": \"<string>\"\n },\n \"sort\": {\n \"sortObjs\": [\n {\n \"fieldId\": \"<string>\"\n }\n ],\n \"manualSort\": true\n },\n \"filter\": {},\n \"group\": [\n {\n \"fieldId\": \"<string>\"\n }\n ],\n \"isLocked\": true,\n \"shareId\": \"<string>\",\n \"enableShare\": true,\n \"shareMeta\": {\n \"allowCopy\": true,\n \"includeHiddenField\": true,\n \"password\": \"<string>\",\n \"includeRecords\": true,\n \"submit\": {\n \"allow\": true,\n \"requireLogin\": true\n }\n },\n \"columnMeta\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teable.ai/api/table/{tableId}/view")
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 \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"order\": 123,\n \"options\": {\n \"fieldNameDisplayLines\": 2,\n \"frozenColumnCount\": 1,\n \"frozenFieldId\": \"<string>\"\n },\n \"sort\": {\n \"sortObjs\": [\n {\n \"fieldId\": \"<string>\"\n }\n ],\n \"manualSort\": true\n },\n \"filter\": {},\n \"group\": [\n {\n \"fieldId\": \"<string>\"\n }\n ],\n \"isLocked\": true,\n \"shareId\": \"<string>\",\n \"enableShare\": true,\n \"shareMeta\": {\n \"allowCopy\": true,\n \"includeHiddenField\": true,\n \"password\": \"<string>\",\n \"includeRecords\": true,\n \"submit\": {\n \"allow\": true,\n \"requireLogin\": true\n }\n },\n \"columnMeta\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"createdBy": "<string>",
"createdTime": "<string>",
"columnMeta": {},
"description": "<string>",
"order": 123,
"options": {
"fieldNameDisplayLines": 2,
"frozenColumnCount": 1,
"frozenFieldId": "<string>"
},
"sort": {
"sortObjs": [
{
"fieldId": "<string>"
}
],
"manualSort": true
},
"filter": {},
"group": [
{
"fieldId": "<string>"
}
],
"isLocked": true,
"shareId": "<string>",
"enableShare": true,
"shareMeta": {
"allowCopy": true,
"includeHiddenField": true,
"password": "<string>",
"includeRecords": true,
"submit": {
"allow": true,
"requireLogin": true
}
},
"lastModifiedBy": "<string>",
"lastModifiedTime": "<string>",
"pluginId": "<string>"
}授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
路径参数
请求体
grid, calendar, kanban, form, gallery, plugin - Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
Show child attributes
Show child attributes
Show child attributes
Show child attributes
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.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
A mapping of view IDs to their corresponding column metadata.
Show child attributes
Show child attributes
响应
Returns data about a view.
grid, calendar, kanban, form, gallery, plugin A mapping of view IDs to their corresponding column metadata.
Show child attributes
Show child attributes
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
Show child attributes
Show child attributes
Show child attributes
Show child attributes
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.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
此页面对您有帮助吗?

