S3 API

For S3 connectors, the API exposes endpoints to read and write files.

Index

Pass a folder path to list the files within.

http request GET https://core.orbitype.com/api/s3/v1?path=blog/posts/

Response:

[
  "blog/posts/alpha.json",
  "blog/posts/bravo.json",
  "blog/posts/charlie.json"
]

Show

Pass a file path to get its body.

http request GET https://core.orbitype.com/api/s3/v1?path=blog/posts/alpha.json

Response:

{
  "title": "Alpha",
  "text": "Lorem ispum dolor."
}

Store

Create or overwrite a text file by passing a path and body.

Request:

http request PUT https://core.orbitype.com/api/s3/v1  

Response:


{
  "path": "blog/posts/neo.json",
  "body": { "title": "Neo", "text": "Another post" }
}

blog/posts/neo.json

Destroy

Delete a file by passing a path.


http request
DELETE https://core.orbitype.com/api/s3/v1
{
"path": "blog/posts/alpha.json"
}

blog/posts/alpha.json

Copy

Copy a file by passing paths for from and to.

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

{
  "from": "blog/posts/alpha.json",
  "to": "blog/posts/alpha-copy.json"
}

blog/posts/alpha-copy.json

Upload

To create a non-text media file, send a multipart/form-data request.

Pass the path as a query param and the file as part of the form request.

http request
POST https://core.orbitype.com/api/s3/v1/upload
?path=blog/media/cover.jpg
Content-Type: multipart/form-data
Content-Disposition: form-data; name="file"; filename="cover.jpg"
Content-Type: image/jpeg

blog/media/cover.jpg

Learn more

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.

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?