API Call to get connected peers? #138

Closed
opened 2025-11-20 05:06:52 -05:00 by saavagebueno · 5 comments
Owner

Originally created by @itsalljustdata on GitHub (Jun 22, 2022).

Originally assigned to: @mlsmaycon on GitHub.

Is there a way of making a call to get the connected peers? That way i could parse the returned json data (assuming REST) to get a list of the IPs so that I could stick the records into my pihole custom DNS entries dynamically.

Cheers

Originally created by @itsalljustdata on GitHub (Jun 22, 2022). Originally assigned to: @mlsmaycon on GitHub. Is there a way of making a call to get the connected peers? That way i could parse the returned json data (assuming REST) to get a list of the IPs so that I could stick the records into my pihole custom DNS entries dynamically. Cheers
saavagebueno added the enhancement label 2025-11-20 05:06:52 -05:00
Author
Owner

@braginini commented on GitHub (Jun 23, 2022):

@itsalljustdata
In theory yes, but there are caveats.
Web UI calls the Management API to get a list of peers with status:
https://app.netbird.io:33071/api/peers

However, it requires a JWT token that is generated on auth. It expires after a while, so you will need to re-authenticate. Probably this won't fit your use case.

P.S. We are working on API separately and will be releasing it compatible with OpenAPI.

@braginini commented on GitHub (Jun 23, 2022): @itsalljustdata In theory yes, but there are caveats. Web UI calls the Management API to get a list of peers with status: https://app.netbird.io:33071/api/peers However, it requires a JWT token that is generated on auth. It expires after a while, so you will need to re-authenticate. Probably this won't fit your use case. P.S. We are working on API separately and will be releasing it compatible with OpenAPI.
Author
Owner

@itsalljustdata commented on GitHub (Jun 26, 2022):

Cheers Misha.

I'm probably best hanging on for the API to be released.

Although...

Given that I authenticate with github, would that not make the re-authing process easier to manage?

@itsalljustdata commented on GitHub (Jun 26, 2022): Cheers Misha. I'm probably best hanging on for the API to be released. Although... Given that I authenticate with github, would that not make the re-authing process easier to manage?
Author
Owner

@braginini commented on GitHub (Jun 27, 2022):

Cheers Misha.

I'm probably best hanging on for the API to be released.

Although...

Given that I authenticate with github, would that not make the re-authing process easier to manage?

@mlsmaycon what do you think?

@braginini commented on GitHub (Jun 27, 2022): > Cheers Misha. > > I'm probably best hanging on for the API to be released. > > Although... > > Given that I authenticate with github, would that not make the re-authing process easier to manage? @mlsmaycon what do you think?
Author
Owner

@mlsmaycon commented on GitHub (Jul 2, 2022):

Hi @itsalljustdata, we are looking at some alternative to the JWT to serve as authentication, maybe not using your browser session with GitHub, but rather following they concept with personal access tokens(PAT), stay tuned we should have that sorted out by Q4/2022

@mlsmaycon commented on GitHub (Jul 2, 2022): Hi @itsalljustdata, we are looking at some alternative to the JWT to serve as authentication, maybe not using your browser session with GitHub, but rather following they concept with personal access tokens(PAT), stay tuned we should have that sorted out by Q4/2022
Author
Owner

@mlsmaycon commented on GitHub (Jun 16, 2023):

@itsalljustdata we've release support to PATs and Service Users which allow for API calls using tokens. For more details, check out our API docs: https://docs.netbird.io/api

@mlsmaycon commented on GitHub (Jun 16, 2023): @itsalljustdata we've release support to PATs and Service Users which allow for API calls using tokens. For more details, check out our API docs: https://docs.netbird.io/api
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#138