GET/api/groups

List all Groups

Returns a list of all groups

Request

GET
/api/groups
curl -X GET https://api.netbird.io/api/groups \
-H 'Accept: application/json' \
-H 'Authorization: Token <TOKEN>' 

Response

[
  {
    "id": "ch8i4ug6lnn4g9hqv7m0",
    "name": "devs",
    "peers_count": 2,
    "issued": "api",
    "peers": [
      {
        "id": "chacbco6lnnbn6cg5s90",
        "name": "stage-host-1"
      }
    ]
  }
]

POST/api/groups

Create a Group

Creates a group

Request-Body Parameters

  • Name
    name
    Type
    string
    Required
    required
    Enum
    Description

    Group name identifier

  • Name
    peers
    Type
    string[]
    Required
    optional
    Enum
    Description

    List of peers ids

Request

POST
/api/groups
curl -X POST https://api.netbird.io/api/groups \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Token <TOKEN>' \
--data-raw '{
  "name": "devs",
  "peers": [
    "ch8i4ug6lnn4g9hqv7m1"
  ]
}'

Response

{
  "id": "ch8i4ug6lnn4g9hqv7m0",
  "name": "devs",
  "peers_count": 2,
  "issued": "api",
  "peers": [
    {
      "id": "chacbco6lnnbn6cg5s90",
      "name": "stage-host-1"
    }
  ]
}

GET/api/groups/{groupId}

Retrieve a Group

Get information about a group

Path Parameters

  • Name
    groupId
    Type
    string
    Required
    required
    Enum
    Description

    The unique identifier of a group

Request

GET
/api/groups/{groupId}
curl -X GET https://api.netbird.io/api/groups/{groupId} \
-H 'Accept: application/json' \
-H 'Authorization: Token <TOKEN>' 

Response

{
  "id": "ch8i4ug6lnn4g9hqv7m0",
  "name": "devs",
  "peers_count": 2,
  "issued": "api",
  "peers": [
    {
      "id": "chacbco6lnnbn6cg5s90",
      "name": "stage-host-1"
    }
  ]
}

PUT/api/groups/{groupId}

Update a Group

Update/Replace a group

Path Parameters

  • Name
    groupId
    Type
    string
    Required
    required
    Enum
    Description

    The unique identifier of a group

Request-Body Parameters

  • Name
    name
    Type
    string
    Required
    required
    Enum
    Description

    Group name identifier

  • Name
    peers
    Type
    string[]
    Required
    optional
    Enum
    Description

    List of peers ids

Request

PUT
/api/groups/{groupId}
curl -X PUT https://api.netbird.io/api/groups/{groupId} \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Token <TOKEN>' \
--data-raw '{
  "name": "devs",
  "peers": [
    "ch8i4ug6lnn4g9hqv7m1"
  ]
}'

Response

{
  "id": "ch8i4ug6lnn4g9hqv7m0",
  "name": "devs",
  "peers_count": 2,
  "issued": "api",
  "peers": [
    {
      "id": "chacbco6lnnbn6cg5s90",
      "name": "stage-host-1"
    }
  ]
}

DELETE/api/groups/{groupId}

Delete a Group

Delete a group

Path Parameters

  • Name
    groupId
    Type
    string
    Required
    required
    Enum
    Description

    The unique identifier of a group

Request

DELETE
/api/groups/{groupId}
curl -X DELETE https://api.netbird.io/api/groups/{groupId} \
-H 'Authorization: Token <TOKEN>'