GET/api/accounts

List all Accounts

Returns a list of accounts of a user. Always returns a list of one account.

Request

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

Response

[
  {
    "id": "ch8i4ug6lnn4g9hqv7l0",
    "settings": {
      "peer_login_expiration_enabled": true,
      "peer_login_expiration": 43200,
      "groups_propagation_enabled": true,
      "jwt_groups_enabled": true,
      "jwt_groups_claim_name": "roles",
      "jwt_allow_groups": [
        "Administrators"
      ],
      "extra": {
        "peer_approval_enabled": true
      }
    }
  }
]

DELETE/api/accounts/{accountId}

Delete an Account

Deletes an account and all its resources. Only administrators and account owners can delete accounts.

Path Parameters

  • Name
    accountId
    Type
    string
    Required
    required
    Enum
    Description

    The unique identifier of an account

Request

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

PUT/api/accounts/{accountId}

Update an Account

Update information about an account

Path Parameters

  • Name
    accountId
    Type
    string
    Required
    required
    Enum
    Description

    The unique identifier of an account

Request-Body Parameters

  • Name
    settings
    Type
    object
    Required
    required
    Enum
    Description
    More Information
      • Name
        peer_login_expiration_enabled
        Type
        boolean
        Required
        required
        Enum
        Description

        Enables or disables peer login expiration globally. After peer's login has expired the user has to log in (authenticate). Applies only to peers that were added by a user (interactive SSO login).

      • Name
        peer_login_expiration
        Type
        integer
        Required
        required
        Enum
        Description

        Period of time after which peer login expires (seconds).

      • Name
        groups_propagation_enabled
        Type
        boolean
        Required
        optional
        Enum
        Description

        Allows propagate the new user auto groups to peers that belongs to the user

      • Name
        jwt_groups_enabled
        Type
        boolean
        Required
        optional
        Enum
        Description

        Allows extract groups from JWT claim and add it to account groups.

      • Name
        jwt_groups_claim_name
        Type
        string
        Required
        optional
        Enum
        Description

        Name of the claim from which we extract groups names to add it to account groups.

      • Name
        jwt_allow_groups
        Type
        string[]
        Required
        optional
        Enum
        Description

        List of groups to which users are allowed access

      • Name
        extra
        Type
        object
        Required
        optional
        Enum
        Description
        More Information
          • Name
            peer_approval_enabled
            Type
            boolean
            Required
            optional
            Enum
            Description

            (Cloud only) Enables or disables peer approval globally. If enabled, all peers added will be in pending state until approved by an admin.

Request

PUT
/api/accounts/{accountId}
curl -X PUT https://api.netbird.io/api/accounts/{accountId} \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Token <TOKEN>' \
--data-raw '{
  "settings": {
    "peer_login_expiration_enabled": true,
    "peer_login_expiration": 43200,
    "groups_propagation_enabled": true,
    "jwt_groups_enabled": true,
    "jwt_groups_claim_name": "roles",
    "jwt_allow_groups": [
      "Administrators"
    ],
    "extra": {
      "peer_approval_enabled": true
    }
  }
}'

Response

{
  "id": "ch8i4ug6lnn4g9hqv7l0",
  "settings": {
    "peer_login_expiration_enabled": true,
    "peer_login_expiration": 43200,
    "groups_propagation_enabled": true,
    "jwt_groups_enabled": true,
    "jwt_groups_claim_name": "roles",
    "jwt_allow_groups": [
      "Administrators"
    ],
    "extra": {
      "peer_approval_enabled": true
    }
  }
}