forked from alaress/schoolbox-api-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser@{id}@groupMembership@{groupId}.yaml
75 lines (70 loc) · 2.73 KB
/
user@{id}@groupMembership@{groupId}.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
get:
operationId: userGroupMembershipGet
tags: [user]
summary: Get a users settings for a group
description: |
This will provide you with the current enrolment settings the user has for a specific group. This endpoint is only available for superusers.
responses:
'200':
$ref: ../components/responses/userGroupMembership-item.yaml
default:
$ref: ../components/responses/problem.yaml
post:
operationId: userGroupMembershipPost
tags: [ user ]
summary: Add user to a group
description: |
This will add a user as a member into a group. This membership must not already exist. You will need to provide all the settings for the membership. This endpoint is only available for superusers.
responses:
'201':
$ref: ../components/responses/userGroupMembership-item.yaml
default:
$ref: ../components/responses/problem.yaml
requestBody:
$ref: ../components/requestBodies/userGroupMembership-item.yaml
put:
operationId: userGroupMembershipPut
tags: [user]
summary: Update a user's settings for a group
description: |
This allows you to change the group access level, notification and favourite status of a group for a particular user. The group membership for the user must already exist. The endpoint is only available for superusers.
responses:
'200':
$ref: ../components/responses/userGroupMembership-item.yaml
default:
$ref: ../components/responses/problem.yaml
requestBody:
$ref: ../components/requestBodies/userGroupMembership-item.yaml
patch:
operationId: userGroupMembershipPatch
tags: [user]
summary: Partially update a user's group settings
description: |
This allows you to change only the group access level, notification and favourite status of a group for a particular user. You can use this endpoint to set one setting, leaving the other settings unchanged. The endpoint is only available for superusers.
responses:
'200':
$ref: ../components/responses/userGroupMembership-item.yaml
default:
$ref: ../components/responses/problem.yaml
requestBody:
$ref: ../components/requestBodies/userGroupMembership-item.yaml
delete:
operationId: userGroupMembershipDelete
tags: [user]
summary: Remove this user from a group
description: |
This will remove the relationship between a user and a group, it will also remove any settings related to that group membership. The endpoint is only available for superusers.
responses:
'204':
description: The resource was deleted successfully.
default:
$ref: ../components/responses/problem.yaml
parameters:
- $ref: ../components/parameters/id.yaml
- name: groupId
in: path
required: true
schema:
type: integer
format: int32
minimum: 1