All URIs are relative to http://localhost/api/v1
| Method | HTTP request | Description |
|---|---|---|
| createConstraint | POST /flags/{flagID}/segments/{segmentID}/constraints | |
| deleteConstraint | DELETE /flags/{flagID}/segments/{segmentID}/constraints/{constraintID} | |
| findConstraints | GET /flags/{flagID}/segments/{segmentID}/constraints | |
| putConstraint | PUT /flags/{flagID}/segments/{segmentID}/constraints/{constraintID} |
Constraint createConstraint(flagID, segmentID, body)
var Jsflagr = require('jsflagr');
var apiInstance = new Jsflagr.ConstraintApi();
var flagID = 789; // Number | numeric ID of the flag
var segmentID = 789; // Number | numeric ID of the segment
var body = new Jsflagr.CreateConstraintRequest(); // CreateConstraintRequest | create a constraint
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.createConstraint(flagID, segmentID, body, callback);| Name | Type | Description | Notes |
|---|---|---|---|
| flagID | Number | numeric ID of the flag | |
| segmentID | Number | numeric ID of the segment | |
| body | CreateConstraintRequest | create a constraint |
No authorization required
- Content-Type: application/json
- Accept: application/json
deleteConstraint(flagID, segmentID, constraintID)
var Jsflagr = require('jsflagr');
var apiInstance = new Jsflagr.ConstraintApi();
var flagID = 789; // Number | numeric ID of the flag
var segmentID = 789; // Number | numeric ID of the segment
var constraintID = 789; // Number | numeric ID of the constraint
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.deleteConstraint(flagID, segmentID, constraintID, callback);| Name | Type | Description | Notes |
|---|---|---|---|
| flagID | Number | numeric ID of the flag | |
| segmentID | Number | numeric ID of the segment | |
| constraintID | Number | numeric ID of the constraint |
null (empty response body)
No authorization required
- Content-Type: application/json
- Accept: application/json
[Constraint] findConstraints(flagID, segmentID)
var Jsflagr = require('jsflagr');
var apiInstance = new Jsflagr.ConstraintApi();
var flagID = 789; // Number | numeric ID of the flag
var segmentID = 789; // Number | numeric ID of the segment
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.findConstraints(flagID, segmentID, callback);| Name | Type | Description | Notes |
|---|---|---|---|
| flagID | Number | numeric ID of the flag | |
| segmentID | Number | numeric ID of the segment |
No authorization required
- Content-Type: application/json
- Accept: application/json
Constraint putConstraint(flagID, segmentID, constraintID, body)
var Jsflagr = require('jsflagr');
var apiInstance = new Jsflagr.ConstraintApi();
var flagID = 789; // Number | numeric ID of the flag
var segmentID = 789; // Number | numeric ID of the segment
var constraintID = 789; // Number | numeric ID of the constraint
var body = new Jsflagr.CreateConstraintRequest(); // CreateConstraintRequest | create a constraint
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.putConstraint(flagID, segmentID, constraintID, body, callback);| Name | Type | Description | Notes |
|---|---|---|---|
| flagID | Number | numeric ID of the flag | |
| segmentID | Number | numeric ID of the segment | |
| constraintID | Number | numeric ID of the constraint | |
| body | CreateConstraintRequest | create a constraint |
No authorization required
- Content-Type: application/json
- Accept: application/json