Project

General

Profile

Actions

Bug #22225

closed

Documentation for Modify Settings example missing parameter

Added by Janos Mattyasovszky over 1 year ago. Updated over 1 year ago.

Status:
Released
Priority:
N/A
Category:
Documentation
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
I was bothered the first time
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
Checked
Regression:
No

Description

The curl example at https://docs.rudder.io/api/v/16/#tag/Settings/operation/modifyAllowedNetworks is:

curl --header "X-API-Token: yourToken" --request POST https://rudder.example.com/rudder/api/latest/settings/allowed_networks/root/diff --data '{"allowed_networks": { "delete": ["192.168.1.0/24"], "add": ["192.168.2.0/24"] } }'

It is missing the --header 'Content-Type: application/json', and it will throw a cryptic error message like:

"errorDetails": "Error when trying to modify allowed networks for policy server 'root' <- Impossible to parse allowed networks diff json. Expected {\"allowed_networks\": {\"add\":[\"192.168.2.0/24\", ...]\", \"delete\":[\"192.168.1.0/24\", ...]\"}}, got: nothing" 

Actions

Also available in: Atom PDF