Skip to content

Swagger: Bulk Delete of IPAddress #18749

@soumiksamanta

Description

@soumiksamanta

Deployment Type

Self-hosted

NetBox Version

v4.2.3

Python Version

3.10

Steps to Reproduce

Using the swagger to bulk delete multiple IPAddresses does not work. The request body as per the OpenAPI Spect a list of IPAddress model

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"
}
]'

Expected Behavior

Successful deletion of ipAddresses.
The API spec should match as per the behavior of the server. If the expectation is to provide list of ipAddressIDs as a request to bulkdelete, the OpenAPI spec should reflect the same.

Observed Behavior

However on executing HTTP 400 is returned

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    pending closureRequires immediate attention to avoid being closed for inactivityseverity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: needs ownerThis issue is tentatively accepted pending a volunteer committed to its implementationtopic: OpenAPItype: bugA confirmed report of unexpected behavior in the application

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions