Update feature flags
curl --request PATCH \
--url https://{subdomain}.nudj.cx/api/v2/admin/feature-flags \
--header 'Content-Type: application/json' \
--header 'x-api-token: <api-key>' \
--data '
{
"flags": [
{
"enabled": true
}
]
}
'import requests
url = "https://{subdomain}.nudj.cx/api/v2/admin/feature-flags"
payload = { "flags": [{ "enabled": True }] }
headers = {
"x-api-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({flags: [{enabled: true}]})
};
fetch('https://{subdomain}.nudj.cx/api/v2/admin/feature-flags', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{subdomain}.nudj.cx/api/v2/admin/feature-flags",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'flags' => [
[
'enabled' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.nudj.cx/api/v2/admin/feature-flags"
payload := strings.NewReader("{\n \"flags\": [\n {\n \"enabled\": true\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://{subdomain}.nudj.cx/api/v2/admin/feature-flags")
.header("x-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"flags\": [\n {\n \"enabled\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.nudj.cx/api/v2/admin/feature-flags")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"flags\": [\n {\n \"enabled\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"enabled": true
}
]{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Feature Flags
Update feature flags
Update the state of one or more feature flags.
PATCH
/
feature-flags
Update feature flags
curl --request PATCH \
--url https://{subdomain}.nudj.cx/api/v2/admin/feature-flags \
--header 'Content-Type: application/json' \
--header 'x-api-token: <api-key>' \
--data '
{
"flags": [
{
"enabled": true
}
]
}
'import requests
url = "https://{subdomain}.nudj.cx/api/v2/admin/feature-flags"
payload = { "flags": [{ "enabled": True }] }
headers = {
"x-api-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({flags: [{enabled: true}]})
};
fetch('https://{subdomain}.nudj.cx/api/v2/admin/feature-flags', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{subdomain}.nudj.cx/api/v2/admin/feature-flags",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'flags' => [
[
'enabled' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.nudj.cx/api/v2/admin/feature-flags"
payload := strings.NewReader("{\n \"flags\": [\n {\n \"enabled\": true\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://{subdomain}.nudj.cx/api/v2/admin/feature-flags")
.header("x-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"flags\": [\n {\n \"enabled\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.nudj.cx/api/v2/admin/feature-flags")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"flags\": [\n {\n \"enabled\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"enabled": true
}
]{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Authorizations
Body
application/json
Show child attributes
Show child attributes
Response
Successful response
The feature flag key
Available options:
anonymous-account-conversion, anonymous-login, force-oidc-authentication, user-personalisation, disable-achievements, disable-gamification, fixed-points-distribution, leaderboard, points-system, streaks, anonymise-leaderboard, anonymise-user-data, community-site-navigation, disable-comments-on-posts, disable-achievements-tab, disable-challenges-tab, disable-discover-tab, disable-posts, disable-posts-tab, disable-reward-tab, disable-shop, enable-refer-a-friend, loyalty-card-collection, enable-user-language-switching Whether the feature is enabled
Was this page helpful?
⌘I

