Your first HTTP API call
Start with the public reachability check. You need curl; no account or token is required for this request. Windows examples use Command Prompt (CMD).
- macOS / Linux
- Windows (CMD)
curl -i "https://api.lordbase.com/e/v1/health/"
curl.exe -i "https://api.lordbase.com/e/v1/health/"
Expected HTTP status: 200. Example body:
{"status":"healthy","service":"s0012","version":"1.0.0"}
This proves that the API responded. It does not validate your plan, workspace, token, database credentials or database connectivity.
Before your first protected request
Protected endpoints require account authentication, an active LordBase subscription and resource permissions. The token header is Authorization: Bearer YOUR_DEVELOPER_TOKEN.
The workspace-list request needs read_workspaces (or api). Token creation and rotation happen in the signed-in dashboard. Your script does not need a session cookie.
Create an expiring token with read_workspaces in dashboard Settings. Replace YOUR_DEVELOPER_TOKEN with its value, then run:
- macOS / Linux
- Windows (CMD)
curl -i "https://api.lordbase.com/e/v1/developer/workspaces/" \
-H "Authorization: Bearer YOUR_DEVELOPER_TOKEN" \
-H "Accept: application/json"
curl.exe -i "https://api.lordbase.com/e/v1/developer/workspaces/" -H "Authorization: Bearer YOUR_DEVELOPER_TOKEN" -H "Accept: application/json"
A successful response is an object with two arrays, not a bare list:
{"owned_workspaces":[],"member_workspaces":[]}
Reading the response
Each array is a list of workspace objects, not a number. It is not a count of how many workspaces you belong to; to get a count, use the array length (for example len(member_workspaces)).
| Field | What it contains |
|---|---|
owned_workspaces | Active workspaces you created and own. |
member_workspaces | Active workspaces owned by someone else where you were added as a member or admin. A workspace you own is never repeated here. |
A workspace appears in exactly one of the two arrays, so the total number of workspaces you can use is the length of both arrays added together.
{"owned_workspaces":[],"member_workspaces":[]} is a valid 200 response. It means the token is accepted, but the account currently owns no active workspace and is not a member of any. It is not an error and does not mean the token is wrong. Create a workspace in the dashboard (or with POST /e/v1/developer/workspaces/, which needs write_workspaces) and run the request again; the new workspace appears in owned_workspaces.
Deactivated workspaces are not listed. Members who were only given access to databases (and not to the workspace itself) do not see that workspace in member_workspaces either. If you expect a workspace to appear and it does not, check that it is still active and that your membership was not removed.
Here is a populated example (fields shortened, values illustrative):
{
"owned_workspaces": [
{"id": "22222222-2222-4222-8222-222222222222", "name": "My application", "owner_id": "ACCOUNT_ID", "is_active": true}
],
"member_workspaces": [
{"id": "33333333-3333-4333-8333-333333333333", "name": "Team project", "owner_id": "OTHER_ACCOUNT_ID", "is_active": true}
]
}
Use an id from either array as workspace_id in later requests. If this request fails, record the HTTP status, response body and X-Request-ID, then follow API error diagnosis. See token scopes for permissions and dashboard setup for native database connections.