MySQL
API actions for the MySQL integration.
MySQL
Query and manage tables in a MySQL database.
Describe table
Get the schema/structure of a table.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
table | string | Yes | The table name. |
Response
{
"columns": [
{
"Field": "id",
"Type": "int"
}
]
}Execute query
Execute a raw SQL query.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | The SQL query to execute. |
params | array | No | Optional query parameters as an array. |
Response
{
"affected_rows": 0,
"rows": []
}Fetch rows
Fetch rows from a table with optional filtering.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
table | string | Yes | The table name. |
limit | number | No | Maximum number of rows to return. |
Response
{
"rows": [
{
"id": 1,
"name": "John"
}
]
}Insert row
Insert a row into a table.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
table | string | Yes | Table to insert into. |
values | object | Yes | Key-value pairs representing the new row. |
Response
{
"affected_rows": 1,
"inserted_id": 1
}List databases
List all databases accessible with the connection.
Response
{
"databases": [
"information_schema",
"my_app"
]
}List tables
List all tables in a database.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
schema | string | No | Optional schema name to query. |
Response
{
"tables": [
"users",
"orders",
"products"
]
}