Console: user-groups
Copy as MarkdownThese routes are on the console, port 3375. They take an API token as Authorization: Bearer ndt_...; see API tokens.
User groups.
List user groups.
Ordered by name.
Needs user.view or device.edit. neodesk user-groups list calls it.
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
object | yes |
data.groups |
array of UserGroup | |
data.total |
integer |
| Error | When |
|---|---|
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
Create a user group.
Needs user.edit. neodesk user-groups create calls it.
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
name |
string | yes | The group's name, up to 80 characters; at most 80 characters |
note |
string | A note, up to 500 characters; at most 500 characters | |
team_id |
string | The guid of its team, "" for none |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
object | yes |
data.group |
UserGroup |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
Rename a user group or change its note.
Needs user.edit. neodesk user-groups update calls it.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
guid |
path | string | yes | The user group's guid (see user-groups list) |
Request body, application/json:
| Field | Type | Required | What it is |
|---|---|---|---|
name |
string | yes | The name, up to 80 characters; needed even when only the note changes; at most 80 characters |
note |
string | New note, up to 500 characters; left out, it stays; at most 500 characters | |
team_id |
string | New team guid; left out, it stays |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
success |
true |
yes |
data |
object | yes |
data.group |
UserGroup |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |
Delete a user group. Its members keep their accounts.
Only when you could give every member its role. The limits the group put on its members stay with them, and its section and feature rules go.
Needs user.edit. neodesk user-groups delete calls it. It cannot be undone.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
guid |
path | string | yes | The user group's guid (see user-groups list) |
200: Done (application/json)
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No session or API token, or one that is not valid (code session_required or token_invalid) |
| 403 | The account or the token may not do this, or a write from a browser came without a good CSRF token |
| 404 | There is no such item, or the account does not see it |