SQL API

For SQL connectors, the API exposes an endpoint to execute prepared SQL

statements. The HTTP Method conveys intention, but you may pass any valid

combination of sql and bindings.

Index

Use a SELECT statement to fetch a list of rows.

http request GET https://core.orbitype.com/api/sql/v1?sql=SELECT * FROM posts

Response:

[
  {
    "id": 1,
    "title": "Alpha"
  },
  {
    "id": 2,
    "title": "Bravo"
  },
  {
    "id": 3,
    "title": "Charlie"
  }
]

Show

Use a WHERE clause to filter it down.

http request GET https://core.orbitype.com/api/sql/v1?sql=SELECT * FROM posts WHERE id = :id &bindings[id]=2

Response:

[
  {
    "id": 2,
    "title": "Bravo"
  }
]

Create

Use an INSERT statement to create a new row.

http request POST https://core.orbitype.com/api/sql/v1

{
  "sql": "INSERT INTO posts (title) VALUES (:title) RETURNING *",
  "bindings": {
    "title": "Delta"
  }
}

Response:

[
  {
    "id": 4,
    "title": "Delta"
  }
]

Update

Use an UPDATE statement to change an existing row.

http request POST https://core.orbitype.com/api/sql/v1

{
  "sql": "UPDATE posts SET title = :title WHERE id = 4 RETURNING *",
  "bindings": {
    "title": "New title"
  }
}

Response:

[
  {
    "id": 4,
    "title": "New title"
  }
]

Destroy

Use a DELETE statement to remove an existing row.

http request POST https://core.orbitype.com/api/sql/v1

{
  "sql": "DELETE FROM posts WHERE id = :id RETURNING *",
  "bindings": {
    "id": 4
  }
}

Response:

[
  {
    "id": 4,
    "title": "Delta"
  }
]

Learn more

Database settings

Fine-tune how Orbitype interacts with your database. Among other things, you can hide tables from non-technical users and define aliases.

SQL wizard

Use the SQL wizard to quickly and easily create database tables. Even without any coding knowledge, you'll be able to create whatever data structure you need.

Cookbook - Sections

Modern webpages are often composed of many different sections.

Things like hero banners, testimonials, FAQs or simple text blocks.

Developers implement these as reusable components with props.

But how do we allow non-technical people to use them in Orbitype?

🚀 Limited 75% Off Deal