মূল কনটেন্টে যান

ফ্ল্যাগ: একটি সিদ্ধান্ত

একটি ফিচার ফ্ল্যাগ হলো ইউজার স্টেটের বিপরীতে মূল্যায়িত একটি সিদ্ধান্ত। টার্গেটিং হলো সেই স্টেটের উপর শর্তের একটি সেট, যা ফ্ল্যাগ চাওয়ার মুহূর্তে যাচাই করা হয়।

At a glance

Host
https://api.prodantix.com
Read
GET /v1/flags, GET /v1/flags/snapshot
Write
upsertFlag, archiveFlag over GraphQL
Live updates
flagChange on the project room
Auth
Project key to read, access token to write
  • লাইভ ইউজার স্টেটে রিয়েল-টাইম টার্গেটিং
  • যখন জিজ্ঞাসা করেন তখনই নির্ধারিত হয়, সংরক্ষিত তালিকা থেকে নয়
  • রোলআউট ও এক্সপেরিমেন্ট একই সত্যের উৎসে পরিমাপ করা

এটি কীভাবে কাজ করে

A flag is evaluated against the user state currently on file for a distinct id. Rules are ordered; the first match wins, and a flag with no matching rule falls back to its default. Evaluation is server-side by default, so a rule change takes effect without a client release.

কোথায় অ্যাক্সেস করবেন

SurfaceOperation
RESTGET /v1/flags · GET /v1/flags/snapshot
GraphQLflags query · upsertFlag, archiveFlag mutations
RealtimeflagChange on a project room
MCPprodantix.flags.list · .upsert · .archive

উদাহরণ

curl "https://api.prodantix.com/v1/flags?distinct_id=u_8f3a" \
  -H "Authorization: Bearer $PRODANTIX_KEY"

Evaluating locally

For latency-sensitive paths, fetch the whole ruleset once and evaluate in-process. Snapshot responses carry Cache-Control: public, max-age=30, stale-while-revalidate=300.

JSON
{
  "flags": [
    {
      "key": "new-checkout",
      "enabled": true,
      "rules": [
        { "property": "plan", "operator": "in", "values": ["pro", "scale"] }
      ]
    }
  ]
}