0

[Bug] Parental control's recreation times should be an array

According to the official API and having confirmed by testing, children support PUT requests on data arrays.

Thus, requests.put() towards https://api.nextdns.io/profiles/:profile/parentalcontrol/categories works just as expected since categories are an array of dictionaries (screenshot). In Python:

response = requests.put(
    f'{https://api.nextdns.io/profiles/{PROFILE}/parentalcontrol/categories',
    json=parental_control_dict["categories"], headers=HEADERS)

However, the same can not be achieved with recreation times since both are dictionnaries of dictionnaries, but not arrays (screenshot). Therefore, requests.put() towards f'{https://api.nextdns.io/profiles/{PROFILE}/parentalcontrol/recreation' or f'{https://api.nextdns.io/profiles/{PROFILE}/parentalcontrol/recreation/times' returns an error 404 Not Found. This should be changed or am I missing something?

 

Would be grateful for any hint on how to circumvent this behavior!

Reply

null

Content aside

  • 2 mths agoLast active
  • 44Views
  • 2 Following