List all Accounts
Returns a list of accounts of a user. Always returns a list of one account.
Request
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,
"peer_inactivity_expiration_enabled": true,
"peer_inactivity_expiration": 43200,
"regular_users_view_blocked": true,
"groups_propagation_enabled": true,
"jwt_groups_enabled": true,
"jwt_groups_claim_name": "roles",
"jwt_allow_groups": [
"Administrators"
],
"extra": {
"peer_approval_enabled": true
}
}
}
]
Delete an Account
Deletes an account and all its resources. Only account owners can delete accounts.
Path Parameters
- Name
accountId
- Type
- string
- Required
- required
- Enum
- Description
The unique identifier of an account
Request
curl -X DELETE https://api.netbird.io/api/accounts/{accountId} \
-H 'Authorization: Token <TOKEN>'
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
peer_inactivity_expiration_enabled
- Type
- boolean
- Required
- required
- Enum
- Description
Enables or disables peer inactivity expiration globally. After peer's session has expired the user has to log in (authenticate). Applies only to peers that were added by a user (interactive SSO login).
- Name
peer_inactivity_expiration
- Type
- integer
- Required
- required
- Enum
- Description
Period of time of inactivity after which peer session expires (seconds).
- Name
regular_users_view_blocked
- Type
- boolean
- Required
- required
- Enum
- Description
Allows blocking regular users from viewing parts of the system.
- 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
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,
"peer_inactivity_expiration_enabled": true,
"peer_inactivity_expiration": 43200,
"regular_users_view_blocked": true,
"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,
"peer_inactivity_expiration_enabled": true,
"peer_inactivity_expiration": 43200,
"regular_users_view_blocked": true,
"groups_propagation_enabled": true,
"jwt_groups_enabled": true,
"jwt_groups_claim_name": "roles",
"jwt_allow_groups": [
"Administrators"
],
"extra": {
"peer_approval_enabled": true
}
}
}