Skip to content

v0.1.0 — Initial Release

Choose a tag to compare

@github-actions github-actions released this 10 Mar 11:43
· 39 commits to main since this 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 a GetSessionResult and returns an FGA-filtered client for row-level access control
  • Cursor pagination — All list methods return {data, has_more, next_cursor} with a consistent limit/after interface
  • 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, and QUERRI_URL environment variables

Requirements

  • PHP 8.3+
  • symfony/http-client ^7.2

Installation

composer require querri/embed

Quick 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