@@ -50,7 +50,7 @@ Let’s set this up:
5050To ** 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' \
6666Create 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' \
8181Next, 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
9494curl -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:
128128To ** 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' \
139139Create 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
152152curl -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