No results for ""
EXPAND ALL
  • Home
  • API docs

GIVE DOCS FEEDBACK

Feature stores capability

Read time: 2 minutes
Last edited: May 01, 2024

Overview

This topic explains how to use the feature stores integration framework capability.

About feature stores

Feature stores let LaunchDarkly write feature flag data to a given provider. To learn more, read Persistent data stores.

The feature store capability lets you to specify an endpoint that can receive a payload containing up-to-date flag data from LaunchDarkly.

In addition to formVariables, the featureStore has two properties:

  • featureStoreRequest
  • (optional) validationRequest

To learn more about form variables, read Using form variables.

The feature store request property

This specifies the request endpoint that LaunchDarkly makes when flag data are updated. You can do this using an endpoint and a parser. To learn more, read Endpoints.

In addition to the form variables defined in your manifest, you can use the special variable _featureStoreKey. _featureStoreKey is provided by LaunchDarkly, and is unique per environment.

The validation request property

Specifying an optional validation request lets members verify that they have properly filled out the details to correctly make a request.

The parser object lets LaunchDarkly interpret the response of the validation request. It allows a mapping of success and errors for the given response body of the request in the form of a JSON pointer. The parser object has two properties: a required success and an optional error.

Here is an example parser object:

"parser": {
"success": "/success",
"error": "/error"
},

Choose an endpoint with a response that will indicate that the specified form variables are correct, but has no side effects.

Here is an example featureStore capability:

"featureStoreRequest": {
"endpoint": {
"url": "https://example.com/{{accountId}}/dictionary/{{dictId}}/item/{{_featureStoreKey}}",
"method": "PUT",
"headers": [
{
"name": "Authorization",
"value": "Bearer {{apiToken}}"
},
{
"name": "Content-Type",
"value": "text/plain"
}
]
}
},
"validationRequest": {
"endpoint": {
"url": "https://example.com/{{accountId}}/dictionary/{{dictId}}/items",
"method": "GET",
"headers": [
{
"name": "Authorization",
"value": "Bearer {{apiToken}}"
}
]
},
"parser": {
"success": "/success"
}
}