features
features copied to clipboard
Expose features using an HTTP based API
Create a new feature:
POST /features
Parameters:
| Attributes | Required? | Default |
|---|---|---|
| enabled | NO | false |
| key | YES | - |
| users | NO | - |
| percentage | NO | - |
Success will result in a 201 Created response.
{
"enabled": true,
"key":"feature x",
"users": [],
"percentage": 0
}
Update an existing feature:
PUT /features/:feature-key
Success will result in a 200 OK response.
{
"enabled": true,
"key":"feature x",
"users": [],
"percentage": 0
}
Delete an existing feature:
DELETE /features/:feature-key
Success will result in a 204 No Content response.
Not found will result in a 404 Not Found response.
Retrieve an existing feature:
GET /features/:feature-key
Success will result in a 200 OK response.
{
"enabled": true,
"key":"feature x",
"users": [],
"percentage": 0
}
Not found will result in a 404 Not Found response.
Errors
-
Sending invalid JSON will result in a
400 Bad Requestresponse.{ "error":"bad_request", "error_description":"Invalid JSON." } -
Sending invalid fields will result in a
422 Unprocessable Entityresponse.{ "error":"unprocessable_entity", "error_description":"Missing required fields." }