Project

General

Profile

Actions

Bug #6973

open

Unnested API POST request fails due to non allowed parameters

Added by Daniel Lobato Garcia almost 10 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
API
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

It must be possible for users to submit unnested POST requests and get the object created. However some (all?) API/v2 controllers beg to differ.

This can be replicated for all properties of api/v2/interfaces, api/v2/external_usergroups, and possibly other controllers.

curl -X POST -u dlobatog:xxxx -H "Content-Type:application/json" http://localhost:3000/api/v2/hosts/19236/interfaces -d '{"domain_id":13232}'

{
  "error": {"message":"domain_id is not allowed as nested parameter for interfaces. Allowed parameters are host_id"}
}

No data to display

Actions

Also available in: Atom PDF