Skip to Content
Feature Flags

Test Feature Flag

POST
/v0/projects/{idOrSlug}/feature-flags/{flagId}/test

Authorization

apiKeyAuth
headerx-api-key<token>

FastStats API key. Pass it in the x-api-key header or as a Bearer token in the Authorization header.

Path Parameters

idOrSlug*string
flagId*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$
Formatuuid

Request Body

application/json
  1. body
identifier?string|null|null
userId?string|null|null
attributes?|null
userAgent?string|null|null
country?string|null|null

Response Body

TestFeatureFlagResult

application/json
  1. response
value*unknown
variant*string
reason*string
ruleId?string|null|null
attributes*
trace*
Example Request
curl -X POST 'https://api.faststats.dev/v0/projects/string/feature-flags/497f6eca-6276-4993-bfeb-53cbbbba6f08/test' \
  -H 'Content-Type: application/json' \
  -d '{}'
Example Response
{
  "value": null,
  "variant": "string",
  "reason": "string",
  "ruleId": "string",
  "attributes": {},
  "trace": {
    "prerequisites": [
      {
        "flagKey": "string",
        "servedVariant": "string",
        "passed": true
      }
    ],
    "rules": [
      {
        "ruleId": "string",
        "name": "string",
        "matched": true,
        "conditions": [
          {
            "attribute": "string",
            "operator": "string",
            "actual": null,
            "matched": true
          }
        ]
      }
    ],
    "bucket": 0,
    "bucketedBy": "identifier"
  }
}