Skip to content

Keep DNAT order (sort_by -> id) #835

@Nyxtorm

Description

@Nyxtorm

Hello,

I'd like to change a destination port on an existing DNAT after identifying its ID, but I want to keep my current manual sorting without having to tinker with a prefix on my descriptions with a sort_by.

Is it possible to simply do a sort_by by ID, which is the only field that matches the order I want to keep?

My test command :

# curl -sk -X PATCH \
  -H "X-API-Key: $APIPF" \
  -H "Content-Type: application/json" \
  "$BASE/api/v2/firewall/nat/port_forward" \
  -d "{
    \"id\": $DNAT_ID,
    \"destination_port\": \"$NEW_PORT\",
    \"local_port\": \"$NEW_PORT\",
    \"sort_by\": \"id\"
  }" | jq
{
  "code": 400,
  "status": "bad request",
  "response_id": "ENDPOINT_SORT_BY_FIELD_NON_EXISTENT_FIELD",
  "message": "Field `sort_by` must be a valid field in the Model.",
  "data": []

Can I update the DNAT without changing anything else?

Thank you in advance for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changeRequires changes that may breaking existing usageenhancementIssues or PRs that enhance existing features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions