[PR #1432] Integrate Endpoints for Posture Checks #15383

Closed
opened 2026-08-05 03:07:31 -04:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/netbirdio/netbird/pull/1432

State: closed
Merged: Yes


Describe your changes

Introduces a fundamental endpoint for handling posture checks, enabling the functionality to create, read, update, and delete posture checks.

Create a Posture Check

curl --request POST \
  --url http://localhost:33073/api/posture-checks \
  --header 'Accept: application/json' \
  --header 'Authorization: Token <PAT>' \
  --header 'Content-Type: application/json' \
  --data '{
	"name": "Default",
	"description": "This checks if the peer is running the required NetBird's version",
	"checks": {
		"nb_version_check": {
			"min_version": "0.25.0"
		}
	}
}'

List all Posture Checks

curl --request GET \
  --url http://localhost:33073/api/posture-checks \
  --header 'Accept: application/json' \
  --header 'Authorization: Token <PAT>'

Get Posture Check

curl --request GET \
  --url http://localhost:33073/api/posture-checks/<ID>\
  --header 'Accept: application/json' \
  --header 'Authorization: Token <PAT>'

Update Posture Check

curl --request PUT \
  --url http://localhost:33073/api/posture-checks/<ID>\
  --header 'Accept: application/json' \
  --header 'Authorization: Token <PAT>' \
  --header 'Content-Type: application/json' \
  --data '{
	"name": "Default",
	"description": "This checks if the peer is running required NetBird's version",
	"checks": {
		"nb_version_check": {
			"min_version": "1.2.1"
		}
	}
}'

Delete Posture Check

curl --request DELETE \
  --url http://localhost:33073/api/posture-checks/<ID>\
  --header 'Accept: application/json' \
  --header 'Authorization: Token <PAT>'

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary
**Original Pull Request:** https://github.com/netbirdio/netbird/pull/1432 **State:** closed **Merged:** Yes --- ## Describe your changes Introduces a fundamental endpoint for handling posture checks, enabling the functionality to create, read, update, and delete posture checks. Create a Posture Check ``` curl --request POST \ --url http://localhost:33073/api/posture-checks \ --header 'Accept: application/json' \ --header 'Authorization: Token <PAT>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Default", "description": "This checks if the peer is running the required NetBird's version", "checks": { "nb_version_check": { "min_version": "0.25.0" } } }' ``` List all Posture Checks ``` curl --request GET \ --url http://localhost:33073/api/posture-checks \ --header 'Accept: application/json' \ --header 'Authorization: Token <PAT>' ``` Get Posture Check ``` curl --request GET \ --url http://localhost:33073/api/posture-checks/<ID>\ --header 'Accept: application/json' \ --header 'Authorization: Token <PAT>' ``` Update Posture Check ``` curl --request PUT \ --url http://localhost:33073/api/posture-checks/<ID>\ --header 'Accept: application/json' \ --header 'Authorization: Token <PAT>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Default", "description": "This checks if the peer is running required NetBird's version", "checks": { "nb_version_check": { "min_version": "1.2.1" } } }' ``` Delete Posture Check ``` curl --request DELETE \ --url http://localhost:33073/api/posture-checks/<ID>\ --header 'Accept: application/json' \ --header 'Authorization: Token <PAT>' ``` ## Issue ticket number and link ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary
saavagebueno added the pull-request label 2026-08-05 03:07:31 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#15383