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

REST API

পাবলিক REST সারফেস তিনটি হোস্টে চলে: একটি ফ্ল্যাগ ও বার্তার জন্য, একটি ইভেন্ট ইনজেশনের জন্য, একটি সেশন রিপ্লের জন্য। প্রতিটি নিজস্ব OpenAPI ডকুমেন্ট পরিবেশন করে।

HostServesOpenAPI
https://api.prodantix.comFlags, messaging, GraphQLhttps://api.prodantix.com/openapi.json
https://eu.api.prodantix.comEvent ingestion (EU)https://eu.api.prodantix.com/openapi.json
https://eu.replay.prodantix.comSession replay (EU)https://eu.replay.prodantix.com/openapi.json

প্রমাণীকরণ

প্রতিটি REST অপারেশন একটি প্রজেক্ট কী Bearer টোকেন হিসেবে গ্রহণ করে। প্রজেক্ট কী একটি প্রজেক্টের জন্য নির্দিষ্ট; ক্লায়েন্ট-সাইড কোডে কখনও গোপন কী রাখবেন না।

JSON
{
  "Authorization": "Bearer <project key>"
}

Operations

MethodPathPurpose
GET/v1/flagsEvaluate every flag for a distinct id
GET/v1/flags/snapshotFetch the project's full ruleset for local evaluation
GET/v1/messagesRead a user's in-app inbox
POST/v1/messages/readMark an in-app message read
POST/v1/eventsIngest a batch of events
POST/v1/identifyIdentify a user and set traits
POST/v1/groupAssociate a user with a group
POST/v1/replayUpload a session replay chunk

Evaluate flags for a user

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

The three ingestion operations (/v1/events, /v1/identify, /v1/group) have their own reference: the Ingest API page carries the batch shape, the envelope rules and what a 202 does and does not promise.

OpenAPI ডকুমেন্ট

প্রতিটি হোস্ট তার নিজস্ব অপারেশনগুলি /openapi.json-এ পরিবেশন করে। একত্রিত ভিউ এই সাইটের API রেফারেন্স পৃষ্ঠায় রয়েছে।