SmartMind Table API
The table API from SmartMind — 7 operation(s) for table.
The table API from SmartMind — 7 operation(s) for table.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/smartmind-table-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: THANOSQL Table API
description: THANOSQL TEST API documentation
version: '1.0'
tags:
- name: Table
paths:
/api/v1/table/:
get:
tags:
- Table
summary: Get Tables
description: 'Gets the paginated list of all the tables from the given schema. If no
schema is provided then the function retreives all of the tables from
all of the schemas. pg_catalog and information_schema related tables are
exempted, unless specified. The API can only return 100 tables at a time,
starting from the offset number specified.
Parameters
----------
- schema : str, default None
The schema to retrieve the tables from. If None is
provided, refers to all schemas.
- verbose: bool, default False
Whether to include only base information or verbose information on the tables.
- offset: int, default 0
The offset position of where to select the tables from.
- limit: int, default 100
The number of tables to retrieve. This value must range from 0 and 100.
Returns
-------
A TablesResponse Pydantic object containing a List of
either Table Pydantic or Base Table Pydantic models depending
on the verbose parameter.'
operationId: get_tables_api_v1_table__get
parameters:
- required: false
schema:
title: Schema
type: string
name: schema
in: query
- required: false
schema:
title: Verbose
type: boolean
default: false
name: verbose
in: query
- required: false
schema:
title: Offset
type: integer
default: 0
name: offset
in: query
- required: false
schema:
title: Limit
type: integer
default: 100
name: limit
in: query
responses:
'200':
description: Successful Response (when verbose is set to True)
content:
application/json:
schema: {}
example:
tables:
- name: string
schema: string
columns:
- id: 0
default: string
is_nullable: true
type: string
name: string
constraints:
primary_key:
name: ''
columns: []
foreign_keys:
- name: string
reference_schema: public
reference_column: string
reference_table: string
column: string
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- Bearer Auth: []
/api/v1/table/{table_name}:
get:
tags:
- Table
summary: Get Table
description: 'Gets the Table object with the specified table_name and
schema. If the schema is not specified, it automatically
defaults to public.
Parameters
----------
table_name: str
schema : str, default public
The schema to retrieve the tables from. If no parameter is
provided, assigned as public.
Returns
-------
A TableResponse Pydantic object containing a Table Pydantic object.'
operationId: get_table_api_v1_table__table_name__get
parameters:
- required: true
schema:
title: Table Name
type: string
name: table_name
in: path
- required: false
schema:
title: Schema
type: string
default: public
name: schema
in: query
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/TableResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- Bearer Auth: []
put:
tags:
- Table
summary: Update Table
description: 'Alters the table specified with the table_name and schema to the
Table object specified in the body parameter.
Instructions
------------
In order to update an object, simply change the values of the Table objects
in the request body. To delete, simply remove the object from the request body.
To add, add the desired object to the request body.
The query is built in the following order:
DROP UNIQUE CONSTRAINT -> DROP PRIMARY KEY -> DROP FOREIGN KEY -> DROP COLUMN -> ADD COLUMN -> ALTER COLUMN ->
RENAME COLUMN -> ADD UNIQUE CONSTRAINT -> ADD PRIMARY KEY -> ADD FOREIGN KEY -> RENAME TABLE -> SET SCHEMA
### Caution:
For the columns, it is important to note that the id is the
unique key used to identify the column. If you remove the column_id key
from the Column object, it will be dropped from the database and be recreated.
Since there is a given order for execution, if your alter requires to not follow the
order above, make sure to separate the API calls.
Parameters
----------
- table_name: str,
- schema : str, default "public"
The schema to retrieve the tables from. If no parameter is
provided, defaults to "public".
- body: AlterTableRequest, default None
Returns
-------
A Table Pydantic object.'
operationId: update_table_api_v1_table__table_name__put
parameters:
- required: true
schema:
title: Table Name
type: string
name: table_name
in: path
- required: false
schema:
title: Schema
type: string
default: public
name: schema
in: query
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AlterTableRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/TableResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- Bearer Auth: []
post:
tags:
- Table
summary: Create Table
description: 'Creates the table in the database using the BaseTableObjects object
provided in the request body, the table_name, and schema.
*Note*: When adding Column objects to the list of columns,
there is no need to specify the id since the id just refers
to the ordinal position of the column. Additionally if
the table is created with an empty body, an empty table will
be created. If no table_name is specified, the table will be
created with a random uuid string.
Parameters
----------
- table_name: str
- schema : str, default "public"
The schema to retrieve the tables from. If no parameter is
provided, defaults to "public".
- if_not_exists: bool, default False
Whether to throw an error if a table of the same name already
exists. When set to False, an error will be shown. When True,
the table will only be created if it does not exist already.
Otherwise, do nothing.
- body: CreateTableRequest, default None
Returns
-------
A Table Pydantic object.'
operationId: create_table_api_v1_table__table_name__post
parameters:
- required: true
schema:
title: Table Name
type: string
name: table_name
in: path
- required: false
schema:
title: Schema
type: string
default: public
name: schema
in: query
- required: false
schema:
title: If Not Exists
type: boolean
default: false
name: if_not_exists
in: query
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateTableRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/TableResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- Bearer Auth: []
delete:
tags:
- Table
summary: Delete Table
description: 'Deletes the table specified by the table_name and schema.
Parameters
----------
- table_name: str
- schema : str, default "public"
The schema to retrieve the tables from. If no parameter is
provided, defaults to "public".
Returns
-------
A TableMessage Pydantic object containing a success message and the table_name.'
operationId: delete_table_api_v1_table__table_name__delete
parameters:
- required: true
schema:
title: Table Name
type: string
name: table_name
in: path
- required: false
schema:
title: Schema
type: string
default: public
name: schema
in: query
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/TableMessageResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- Bearer Auth: []
/api/v1/table/{table_name}/records:
get:
tags:
- Table
summary: Get Records
description: 'Returns the paginated records of the given table specified by the table_name and
schema. The API can only return 100 records at a time, starting from the offset
number specified.
Parameters
----------
- table_name: str
- schema : str, default "public"
The schema to retrieve the tables from. If no parameter is
provided, defaults to "public".
- offset: int, default 0
The offset position of where to select the records from.
- limit: int, default 100
The number of records to retrieve. This value must range from
0 and 100.
Returns
-------
A TableRecordsResponse Pydantic object containing
the records and total number of records.'
operationId: get_records_api_v1_table__table_name__records_get
parameters:
- required: true
schema:
title: Table Name
type: string
name: table_name
in: path
- required: false
schema:
title: Schema
type: string
default: public
name: schema
in: query
- required: false
schema:
title: Offset
type: integer
default: 0
name: offset
in: query
- required: false
schema:
title: Limit
type: integer
default: 100
name: limit
in: query
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/TableRecordsResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- Bearer Auth: []
post:
tags:
- Table
summary: Insert Records
description: 'Inserts the records in the input body into a table in a specified schema.
Parameters
----------
- table_name: str
- records: list[dict]
The list of key-value pairs to be inserted to the table
- schema : str, default "public"
The schema to retrieve the tables from. If no parameter is provided, defaults to "public".
- on_conflict: str, default "fail"
What to do in case (an) inserted value(s) generate(s) a conflict due to the target table''s
unique constraint. Available options:
- "fail" -> gives an error, insertion is only possible if unique constraint(s)
is(are) not violated
- "skip" -> does nothing on conflicted record, doesn''t perform the insertion for that
particular record but doesn''t cancel the entire insertion process
- if user inputs anything other than these two, the server will throw an exception
Returns
-------
A Table Pydantic object.'
operationId: insert_records_api_v1_table__table_name__records_post
parameters:
- required: true
schema:
title: Table Name
type: string
name: table_name
in: path
- required: false
schema:
title: Schema
type: string
default: public
name: schema
in: query
- required: false
schema:
title: On Conflict
type: string
default: fail
name: on_conflict
in: query
requestBody:
content:
application/json:
schema:
title: Records
type: array
items:
type: object
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/TableResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- Bearer Auth: []
/api/v1/table/{table_name}/records/csv:
get:
tags:
- Table
summary: Get records as a CSV file
description: 'Returns the csv of the given table specified by the table_name and
schema.
Parameters
----------
- table_name: str
- schema : str, default "public"
The schema to retrieve the tables from. If no parameter is
provided, defaults to "public".
- timezone_offset: int
The timezone offset applied to the datetime formats. Defaults to 9 (KST).
Returns
-------
A StreamingResponse Pydantic object that iterates through the csv.
If the table is empty, returns a Response object with code 204.'
operationId: get_records_as_csv_api_v1_table__table_name__records_csv_get
parameters:
- required: true
schema:
title: Table Name
type: string
name: table_name
in: path
- required: false
schema:
title: Schema
type: string
default: public
name: schema
in: query
- required: false
schema:
title: Timezone Offset
type: integer
default: 9
name: timezone_offset
in: query
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- Bearer Auth: []
/api/v1/table/{table_name}/upload/csv:
post:
tags:
- Table
summary: Upload Table From Csv
description: 'Inserts records from a CSV file into a table previously created using create_table,
or creates a new table from it.
Parameters
----------
- table_name: the name of the table created by create_table
- schema: database schema, default "public"
- if_exists: what to do if table of the same name already exists, default "fail". available options:
- "fail" -> creates a new table, only possible if no table of the same name exists (fails otherwise)
- "append" -> appends records into an existing table (columns must match in order to not generate an exception)
- "replace" -> deletes an existing table and creates a new one with the same name
- if user inputs anything other than these three, the server will throw an exception
- file: .csv file to be inserted
- body: the request body if table template columns were to be added manually, optional
Returns
-------
A Table Pydantic object.'
operationId: upload_table_from_csv_api_v1_table__table_name__upload_csv_post
parameters:
- required: true
schema:
title: Table Name
type: string
name: table_name
in: path
- required: false
schema:
title: Schema
type: string
default: public
name: schema
in: query
- required: false
schema:
title: If Exists
type: string
default: fail
name: if_exists
in: query
requestBody:
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/Body_upload_table_from_csv_api_v1_table__table_name__upload_csv_post'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/TableResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- Bearer Auth: []
/api/v1/table/{table_name}/upload/excel:
post:
tags:
- Table
summary: Upload Table From Excel
description: 'Inserts records from a type of Excel file into a table previously created using create_table,
or creates a new table from it.
Parameters
----------
- table_name: the name of the table created by create_table
- schema: database schema, default "public"
- if_exists: what to do if table of the same name already exists, default "fail". available options:
- "fail" -> creates a new table, only possible if no table of the same name exists (fails otherwise)
- "append" -> appends records into an existing table (columns must match in order to not generate an exception)
- "replace" -> deletes an existing table and creates a new one with the same name
- if user inputs anything other than these three, the server will throw an exception
- file: Excel file to be inserted
- body: the request body if table schema columns were to be added manually, optional
Returns
-------
A Table Pydantic object.'
operationId: upload_table_from_excel_api_v1_table__table_name__upload_excel_post
parameters:
- required: true
schema:
title: Table Name
type: string
name: table_name
in: path
- required: false
schema:
title: Schema
type: string
default: public
name: schema
in: query
- required: false
schema:
title: If Exists
type: string
default: fail
name: if_exists
in: query
requestBody:
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/Body_upload_table_from_excel_api_v1_table__table_name__upload_excel_post'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/TableResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- Bearer Auth: []
/api/v1/table/{table_name}/upload/json:
post:
tags:
- Table
summary: Upload Table From Json
description: 'Inserts records from JSON into a table previously created using create_table,
or creates a new table from it.
Parameters
----------
- table_name: the name of the table created by create_table
- schema: database schema, default "public"
- if_exists: what to do if table of the same name already exists, default "fail". available options:
- "fail" -> creates a new table, only possible if no table of the same name exists (fails otherwise)
- "append" -> appends records into an existing table (columns must match in order to not generate an exception)
- "replace" -> deletes an existing table and creates a new one with the same name
- if user inputs anything other than these three, the server will throw an exception
- body:
- "table": optionally specify a table object is to be added manually.
- "data": where the json object with the records format (list of json objects) is specified.
Returns
-------
A TableResponse Pydantic object.'
operationId: upload_table_from_json_api_v1_table__table_name__upload_json_post
parameters:
- required: true
schema:
title: Table Name
type: string
name: table_name
in: path
- required: false
schema:
title: Schema
type: string
default: public
name: schema
in: query
- required: false
schema:
title: If Exists
type: string
default: fail
name: if_exists
in: query
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateTableWithJSON'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/TableResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- Bearer Auth: []
components:
schemas:
BaseTableObjects:
title: BaseTableObjects
type: object
properties:
columns:
title: Columns
type: array
items:
$ref: '#/components/schemas/BaseColumn'
constraints:
$ref: '#/components/schemas/Constraints'
AlterTableRequest:
title: AlterTableRequest
required:
- table
type: object
properties:
table:
$ref: '#/components/schemas/Table'
CreateTableRequest:
title: CreateTableRequest
required:
- table
type: object
properties:
table:
$ref: '#/components/schemas/BaseTableObjects'
ForeignKey:
title: ForeignKey
required:
- reference_column
- reference_table
- column
type: object
properties:
name:
title: Name
type: string
reference_schema:
title: Reference Schema
type: string
default: public
reference_column:
title: Reference Column
type: string
reference_table:
title: Reference Table
type: string
column:
title: Column
type: string
CreateTableWithFileRequest:
title: CreateTableWithFileRequest
required:
- table
type: object
properties:
table:
$ref: '#/components/schemas/BaseTableObjects'
Unique:
title: Unique
type: object
properties:
name:
title: Name
type: string
default: ''
columns:
title: Columns
type: array
items:
type: string
default: []
TableRecordsResponse:
title: TableRecordsResponse
required:
- total
type: object
properties:
records:
title: Records
type: array
items:
type: object
total:
title: Total
type: integer
HTTPValidationError:
title: HTTPValidationError
type: object
properties:
detail:
title: Detail
type: array
items:
$ref: '#/components/schemas/ValidationError'
CreateTableWithJSON:
title: CreateTableWithJSON
type: object
properties:
table:
$ref: '#/components/schemas/BaseTableObjects'
data:
title: Data
type: array
items:
type: object
default: []
Column:
title: Column
required:
- type
- name
type: object
properties:
id:
title: Id
type: integer
default:
title: Default
type: string
is_nullable:
title: Is Nullable
type: boolean
default: true
type:
title: Type
type: string
name:
title: Name
type: string
BaseColumn:
title: BaseColumn
required:
- type
- name
type: object
properties:
default:
title: Default
type: string
is_nullable:
title: Is Nullable
type: boolean
default: true
type:
title: Type
type: string
name:
title: Name
type: string
Body_upload_table_from_csv_api_v1_table__table_name__upload_csv_post:
title: Body_upload_table_from_csv_api_v1_table__table_name__upload_csv_post
required:
- file
type: object
properties:
file:
title: File
type: string
format: binary
body:
$ref: '#/components/schemas/CreateTableWithFileRequest'
PrimaryKey:
title: PrimaryKey
type: object
properties:
name:
title: Name
type: string
default: ''
columns:
title: Columns
type: array
items:
type: string
default: []
TableMessageResponse:
title: TableMessageResponse
required:
- message
- table_name
- schema
type: object
properties:
message:
title: Message
type: string
table_name:
title: Table Name
type: string
schema:
title: Schema
type: string
TableResponse:
title: TableResponse
required:
- table
type: object
properties:
table:
$ref: '#/components/schemas/Table'
Body_upload_table_from_excel_api_v1_table__table_name__upload_excel_post:
title: Body_upload_table_from_excel_api_v1_table__table_name__upload_excel_post
required:
- file
type: object
properties:
file:
title: File
type: string
format: binary
body:
$ref: '#/components/schemas/CreateTableWithFileRequest'
Table:
title: Table
type: object
properties:
name:
title: Name
type: string
schema:
title: Schema
type: string
columns:
title: Columns
type: array
items:
$ref: '#/components/schemas/Column'
constraints:
$ref: '#/components/schemas/Constraints'
Constraints:
title: Constraints
type: object
properties:
unique:
title: Unique
type: array
items:
$ref: '#/components/schemas/Unique'
primary_key:
$ref: '#/components/schemas/PrimaryKey'
foreign_keys:
title: Foreign Keys
type: array
items:
$ref: '#/components/schemas/ForeignKey'
ValidationError:
title: ValidationError
required:
- loc
- msg
- type
type: object
properties:
loc:
title: Location
type: array
items:
anyOf:
- type: string
- type: integer
msg:
title: Message
type: string
type:
title: Error Type
type: string
securitySchemes:
Bearer_Auth:
type: apiKey
in: header
name: Authorization
description: 'Enter: **''Bearer <JWT>''**, where JWT is the access token. Example: Bearer access_token_comes_here'