Palbase Flags · API
/flags/snapshotTake a snapshot
Every flag's value for the reader, where each came from, and the version it is current as of — what a client starts from, then keeps up to date with deltas. Resolved for the reader: a signed-in user's token (with the publishable key) makes the answer theirs — their own values first, then the variant of the experiment running on a flag when they are one of its people, then the first condition of each flag that matches, then its default. Conditions read what the client declares (platform, versions, locale), the share of users a percentile picks (signed-in users only), the country of the address the edge saw, the server's clock, and the analytics audiences the reader is in — asked of auth (did they allow personalization) and analytics once per read, for the user or, signed in as no one, the installation proven with its secret (X-Palbase-Installation, X-Palbase-Installation-Secret); a reader they cannot answer for is in none. The answer's ETag names the version and everything else it depends on — the audiences the reader is in too: one who entered or left one gets the new answer; sent back as If-None-Match, an unchanged answer is 304. A value an experiment gave names its variant (experiments): the app reports reading it as the analytics event $flag_exposure. Each read is metered (flags.reads).
Called by your app, with the publishable key; or a signed-in user of your app, with their token and the publishable key; or your server, with the project's secret key.
Headers
If-None-Matchstring · optionalThe ETag of the answer the client holds.X-Palbase-Installationstring · optionalThe app installation's id (64 characters at most): counted for version adoption; signed in as no one and proven with X-Palbase-Installation-Secret, whom an audience condition asks about and an experiment places.X-Palbase-Installation-Secretstring · optionalThe installation's secret (kernel/installclaim; 43 to 256 characters): proves the X-Palbase-Installation it was made into. Without it, an installation named is no one for audiences and experiments.X-Platformstring · optionalThe client's platform (client.platform).X-OS-Versionstring · optionalThe operating system's version (client.os_version).X-Palbase-Client-Versionstring · optionalThe app's version (client.app_version).Accept-Languagestring · optionalThe client's languages; the first is client.locale.curl -X GET "https://<your-ref>.palbase.studio/flags/snapshot" \
-H "apikey: $PALBASE_SECRET_KEY"Responses
200The snapshot
304The client holds this answer
401No key, or not a key of this project, or a token that is not valid (the edge's answer)
429The project's request rate, or its flag reads for the period under its quota, are used up; Retry-After says when to try again
503The platform could not answer now; retrying is safe (Retry-After)
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation GetSnapshot of flags's contract.