Repository navigation
v0.1.0 — Initial Release
querri/embed v0.1.0
The first release of the official PHP SDK for embedding Querri analytics into your application.
Highlights
- One-call embed sessions —
getSession()handles user resolution, access policy creation, and session token generation in a single method call - Full V1 API coverage — 13 resource classes covering Users, Embed, Policies, Dashboards, Projects, Chats, Data, Sources, Files, Keys, Audit, Usage, and Sharing
- Deterministic policy caching — Access policies are auto-created with SHA-256 hashed names (
sdk_auto_{hash}), avoiding duplicate policies - User-scoped client —
$client->asUser($session)accepts aGetSessionResultand returns an FGA-filtered client for row-level access control - Cursor pagination — All list methods return
{data, has_more, next_cursor}with a consistentlimit/afterinterface - Auto-retry with backoff — Rate-limited (429) and server error (5xx) requests are automatically retried with exponential backoff and jitter
- Typed exception hierarchy —
ApiException,ValidationException,AuthenticationException,RateLimitException, and more, with Stripe-style nested error parsing - Environment variable support — Configure via
QUERRI_API_KEY,QUERRI_ORG_ID, andQUERRI_URLenvironment variables
Requirements
- PHP 8.3+
symfony/http-client^7.2
Installation
composer require querri/embedQuick Start
$client = new \Querri\Embed\QuerriClient([
'apiKey' => 'qk_...',
'orgId' => 'org_...',
]);
$session = $client->getSession([
'externalId' => $currentUser->id,
'name' => $currentUser->name,
'email' => $currentUser->email,
'access' => ['dashboards' => ['dash_abc123']],
]);
// Pass $session->token to your frontend embed component
// For user-scoped API access:
$userClient = $client->asUser($session);
$projects = $userClient->projects->list();Resources
Full Changelog: https://github.com/Querri-inc/querri-phpembed/commits/v0.1.0