All URIs are relative to http://localhost/api/v1
Method | HTTP request | Description |
---|---|---|
createVariant | POST /flags/{flagID}/variants | |
deleteVariant | DELETE /flags/{flagID}/variants/{variantID} | |
findVariants | GET /flags/{flagID}/variants | |
putVariant | PUT /flags/{flagID}/variants/{variantID} |
Variant createVariant(flagID, body)
var Jsflagr = require('jsflagr');
var apiInstance = new Jsflagr.VariantApi();
var flagID = 789; // Number | numeric ID of the flag
var body = new Jsflagr.CreateVariantRequest(); // CreateVariantRequest | create a variant
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.createVariant(flagID, body, callback);
Name | Type | Description | Notes |
---|---|---|---|
flagID | Number | numeric ID of the flag | |
body | CreateVariantRequest | create a variant |
No authorization required
- Content-Type: application/json
- Accept: application/json
deleteVariant(flagID, variantID)
var Jsflagr = require('jsflagr');
var apiInstance = new Jsflagr.VariantApi();
var flagID = 789; // Number | numeric ID of the flag
var variantID = 789; // Number | numeric ID of the variant
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.deleteVariant(flagID, variantID, callback);
Name | Type | Description | Notes |
---|---|---|---|
flagID | Number | numeric ID of the flag | |
variantID | Number | numeric ID of the variant |
null (empty response body)
No authorization required
- Content-Type: application/json
- Accept: application/json
[Variant] findVariants(flagID)
var Jsflagr = require('jsflagr');
var apiInstance = new Jsflagr.VariantApi();
var flagID = 789; // Number | numeric ID of the flag
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.findVariants(flagID, callback);
Name | Type | Description | Notes |
---|---|---|---|
flagID | Number | numeric ID of the flag |
No authorization required
- Content-Type: application/json
- Accept: application/json
Variant putVariant(flagID, variantID, body)
var Jsflagr = require('jsflagr');
var apiInstance = new Jsflagr.VariantApi();
var flagID = 789; // Number | numeric ID of the flag
var variantID = 789; // Number | numeric ID of the variant
var body = new Jsflagr.PutVariantRequest(); // PutVariantRequest | update a variant
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.putVariant(flagID, variantID, body, callback);
Name | Type | Description | Notes |
---|---|---|---|
flagID | Number | numeric ID of the flag | |
variantID | Number | numeric ID of the variant | |
body | PutVariantRequest | update a variant |
No authorization required
- Content-Type: application/json
- Accept: application/json