editor

command
v1.36.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 15 Imported by: 0

README

Playground API

The editor API is used to evaluate your flags for testing purposes.

It has been built to test your configuration in the Flag editor.

Flag Test API

This API is testing an evaluation context with a flag configuration.
All the information are expected in JSON.

Example of request
{
  "context": {
    "key": "aae1cb41-c3cb-4753-a117-031ddc958e81",
    "custom": {
      "name": "John Doe",
      "email": "john.doe@gofeatureflag.org"
    }
  },
  "flagName": "my-flag-name",
  "flag": {
    "variations": {
      "Default": false,
      "A": false,
      "B": true
    },
    "targeting": [
      {
        "query": "key eq \"aae1cb41-c3cb-4753-a117-031ddc958e81\"",
        "percentage": {
          "A": 0,
          "B": 100
        }
      }
    ],
    "defaultRule": {
      "variation": "Default"
    }
  }
}
Example of response
{
    "trackEvents": false,
    "variationType": "B",
    "failed": false,
    "version": "",
    "reason": "TARGETING_MATCH",
    "errorCode": "",
    "value": true,
    "cacheable": true
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL