I'm attempting to patch a feature flag via the API, adding an individual target to the flag following the documentation for patching feature flags.
Targeting an API route of https://app.launchdarkly.com/api/v2/flags/foo/bar
Where bar is a boolean flag, I'm using the body:
{
"instructions":[{"kind": "addUserTargets", "values":["[email protected]"],"variationId": "True"}],
"environmentKey": "development"
}
I am receiving a return of
What am I doing wrong in my request body? I haven't been able to find the variationId through the Darkly UI
Edit: Proof of Proper Headers -
Looking at it further, it appears that you are in fact missing the variation ID on the flag you are attempting to patch, which is a required field.
You would need to make a request to gather that data as described here and then modify your request accordingly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With