Update a Feature
Update a feature given their featureId
.
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 Update Object endpoint instead.
Endpoint
PUT /v1/features/:featureId
Parameters
Parameter | Description | Type | Required |
---|---|---|---|
featureId | The id of the feature to update. Note that id cannot be changed. | URL param | 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 |
Note: Optional fields that are omitted will clear existing values.
Request
- cURL
- Go
- Java
- Node.js
- Python
- Ruby
- PHP
- CLI
curl "https://api.warrant.dev/v1/features/custom-dashboards" \
-X PUT \
-H "Authorization: ApiKey YOUR_KEY" \
--data-raw \
'{ "name": "Custom Dashboards", description: "Grants the users of a tenant the ability to create and save custom dashboards" }'
updatedFeature, err := feature.Update("custom-dashboards", &feature.FeatureParams{
Meta: map[string]interface{}{
"name": "Custom Dashboards",
"description": "Grants the users of a tenant the ability to create and save custom dashboards",
},
})
Map<String, Object> featureMeta = new HashMap<String, Object>();
featureMeta.put("name", "Custom Dashboards");
featureMeta.put("description", "Grants the users of a tenant the ability to create and save custom dashboards");
Feature updatedFeature = client.updateFeature("custom-dashboards", new Feature("custom-dashboards", featureMeta));
const updatedFeature = await warrantClient.Feature.update("custom-dashboards", {
name: "Custom Dashboards",
description:
"Grants the users of a tenant the ability to create and save custom dashboards",
});
feature = warrant.Feature.get("custom-dashboards")
feature.update({"name": "Custom Dashboards", "description": "Grants the users of a tenant the ability to create and save custom dashboards"})
# Class method
updated_feature = Warrant::Feature.update("custom-dashboards", { name: "Custom Dashboards", description: "Grants the users of a tenant the ability to create and save custom dashboards" })
# Instance method
feature = Warrant::Feature.get("custom-dashboards")
feature.update({ name: "Custom Dashboards", description: "Grants the users of a tenant the ability to create and save custom dashboards" })
Response
{
"featureId": "custom-dashboards",
"name": "Custom Dashboards",
"description": "Grants the users of a tenant the ability to create and save custom dashboards"
}