Skip to content

"Field id is required" when patching /api/v2/firewall/rule #504

@michelsup

Description

@michelsup

Describe the bug
When you go to /api/v2/documentation#/FIREWALL/patchFirewallRuleEndpoint, fill an id, and Execute you get a 400 error.

To Reproduce
Go to /api/v2/documentation#/FIREWALL/patchFirewallRuleEndpoint
Select "application/x-www-form-urlencoded"
Enter an existing rule id
Click Execute

Expected behavior
Get a 200 response

Screenshots or Response
curl -X 'PATCH' \ 'https://xxxxx:4443/api/v2/firewall/rule' \ -H 'accept: application/json' \ -H 'Authorization: Basic YWRtaW46UHdldDY0NTch' \ -H 'Content-Type: application/x-www-form-urlencoded' \ -d 'descr=&gateway=&log=&source_port=&floating=&pdnpipe=&ackqueue=&statetype=keep%20state&tcp_flags_set=&quick=&destination=&defaultqueue=&destination_port=&tcp_flags_any=&icmptype=any&sched=&dnpipe=&protocol=&interface=&type=&source=&id=25&disabled=&tcp_flags_out_of=&ipprotocol=&direction=any'

{ "code": 400, "status": "bad request", "response_id": "MODEL_REQUIRES_ID", "message": "Field id is required.", "data": [] }

pfSense Version & Package Version:

  • pfSense Version: 24.03
  • Package Version 2.0

Affected Endpoints:

  • URL: /api/v2/firewall/rule

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementIssues or PRs that enhance existing featuresv2Issues or PRs that apply to v2

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions