All URIs are relative to http://localhost/api/v1
Method | HTTP request | Description |
---|---|---|
createFlag | POST /flags | |
deleteFlag | DELETE /flags/{flagID} | |
findFlags | GET /flags | |
getFlag | GET /flags/{flagID} | |
getFlagEntityTypes | GET /flags/entity_types | |
getFlagSnapshots | GET /flags/{flagID}/snapshots | |
putFlag | PUT /flags/{flagID} | |
setFlagEnabled | PUT /flags/{flagID}/enabled |
Flag createFlag(body)
var Jsflagr = require('jsflagr');
var apiInstance = new Jsflagr.FlagApi();
var body = new Jsflagr.CreateFlagRequest(); // CreateFlagRequest | create a flag
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.createFlag(body, callback);
Name | Type | Description | Notes |
---|---|---|---|
body | CreateFlagRequest | create a flag |
No authorization required
- Content-Type: application/json
- Accept: application/json
deleteFlag(flagID)
var Jsflagr = require('jsflagr');
var apiInstance = new Jsflagr.FlagApi();
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.');
}
};
apiInstance.deleteFlag(flagID, callback);
Name | Type | Description | Notes |
---|---|---|---|
flagID | Number | numeric ID of the flag |
null (empty response body)
No authorization required
- Content-Type: application/json
- Accept: application/json
[Flag] findFlags(opts)
var Jsflagr = require('jsflagr');
var apiInstance = new Jsflagr.FlagApi();
var opts = {
'limit': 789, // Number | the numbers of flags to return
'enabled': true, // Boolean | return flags having given enabled status
'description': "description_example", // String | return flags exactly matching given description
'tags': "tags_example", // String | return flags with the given tags (comma separated)
'descriptionLike': "descriptionLike_example", // String | return flags partially matching given description
'key': "key_example", // String | return flags matching given key
'offset': 789, // Number | return flags given the offset, it should usually set together with limit
'preload': true // Boolean | return flags with preloaded segments and variants
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.findFlags(opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
limit | Number | the numbers of flags to return | [optional] |
enabled | Boolean | return flags having given enabled status | [optional] |
description | String | return flags exactly matching given description | [optional] |
tags | String | return flags with the given tags (comma separated) | [optional] |
descriptionLike | String | return flags partially matching given description | [optional] |
key | String | return flags matching given key | [optional] |
offset | Number | return flags given the offset, it should usually set together with limit | [optional] |
preload | Boolean | return flags with preloaded segments and variants | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
Flag getFlag(flagID)
var Jsflagr = require('jsflagr');
var apiInstance = new Jsflagr.FlagApi();
var flagID = 789; // Number | numeric ID of the flag to get
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getFlag(flagID, callback);
Name | Type | Description | Notes |
---|---|---|---|
flagID | Number | numeric ID of the flag to get |
No authorization required
- Content-Type: application/json
- Accept: application/json
['String'] getFlagEntityTypes()
var Jsflagr = require('jsflagr');
var apiInstance = new Jsflagr.FlagApi();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getFlagEntityTypes(callback);
This endpoint does not need any parameter.
['String']
No authorization required
- Content-Type: application/json
- Accept: application/json
[FlagSnapshot] getFlagSnapshots(flagID)
var Jsflagr = require('jsflagr');
var apiInstance = new Jsflagr.FlagApi();
var flagID = 789; // Number | numeric ID of the flag to get
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getFlagSnapshots(flagID, callback);
Name | Type | Description | Notes |
---|---|---|---|
flagID | Number | numeric ID of the flag to get |
No authorization required
- Content-Type: application/json
- Accept: application/json
Flag putFlag(flagID, body)
var Jsflagr = require('jsflagr');
var apiInstance = new Jsflagr.FlagApi();
var flagID = 789; // Number | numeric ID of the flag to get
var body = new Jsflagr.PutFlagRequest(); // PutFlagRequest | update a flag
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.putFlag(flagID, body, callback);
Name | Type | Description | Notes |
---|---|---|---|
flagID | Number | numeric ID of the flag to get | |
body | PutFlagRequest | update a flag |
No authorization required
- Content-Type: application/json
- Accept: application/json
Flag setFlagEnabled(flagID, body)
var Jsflagr = require('jsflagr');
var apiInstance = new Jsflagr.FlagApi();
var flagID = 789; // Number | numeric ID of the flag to get
var body = new Jsflagr.SetFlagEnabledRequest(); // SetFlagEnabledRequest | set flag enabled state
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.setFlagEnabled(flagID, body, callback);
Name | Type | Description | Notes |
---|---|---|---|
flagID | Number | numeric ID of the flag to get | |
body | SetFlagEnabledRequest | set flag enabled state |
No authorization required
- Content-Type: application/json
- Accept: application/json