Retrieving bases
List bases
import { Exabase } from '@exabase/sdk';
const api = new Exabase({
apiKey: process.env.EXABASE_API_KEY!,
});
const bases = await api.bases.list({
limit: 20,
});
curl "https://api.exabase.io/v2/bases?limit=20" \
-H 'X-Api-Key: <EXABASE_API_KEY>'
Querying data within a base
All API endpoints support querying a specific base by including the following HTTP header in your request:
X-Exabase-Base-Id: <BASE_ID>
or
import { Exabase } from '@exabase/sdk';
const api = new Exabase({
apiKey: process.env.EXABASE_API_KEY!,
baseId: <BASE_ID>,
});
or
import { Exabase } from '@exabase/sdk';
const api = new Exabase({
apiKey: process.env.EXABASE_API_KEY!,
});
await api.resourceRoots.list({
limit: 20,
}, { baseId: <BASE_ID> });
curl "https://api.exabase.io/v2/resource-roots?limit=20" \
-H 'X-Api-Key: <EXABASE_API_KEY>' \
-H 'X-Exabase-Base-Id: <BASE_ID>'
Where <BASE_ID> is the ID of the base you want to query.
If the header is not provided, requests are executed against the base associated with the developer API key.