Table.Get
curl --request GET \
--url https://api.retab.com/v1/tables/{table_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.retab.com/v1/tables/{table_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.retab.com/v1/tables/{table_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.retab.com/v1/tables/{table_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.retab.com/v1/tables/{table_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.retab.com/v1/tables/{table_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.retab.com/v1/tables/{table_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"table": {
"id": "<string>",
"name": "<string>",
"filename": "<string>",
"row_count": 123,
"project_id": "<string>",
"source_file_id": "",
"snapshot_file_id": "",
"columns": [],
"sample_rows": [],
"metadata": {},
"uploaded_by_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"detail": []
}Tables
Get Table
GET
/
v1
/
tables
/
{table_id}
Table.Get
curl --request GET \
--url https://api.retab.com/v1/tables/{table_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.retab.com/v1/tables/{table_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.retab.com/v1/tables/{table_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.retab.com/v1/tables/{table_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.retab.com/v1/tables/{table_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.retab.com/v1/tables/{table_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.retab.com/v1/tables/{table_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"table": {
"id": "<string>",
"name": "<string>",
"filename": "<string>",
"row_count": 123,
"project_id": "<string>",
"source_file_id": "",
"snapshot_file_id": "",
"columns": [],
"sample_rows": [],
"metadata": {},
"uploaded_by_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"detail": []
}Get one table’s metadata, schema, and sample rows.
Python
table = client.tables.get(table_id="workflow_table_123")
TypeScript
const table = await client.tables.get("workflow_table_123");
Go
table, err := client.Tables.Get(ctx, "workflow_table_123")
Java
// Get table metadata with the Retab Java client.
cURL
curl https://api.retab.com/v1/tables/workflow_table_123 \
-H "Authorization: Bearer $RETAB_API_KEY"
⌘I