跳转到主要内容
PATCH
/
table
/
{tableId}
/
plugin-panel
/
{pluginPanelId}
/
layout
cURL
curl --request PATCH \
  --url https://app.teable.ai/api/table/%7BtableId%7D/plugin-panel/%7BpluginPanelId%7D/layout \
  --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
  --header 'content-type: application/json' \
  --data '{"layout":[{"pluginInstallId":"string","x":0,"y":0,"w":0,"h":0}]}'
const url = 'https://app.teable.ai/api/table/%7BtableId%7D/plugin-panel/%7BpluginPanelId%7D/layout';
const options = {
  method: 'PATCH',
  headers: {
    Authorization: 'Bearer REPLACE_BEARER_TOKEN',
    'content-type': 'application/json'
  },
  body: '{"layout":[{"pluginInstallId":"string","x":0,"y":0,"w":0,"h":0}]}'
};

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: 'PATCH',
  hostname: 'app.teable.ai',
  port: null,
  path: '/api/table/%7BtableId%7D/plugin-panel/%7BpluginPanelId%7D/layout',
  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({layout: [{pluginInstallId: 'string', x: 0, y: 0, w: 0, h: 0}]}));
req.end();
import http.client

conn = http.client.HTTPSConnection("app.teable.ai")

payload = "{\"layout\":[{\"pluginInstallId\":\"string\",\"x\":0,\"y\":0,\"w\":0,\"h\":0}]}"

headers = {
    'Authorization': "Bearer REPLACE_BEARER_TOKEN",
    'content-type': "application/json"
}

conn.request("PATCH", "/api/table/%7BtableId%7D/plugin-panel/%7BpluginPanelId%7D/layout", 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}/plugin-panel/{pluginPanelId}/layout",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'layout' => [
        [
                'pluginInstallId' => '<string>',
                'x' => 123,
                'y' => 123,
                'w' => 123,
                'h' => 123
        ]
    ]
  ]),
  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}/plugin-panel/{pluginPanelId}/layout"

	payload := strings.NewReader("{\n  \"layout\": [\n    {\n      \"pluginInstallId\": \"<string>\",\n      \"x\": 123,\n      \"y\": 123,\n      \"w\": 123,\n      \"h\": 123\n    }\n  ]\n}")

	req, _ := http.NewRequest("PATCH", 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.patch("https://app.teable.ai/api/table/{tableId}/plugin-panel/{pluginPanelId}/layout")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"layout\": [\n    {\n      \"pluginInstallId\": \"<string>\",\n      \"x\": 123,\n      \"y\": 123,\n      \"w\": 123,\n      \"h\": 123\n    }\n  ]\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://app.teable.ai/api/table/{tableId}/plugin-panel/{pluginPanelId}/layout")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"layout\": [\n    {\n      \"pluginInstallId\": \"<string>\",\n      \"x\": 123,\n      \"y\": 123,\n      \"w\": 123,\n      \"h\": 123\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "layout": [
    {
      "pluginInstallId": "<string>",
      "x": 123,
      "y": 123,
      "w": 123,
      "h": 123
    }
  ]
}

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

路径参数

tableId
string
必填
pluginPanelId
string
必填

请求体

application/json
layout
object[]
必填

响应

200 - application/json

The layout of the plugin panel was updated successfully.

id
string
必填
layout
object[]
必填
最后修改于 2026年3月5日