Create a Feature
Create a new feature.
caution
This endpoint has been deprecated and will be phased out at the end of 2023. Please update any existing usages of it to use the Create Object endpoint instead.
Endpoint
POST /v1/features
Parameters
Parameter | Description | Type | Required |
---|---|---|---|
featureId | A string identifier for the feature. A featureId must be composed of alphanumeric chars and/or _ , - , . , @ , | , and : . | JSON body | yes |
name | An optional, display-friendly name for the feature. | JSON body | no |
description | An optional description of the feature. A useful description might include a summary of the functionality the feature grants. | JSON body | no |
Request
- cURL
- Go
- Java
- Node.js
- Python
- Ruby
- PHP
- CLI
curl "https://api.warrant.dev/v1/features" \
-X POST \
-H "Authorization: ApiKey YOUR_KEY" \
--data-raw \
'{
"featureId":"new-feature-2",
"name":"New Feature 2",
"description":"Grants the user access to experimental New Feature 2"
}'
newFeature, err := feature.Create(&feature.FeatureParams{
FeatureId: "new-feature-2",
Name: "New Feature 2",
Description: "Grants the user access to experimental New Feature 2",
})
Map<String, Object> featureMeta = new HashMap<String, Object>();
featureMeta.put("name", "New Feature 2");
featureMeta.put("description", "Grants the user access to experimental New Feature 2");
Feature newFeature = client.createFeature(new Feature(
"new-feature-2",
featureMeta
));
const newFeature = await warrantClient.Feature.create({
featureId: "dashboard",
meta: {
name: "New Feature 2",
description: "Grants the user access to experimental New Feature 2",
}
});
created_feature = warrant.Feature.create("new-feature-2", {"name": "New Feature 2", "description" "Grants the user access to experimental New Feature 2"})
created_feature = Warrant::Feature.create(
feature_id: "new-feature-2",
name: "New Feature 2",
description: "Grants the user access to experimental New Feature 2"
)
warrant create feature new-feature-2
Response
{
"featureId": "new-feature-2",
"name": "New Feature 2",
"description": "Grants the user access to experimental New Feature 2"
}