# REST-API: Permissions

> Die 5 Operationen des Bereichs Permissions, mit Parametern, Bodys und Antworten.

Source: https://pithyx.org/de/docs/reference/api/permissions/
Markdown: https://pithyx.org/de/docs/reference/api/permissions.md

Erzeugt aus dem OpenAPI-Dokument des Daemons. Konventionen, Anmeldung, der CSRF-Header und der WebSocket stehen unter [API](https://pithyx.org/de/docs/developers/daemon/api/).

## GET /api/groups/{groupId}/grants

Administrators only. Every grant of the group; its members have them all.

**Parameter**

| Name      | Ort  | Typ             | Pflicht | Beschreibung |
| --------- | ---- | --------------- | ------- | ------------ |
| `groupId` | path | integer (int64) | ja      |              |

**Antworten**

- 200: `application/json`: [GroupGrants](https://pithyx.org/de/docs/reference/api/schemas/#groupgrants)

Jeder Fehler antwortet mit Problem Details (`application/problem+json`) und einem stabilen Code aus der [Fehlerreferenz](https://pithyx.org/de/docs/reference/errors/).

## PUT /api/groups/{groupId}/grants

Administrators only. Replaces every grant of the group. Refused when no active administrator would be left.

**Parameter**

| Name      | Ort  | Typ             | Pflicht | Beschreibung |
| --------- | ---- | --------------- | ------- | ------------ |
| `groupId` | path | integer (int64) | ja      |              |

**Anfrage-Body**: `application/json`: [GrantsRequest](https://pithyx.org/de/docs/reference/api/schemas/#grantsrequest)

**Antworten**

- 200: `application/json`: [GroupGrants](https://pithyx.org/de/docs/reference/api/schemas/#groupgrants)

Jeder Fehler antwortet mit Problem Details (`application/problem+json`) und einem stabilen Code aus der [Fehlerreferenz](https://pithyx.org/de/docs/reference/errors/).

## GET /api/permissions/catalog

Administrators only. The special rights, file protocols and apps a grant can name, in the order the editors show them.

**Antworten**

- 200: `application/json`: [PermissionCatalog](https://pithyx.org/de/docs/reference/api/schemas/#permissioncatalog)

Jeder Fehler antwortet mit Problem Details (`application/problem+json`) und einem stabilen Code aus der [Fehlerreferenz](https://pithyx.org/de/docs/reference/errors/).

## GET /api/users/{userId}/grants

Administrators only. The user's own grants, the grants its groups give it (the built-in group users included) and what it may do in the end.

**Parameter**

| Name     | Ort  | Typ             | Pflicht | Beschreibung |
| -------- | ---- | --------------- | ------- | ------------ |
| `userId` | path | integer (int64) | ja      |              |

**Antworten**

- 200: `application/json`: [UserGrants](https://pithyx.org/de/docs/reference/api/schemas/#usergrants)

Jeder Fehler antwortet mit Problem Details (`application/problem+json`) und einem stabilen Code aus der [Fehlerreferenz](https://pithyx.org/de/docs/reference/errors/).

## PUT /api/users/{userId}/grants

Administrators only. Replaces every grant of the user. Refused when no active administrator would be left; applies to the user's next request and is pushed to its desktop.

**Parameter**

| Name     | Ort  | Typ             | Pflicht | Beschreibung |
| -------- | ---- | --------------- | ------- | ------------ |
| `userId` | path | integer (int64) | ja      |              |

**Anfrage-Body**: `application/json`: [GrantsRequest](https://pithyx.org/de/docs/reference/api/schemas/#grantsrequest)

**Antworten**

- 200: `application/json`: [UserGrants](https://pithyx.org/de/docs/reference/api/schemas/#usergrants)

Jeder Fehler antwortet mit Problem Details (`application/problem+json`) und einem stabilen Code aus der [Fehlerreferenz](https://pithyx.org/de/docs/reference/errors/).
