Michał Wójcik
10/24/2025, 9:41 AMcompany#member → location#member
The plan for that is use group api.
Firstly I have created groups for each group
workspace: sea.live
@project_id = default
@env_id = user-management
### Create company group instance
curl -X POST "<https://api.permit.io/v2/schema/{{project_id}}/{{env_id}}/groups>" \
-H "Authorization: Bearer {{API_SECRET_KEY}}" \
-H "Content-Type: application/json" \
--data-raw '{
"group_resource_type_key": "company",
"group_instance_key": "clarksons",
"group_tenant": "default"
}'
### Create location group instance
curl -X POST "<https://api.permit.io/v2/schema/{{project_id}}/{{env_id}}/groups>" \
-H "Authorization: Bearer {{API_SECRET_KEY}}" \
-H "Content-Type: application/json" \
--data-raw '{
"group_resource_type_key": "location",
"group_instance_key": "london",
"group_tenant": "default"
}'
Next logical thing is assign group to group, so I have used endpoint
### company → location
curl -X PUT "<https://api.permit.io/v2/schema/{{project_id}}/{{env_id}}/groups/company:clarksons/assign_group>" \
-H "Authorization: Bearer {{API_SECRET_KEY}}" \
-H "Content-Type: application/json" \
--data-raw '{"group_instance_key": "london"}'
response is even I changed to --data-raw '{"group_instance_key": "location:london"}' it is not able to find.
HTTP/1.1 404 Not Found
Date: Fri, 24 Oct 2025 09:37:14 GMT
Content-Type: application/json
Content-Length: 676
Connection: close
server: uvicorn
x-content-type-options: nosniff
referrer-policy: no-referrer
strict-transport-security: max-age=31536000; includeSubDomains; preload
x-request-id: 14661ae9ed184d7bb84c4bba63701abe
access-control-expose-headers: X-Request-ID
{
"id": "14661ae9ed184d7bb84c4bba63701abe",
"title": "We could not find the requested object/s",
"error_code": "NOT_FOUND",
"message": "The requested data could not be found, we could not find 'resourceinstance' with the given filters: env_id='aced0086-602a-49a6-8fbe-0c5aebefeb3a', resource_instance_id='london', resource_id='6195f099-37e1-478e-a3c9-7fb16b1d1412'. Please try again with different filters.\nIf you are sure there is an object with the given filters, contact our support on Slack for further guidance.",
"additional_info": {
"filters": {
"env_id": "aced0086-602a-49a6-8fbe-0c5aebefeb3a",
"resource_instance_id": "london",
"resource_id": "6195f099-37e1-478e-a3c9-7fb16b1d1412"
}
}
}
Group is there and resource instances I can see on the UI:
###
curl -X GET "<https://api.permit.io/v2/schema/{{project_id}}/{{env_id}}/groups>" \
-H "Authorization: Bearer {{API_SECRET_KEY}}"
HTTP/1.1 200 OK
Date: Fri, 24 Oct 2025 09:38:41 GMT
Content-Type: application/json
Content-Length: 603
Connection: close
server: uvicorn
x-content-type-options: nosniff
referrer-policy: no-referrer
strict-transport-security: max-age=31536000; includeSubDomains; preload
x-request-id: 55fd8d5a29df460b912a1a0de8690393
access-control-expose-headers: X-Request-ID
[
{
"assigned_roles": [
"location:london#member"
],
"users": [],
"group_resource_type_key": "location",
"group_instance_key": "london",
"group_tenant": "default"
},
{
"assigned_roles": [
"company:clarksons#member"
],
"users": [],
"group_resource_type_key": "company",
"group_instance_key": "clarksons",
"group_tenant": "default"
}
]
@Ask Inkeep what I missed here ?Ask Inkeep
10/24/2025, 9:41 AMAsk Inkeep
10/24/2025, 9:41 AMcurl -X PUT \
'<https://api.permit.io/v2/schema/{project_id}/{env_id}/groups/{group_instance_key}/assign_group>' \
-H 'authorization: Bearer API_SECRET_KEY' \
--data-raw '{"group_instance_key": "org1"}'
In your case, you're using company:clarksons in the URL path, but based on the example, it appears you should use just the group instance key without the resource type prefix in the URL. The documentation shows using just the instance key in the path.
Try this instead:
curl -X PUT "<https://api.permit.io/v2/schema/{{project_id}}/{{env_id}}/groups/clarksons/assign_group>" \
-H "Authorization: Bearer {{API_SECRET_KEY}}" \
-H "Content-Type: application/json" \
--data-raw '{"group_instance_key": "london"}'
The error message indicates it's looking for a resource instance rather than recognizing this as a group-to-group assignment, whiAsk Inkeep
10/24/2025, 9:41 AMMichał Wójcik
10/24/2025, 10:06 AMcurl -X PUT "<https://api.permit.io/v2/schema/{{project_id}}/{{env_id}}/groups/clarksons/assign_group>" \
-H "Authorization: Bearer {{API_SECRET_KEY}}" \
-H "Content-Type: application/json" \
--data-raw '{"group_instance_key": "london"}'
HTTP/1.1 404 Not Found
Date: Fri, 24 Oct 2025 09:59:33 GMT
Content-Type: application/json
Content-Length: 543
Connection: close
server: uvicorn
x-content-type-options: nosniff
referrer-policy: no-referrer
strict-transport-security: max-age=31536000; includeSubDomains; preload
x-request-id: 9920033ef97a42cfa409a2df73df70d9
access-control-expose-headers: X-Request-ID
{
"id": "9920033ef97a42cfa409a2df73df70d9",
"title": "We could not find the requested object/s",
"error_code": "NOT_FOUND",
"message": "The requested data could not be found, we could not find 'resource' with the given filters: env_id='aced0086-602a-49a6-8fbe-0c5aebefeb3a', resource_id='group'. Please try again with different filters.\nIf you are sure there is an object with the given filters, contact our support on Slack for further guidance.",
"additional_info": {
"filters": {
"env_id": "aced0086-602a-49a6-8fbe-0c5aebefeb3a",
"resource_id": "group"
}
}
}Ask Inkeep
10/24/2025, 10:07 AMAsk Inkeep
10/24/2025, 10:07 AMorg1 to another group:
curl '<https://api.permit.io/v2/schema/{project_id}/{env_id}/groups>' \
...
However, the specific endpoint format for assign_group that you're using isn't clearly documented in the available sources. The error suggests the system is interpreting "groups" in your URL path as a resource type that doesn't exist.
Since you're experiencing this issue with the Groups API endpoints, I'd recommend:
*To help our engineers investigate:*
1. Which Workspace / Project / Env are you using? (You mentioned env_id='aced0086-602a-49a6-8fbe-0c5aebefeb3a')
2. What exact SDK version or API calls are you performing? (You've provided the CURL commands)
3. Which PDP version are you running?
4. Could you share any relevant PDP logs if you have them?
The Groups API documentation shows examples of creating groups and assigning users to groups, but the specific group-to-group assignment endpoint syntax might need clarification from our engineering team.Ask Inkeep
10/24/2025, 10:07 AMAsk Inkeep
10/24/2025, 10:57 AMAsk Inkeep
10/24/2025, 10:58 AMcurl -X POST '<https://api.permit.io/v2/schema/{project_id}/{env_id}/group/company:clarksons/roles>' \
-H 'authorization: Bearer API_SECRET_KEY' \
--data-raw '{"resource": "location", "resource_instance": "london", "role": "member", "tenant":"default"}'
This creates a role assignment where the company:clarksons group gets the member role on the location:london resource instance . The Groups API will then automatically create the necessary derivations between the groups.
The key difference is:
• You're not assigning a group to a group directly
• You're assigning a role to the parent group that references the child group as a resource instance
• The group_instance_key format in role assignments should be type:instance (e.g., company:clarksons)
The automated role derivation will then ensure that members of the company#member role will automatically inherit the location#member role for the london location .
To help our engineers investigate further:
1. Which Workspace / Project / Env are you using (you mentioned sea.live/default/user-management)
2. What SDK calls are you making (you've shown the CURL commands)
3. Which PDP version are you running
4. Could you share relevant logs from your PDPAsk Inkeep
10/24/2025, 10:58 AMAsk Inkeep
10/24/2025, 12:18 PMMichał Wójcik
10/24/2025, 12:42 PMAlon Boshi
10/24/2025, 12:45 PMOr Weis
10/24/2025, 1:11 PMMichał Wójcik
10/24/2025, 2:15 PMThomas
10/24/2025, 2:31 PMThomas
10/24/2025, 3:58 PMThomas
10/24/2025, 3:59 PMThomas
10/24/2025, 3:59 PMMichał Wójcik
10/27/2025, 12:41 PM"Figured it out. it was the *wrong api call.* I created a shell script that is doing everything correctly:"
Could you explain what was wrong with the assign_group endpoint? I see that you have replaced it with the creation of a relationship between resource types. Is it exactly the same?
How is progress on the groups UI going? Could I become a beta tester? :)Alon Boshi
10/27/2025, 12:43 PMShuvy Ankor
10/27/2025, 3:57 PMMichał Wójcik
10/31/2025, 1:42 PMAsk Inkeep
10/31/2025, 1:42 PMAsk Inkeep
10/31/2025, 1:42 PM{
email: str,
tenant_key: str,
role: str,
permission_level: str,
type: ElementsWebhookType = "create_user"
}
• *Invite User* - Triggered when a user is invited
• *Role Assignment* - Triggered when roles are assigned to users
{
user_id: str,
tenant_id: str,
role: str,
permission_level: str,
type: ElementsWebhookType = "role_assignment"
}
*Access Control Events:*
• *Access Request* - Notifications for access request status changes
• *Operation Approval* - Notifications for operation approval workflows
The Ruby SDK also includes webhook models with properties for webhook configuration including URL and bearer token authentication. (2) (3)
For real-time policy and data updates, you might also consider OPAL which supports webhook integration for Git repository changes (4) and can be configured to receive webhooks from services like GitHub, GitLab, Azure DevOps, and Bitbucket.Ask Inkeep
10/31/2025, 1:43 PMOr Weis
10/31/2025, 1:45 PMAsk Inkeep
10/31/2025, 1:45 PMAsk Inkeep
10/31/2025, 1:45 PMPDP_DATA_UPDATE_CALLBACKS configuration allows you to receive webhooks when data updates occur in your PDP. This is triggered after successful data synchronization events.
Additionally, OPAL (which powers the PDP) provides a data update callback feature that can be activated by setting: (2)
OPAL_SHOULD_REPORT_ON_DATA_UPDATES=True
This will trigger HTTP callbacks to a configurable URL after every successful data update, allowing you to track which updates completed successfully and were correctly saved to the OPA cache.
For PDP sync errors specifically, you can configure webhooks to be notified when data synchronization fails: (3)
curl \
-H 'Authorization: Bearer API_SECRET_KEY' \
-H 'Content-Type: application/json' \
-d '{"type": "pdp_sync_error", "url": "<https://your.webhook.receiver/path/to/webhook>"}'
'<https://api.permit.io/v2/projects/{project_id}/envs/{env_id}/webooks>'
The webhook payload for sync errors will include:
{
"org_id": "a40c5d1f-d889-43e9-94ea-b9b33585fc6b",
"project_id": "405d8339-3514-403b-8c43-83ae74cfe0e9",
"env_id": "3f967d0d-4d55-42f3-97c4-6a5455dfe4a6",
"pdp_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"],
}Ask Inkeep
10/31/2025, 1:46 PMThomas
10/31/2025, 1:46 PMThomas
10/31/2025, 1:47 PMMichał Wójcik
11/03/2025, 10:23 AMAlon Boshi
11/03/2025, 10:29 AMAsk Inkeep
11/03/2025, 10:30 AMAsk Inkeep
11/03/2025, 10:30 AMAsk Inkeep
11/03/2025, 10:30 AM