Skip to content

Commit b905fed

Browse files
authored
Merge pull request #470 from permitio/maya/per-11272-move-groups-api-to-schema-from-facts
move groups to /schema
2 parents 93d0623 + a375d6a commit b905fed

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/api/rebac/groups.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Let’s set this up:
5050
To **create a new group**, make a POST request with the following data:
5151

5252
```bash
53-
curl 'https://api.permit.io/v2/facts/{project_id}/{env_id}/groups' \
53+
curl 'https://api.permit.io/v2/schema/{project_id}/{env_id}/groups' \
5454
-H 'authorization: Bearer API_SECRET_KEY' \
5555
--data-raw '{"group_instance_key": "marketing", "group_resource_type_key": "teams", "group_tenant": "default"}'
5656
```
@@ -66,7 +66,7 @@ curl 'https://api.permit.io/v2/schema/{proj_id}/{env_id}/resources' \
6666
Create a `training_video` resource instance:
6767

6868
```bash
69-
curl 'https://api.permit.io/v2/facts/{proj_id}/{env_id}/resource_instances' \
69+
curl 'https://api.permit.io/v2/schema/{proj_id}/{env_id}/resource_instances' \
7070
-H 'authorization: Bearer API_SECRET_KEY' \
7171
--data-raw '{"key": "training_video", "tenant": "business", "resource":"social_media"}'
7272
```
@@ -81,7 +81,7 @@ curl 'https://api.permit.io/v2/schema/{proj_id}/{env_id}/roles' \
8181
Next, we assign the `editor` role to the `marketing-team` group instance:
8282

8383
```bash
84-
curl 'https://api.permit.io/v2/facts/{project_id}/{env_id}/group/{group_resource_type_key}/roles' \
84+
curl 'https://api.permit.io/v2/schema/{project_id}/{env_id}/group/{group_resource_type_key}/roles' \
8585
-H 'authorization: Bearer API_SECRET_KEY' \
8686
--data-raw '{"resource": "social_media", "resource_instance": "training_video", "role": "editor", tenant:"business"}'
8787
```
@@ -92,7 +92,7 @@ To **add users to a group**, make a PUT request with the following data:
9292

9393
```bash
9494
curl -X PUT \
95-
'https://api.permit.io/v2/facts/{project_id}/{env_id}/groups/{group_resource_type_key}/users/{user_id}' \
95+
'https://api.permit.io/v2/schema/{project_id}/{env_id}/groups/{group_resource_type_key}/users/{user_id}' \
9696
-H 'authorization: Bearer API_SECRET_KEY' \
9797
--data-raw '{"tenant":"business"}'
9898
```
@@ -128,7 +128,7 @@ Let’s set this up:
128128
To **create a new group** with Group instance `support`, make a POST request with the following data:
129129

130130
```bash
131-
curl 'https://api.permit.io/v2/facts/{project_id}/{env_id}/groups' \
131+
curl 'https://api.permit.io/v2/schema/{project_id}/{env_id}/groups' \
132132

133133
-H 'authorization: Bearer API_SECRET_KEY' \
134134

@@ -139,7 +139,7 @@ curl 'https://api.permit.io/v2/facts/{project_id}/{env_id}/groups' \
139139
Create another Group instance `org1`:
140140

141141
```bash
142-
curl 'https://api.permit.io/v2/facts/{project_id}/{env_id}/groups' \
142+
curl 'https://api.permit.io/v2/schema/{project_id}/{env_id}/groups' \
143143

144144
-H 'authorization: Bearer API_SECRET_KEY' \
145145

@@ -151,7 +151,7 @@ Now, we want to create a connection between those two group instances.
151151
```bash
152152
curl -X PUT \
153153

154-
'https://api.permit.io/v2/facts/{project_id}/{env_id}/groups/{group_instance_key}/assign_group' \
154+
'https://api.permit.io/v2/schema/{project_id}/{env_id}/groups/{group_instance_key}/assign_group' \
155155

156156
-H 'authorization: Bearer API_SECRET_KEY' \
157157

0 commit comments

Comments
 (0)