Features

Create Feature

Create a new feature

post/resources/features/v2

Request

Request body

namestring required

String representing the feature name

keystring required

String representing the feature key

descriptionstring

Feature description

metadatastring

JSON String

Example request

{
  "name": "Test Feature",
  "key": "test-feature",
  "description": "This is a test feature",
  "permissions": [
    {
      "permissionKey": "user.read",
      "permissionId": "e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3"
    }
  ],
  "metadata": "{ \"some-key\": \"some-value\" }"
}

Response

idstring required

UUID string representing the feature ID

vendorIdstring required

UUID string representing the vendor ID

namestring required

String representing the feature name

keystring required

String representing the feature key

metadataobject required

JSON String

descriptionstring

Feature description

createdAtstring required

Date when a feature was created

updatedAtstring

Date when a feature was last updated

permissionsstring[]

Array of permissions linked to a feature

Example response

{
  "id": "e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3",
  "vendorId": "e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3",
  "name": "Test Feature",
  "key": "test-feature",
  "description": "This is a test feature",
  "createdAt": "2022-01-01T00:00:00",
  "updatedAt": "2022-01-01T00:00:00",
  "permissions": [
    "permission.read",
    "permission.write"
  ],
  "featureFlag": {
    "id": "e6a5012c-cbeb-4c1e-ab80-e5f43efd44e3",
    "name": "Test Feature Flag",
    "on": true,
    "offTreatment": "false",
    "defaultTreatment": "true",
    "description": "This is a test feature flag",
    "updatedAt": "2022-01-01T00:00:00",
    "createdAt": "2022-01-01T00:00:00"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.