Doku durchsuchen
Menü
Geändert am Auf GitHub bearbeiten

Konsole: user-groups

Als Markdown kopieren

Diese Routen liegen auf der Konsole, Port 3375. Sie nehmen ein API-Token als Authorization: Bearer ndt_...; siehe API-Tokens. Die Beschreibungen stehen auf Englisch, wie in der OpenAPI-Beschreibung.

User groups.

GET /api/panel/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

POST /api/panel/user-groups

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

PATCH /api/panel/user-groups/{guid}

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 /api/panel/user-groups/{guid}

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)

ConsoleSuccess.

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

Durchsucht Seiten, Abschnitte, Befehle und Einstellungen.