Flagr is a feature flagging, A/B testing and dynamic configuration microservice. The base path for all the APIs is "/api/v1".
Dart 1.20.0 or later OR Flutter 0.0.20 or later
dependencies:
flagr: ^1.1.8
Please follow the installation procedure and then run the following:
import 'package:flagr/api.dart';
var api_instance = new ConstraintApi();
var flagID = 789; // int | numeric ID of the flag
var segmentID = 789; // int | numeric ID of the segment
var body = new CreateConstraintRequest(); // CreateConstraintRequest | create a constraint
try {
var result = api_instance.createConstraint(flagID, segmentID, body);
print(result);
} catch (e) {
print("Exception when calling ConstraintApi->createConstraint: $e\n");
}
All URIs are relative to http://localhost/api/v1
Class | Method | HTTP request | Description |
---|---|---|---|
ConstraintApi | createConstraint | post /flags/{flagID}/segments/{segmentID}/constraints | |
ConstraintApi | deleteConstraint | delete /flags/{flagID}/segments/{segmentID}/constraints/{constraintID} | |
ConstraintApi | findConstraints | get /flags/{flagID}/segments/{segmentID}/constraints | |
ConstraintApi | putConstraint | put /flags/{flagID}/segments/{segmentID}/constraints/{constraintID} | |
DistributionApi | findDistributions | get /flags/{flagID}/segments/{segmentID}/distributions | |
DistributionApi | putDistributions | put /flags/{flagID}/segments/{segmentID}/distributions | |
EvaluationApi | postEvaluation | post /evaluation | |
EvaluationApi | postEvaluationBatch | post /evaluation/batch | |
ExportApi | getExportEvalCacheJSON | get /export/eval_cache/json | |
ExportApi | getExportSqlite | get /export/sqlite | |
FlagApi | createFlag | post /flags | |
FlagApi | deleteFlag | delete /flags/{flagID} | |
FlagApi | findFlags | get /flags | |
FlagApi | getFlag | get /flags/{flagID} | |
FlagApi | getFlagEntityTypes | get /flags/entity_types | |
FlagApi | getFlagSnapshots | get /flags/{flagID}/snapshots | |
FlagApi | putFlag | put /flags/{flagID} | |
FlagApi | setFlagEnabled | put /flags/{flagID}/enabled | |
HealthApi | getHealth | get /health | |
SegmentApi | createSegment | post /flags/{flagID}/segments | |
SegmentApi | deleteSegment | delete /flags/{flagID}/segments/{segmentID} | |
SegmentApi | findSegments | get /flags/{flagID}/segments | |
SegmentApi | putSegment | put /flags/{flagID}/segments/{segmentID} | |
SegmentApi | putSegmentsReorder | put /flags/{flagID}/segments/reorder | |
VariantApi | createVariant | post /flags/{flagID}/variants | |
VariantApi | deleteVariant | delete /flags/{flagID}/variants/{variantID} | |
VariantApi | findVariants | get /flags/{flagID}/variants | |
VariantApi | putVariant | put /flags/{flagID}/variants/{variantID} |
- Constraint
- CreateConstraintRequest
- CreateFlagRequest
- CreateSegmentRequest
- CreateVariantRequest
- Distribution
- Error
- EvalContext
- EvalDebugLog
- EvalResult
- EvaluationBatchRequest
- EvaluationBatchResponse
- EvaluationEntity
- Flag
- FlagSnapshot
- Health
- PutDistributionsRequest
- PutFlagRequest
- PutSegmentReorderRequest
- PutSegmentRequest
- PutVariantRequest
- Segment
- SegmentDebugLog
- SetFlagEnabledRequest
- Variant
All endpoints do not require authorization.
Minsu Lee ( amond@amond.net )