Platform API
Manage your workspaces, apps and versions from your own code.
The Platform API manages the account itself: workspaces, apps, versions and domains. It is a different API from the one that serves the data inside an app. For records and app users, see the App data API.
https://apipublic.yeshbe.com/api/platform/v1Make your first call#
Create a key
Create an API key on the API keys page. It is shown once, at the moment it's created. See API keys.
Send it as a bearer token
Authorization: Bearer yb_live_a3f2c9d1e8b4f7a2c5d9e1b3f6a8c2d4Ask who you are
GET /mereturns the account and exactly what the key you're holding is allowed to do.curl "https://apipublic.yeshbe.com/api/platform/v1/me" \ -H "Authorization: Bearer $YESHBE_KEY"const res = awaitfetch("https://apipublic.yeshbe.com/api/platform/v1/me", { headers: { "Authorization": `Bearer ${process.env.YESHBE_KEY}` } }); const { success, data, error } = await res.json();import os, requests res = requests.get( "https://apipublic.yeshbe.com/api/platform/v1/me", headers={"Authorization": f"Bearer {os.environ['YESHBE_KEY']}"}, ) payload = res.json()
Responses#
Every response has the same shape, whether it succeeded or not. Check success first and read data or error accordingly.
{"success":true,"data":{}}{"success":false,"error":"This key doesn't have the 'apps:write' permission."}Reference#
- API keys Create, limit, revoke and audit keys.
- Permissions The scopes a key can carry.
- Errors and limits Status codes, rate limits and pagination.
- Workspaces List, create, update and delete workspaces.
- Apps List, update, move and delete apps.
- Versions and schema Read an app's versions, schema and collections.
- Domains, usage and account Domains, API usage, credits and the key you're holding.