Skip to content

bulkdelete ipaddresses: wrong request model defined in spec #204

Closed as not planned
@soumiksamanta

Description

@soumiksamanta

Using the swagger to bulk delete multiple IPAddresses does not work. The request body is a list of IPAddress

curl -X 'DELETE' \
  'http://netbox.nokia.com:8090/api/ipam/ip-addresses/' \
  -H 'accept: */*' \
  -H 'Content-Type: application/json' \
  -H 'X-CSRFTOKEN: GG45Az6VW9x5EouvV3tCX0obbqa80xZ2sCdJujXyXMfskd9Fdpcn4AfwdyXrRHWG' \
  -d '[
  {
    "address": "1.1.1.1/32"
 }
]'

However on executing HTTP 400 is returned

[
  {
    "id": [
      "This field is required."
    ]
  }
]

In fact if the request is sent with list of ids in the body, the deletion is successful with 204 code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions