Features
Update Feature
Applies a partial update. Mutable: name, description, enumValues, metadata. Immutable: key, type — to switch type, archive and create a new Feature.
AuthorizationRequiredBearer <token>
API key as Bearer token
In: header
application/jsonRequired
enumValuesarray<string>
Replaces the list. Only meaningful for type='enum'
idRequiredstring
Feature id
PATCH/v1/features/{id}curl -X PATCH "https://api.3common.com/v1/features/string" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"description": "string",
"enumValues": [
"string"
],
"metadata": {
"property1": "string",
"property2": "string"
}
}'
Default ResponseResponse
{
"data": {
"id": "string",
"hostId": "string",
"key": "string",
"name": "string",
"description": "string",
"type": "boolean",
"enumValues": [
"string"
],
"active": true,
"metadata": {
"property1": "string",
"property2": "string"
},
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
}
TypeScript
export interface Response {
data: {
id?: string;
hostId?: string;
/**
* Application-facing identifier; unique per host
*/
key?: string;
name?: string;
description?: string;
/**
* Feature value shape.
* - boolean: pure on/off
* - quantity: countable (drives Entitlement balance)
* - enum: one of a fixed ordered set of values
* - duration: number of days (or unlimited)
*/
type?: "boolean" | "quantity" | "enum" | "duration";
/**
* Required for type=enum; ordered low→high
*/
enumValues?: string[];
active?: boolean;
metadata?: {
[k: string]: string;
};
createdAt?: string;
updatedAt?: string;
};
}