[GH-ISSUE #2658] POST /api/routes/{routeId} Make endpoint idempotent #5743

Open
opened 2026-08-05 01:04:55 -04:00 by saavagebueno · 0 comments
Owner

Originally created by @alexcupertme on GitHub (Sep 27, 2024).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/2658

Describe the problem

Method is not idempotent -> it assigns same peer multiple times, but should throw error

image

To Reproduce

Steps to reproduce the behavior:

  1. POST /api/routes/{routeId} with some peerId
  2. POST again with same peerId

Expected behavior

Throw error

Are you using NetBird Cloud?

Please specify whether you use NetBird Cloud or self-host NetBird's control plane.

NetBird version

netbird version

NetBird status -dA output:

If applicable, add the `netbird status -dA' command output.

Do you face any (non-mobile) client issues?

Please provide the file created by netbird debug for 1m -AS.
We advise reviewing the anonymized files for any remaining PII.

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

Originally created by @alexcupertme on GitHub (Sep 27, 2024). Original GitHub issue: https://github.com/netbirdio/netbird/issues/2658 **Describe the problem** Method is not idempotent -> it assigns same peer multiple times, but should throw error ![image](https://github.com/user-attachments/assets/35895b2f-a364-4c3f-acc4-f2856011b3ec) **To Reproduce** Steps to reproduce the behavior: 1. POST /api/routes/{routeId} with some peerId 2. POST again with same peerId **Expected behavior** Throw error **Are you using NetBird Cloud?** Please specify whether you use NetBird Cloud or self-host NetBird's control plane. **NetBird version** `netbird version` **NetBird status -dA output:** If applicable, add the `netbird status -dA' command output. **Do you face any (non-mobile) client issues?** Please provide the file created by `netbird debug for 1m -AS`. We advise reviewing the anonymized files for any remaining PII. **Screenshots** If applicable, add screenshots to help explain your problem. **Additional context** Add any other context about the problem here.
saavagebueno added the bugmanagement-servicewaiting-feedbackroutesapi labels 2026-08-05 01:04:55 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#5743