API

API playground

Send real requests to your own Kanesh from this page and get the matching code.

Pick an endpoint, press Send request, and see the real response from your Kanesh. The code below it updates for cURL, Node.js, Go and Python. The playground only reads data.

Allow this page first

Your browser calls Kanesh directly from this page, so Kanesh must allow this site’s origin. Start Kanesh with:

CORS_ENABLED=true CORS_ORIGINS=https://YOUR_KANESH_SITE

Use the origin shown in the error message if a call fails. See CORS for details. Studio’s own API reference needs no CORS and also runs write calls with a confirmation.

Try it

  1. Create a personal token in Studio under Account settings and paste it into Access token. Kanesh does not accept sign-in from other sites, so a token is the way in.
  2. Run List workspaces and copy an id into Workspace ID.
  3. Run List collections and copy an id into Collection ID.
  4. Run List records and edit the query.

GEThttp://127.0.0.1:8080/health/live

Response

Send a request to see the response here.

Code

curl 'http://127.0.0.1:8080/health/live'
const res = await fetch("http://127.0.0.1:8080/health/live");
console.log(res.status, await res.json());
req, _ := http.NewRequest("GET", "http://127.0.0.1:8080/health/live", nil)
res, err := http.DefaultClient.Do(req)
import requests

res = requests.get("http://127.0.0.1:8080/health/live")
print(res.status_code, res.json())

The token stays in this tab only and is sent only to the server you typed. Revoke it in Studio when you are done.

Buy me a coffee