Introspect MySQL schema
GET
/databases/{id}/schema
const url = 'https://api.reflexdb.cloud/v1/databases/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/schema';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.reflexdb.cloud/v1/databases/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/schema \ --header 'Authorization: Bearer <token>'Connects to the source MySQL server and returns table structure and foreign key relationships. Use this to build a reflexdb.yaml config.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string format: uuid
Database ID
Responses
Section titled “ Responses ”Default Response
Media type application/json
object
tables
required
Array<object>
object
name
required
string
columns
required
Array<object>
object
name
required
string
type
required
string
nullable
required
boolean
key
required
string
relations
required
Array<object>
object
column
required
string
derivedName
required
string
referencedTable
required
string
referencedColumn
required
string
constraintName
required
string
Example generated
{ "tables": [ { "name": "example", "columns": [ { "name": "example", "type": "example", "nullable": true, "key": "example" } ], "relations": [ { "column": "example", "derivedName": "example", "referencedTable": "example", "referencedColumn": "example", "constraintName": "example" } ] } ]}Default Response
Media type application/json
Error
object
error
required
string
message
string
Example generated
{ "error": "example", "message": "example"}Default Response
Media type application/json
Error
object
error
required
string
message
string
Example generated
{ "error": "example", "message": "example"}Default Response
Media type application/json
Error
object
error
required
string
message
string
Example generated
{ "error": "example", "message": "example"}Default Response
Media type application/json
Error
object
error
required
string
message
string
Example generated
{ "error": "example", "message": "example"}