Hi everyone. I am getting an error when trying to ...
# permit-saas
o
Hi everyone. I am getting an error when trying to delete instance access via Permit UI or api for a group. Getting 404 error.
{
"id": "4e0999d85d84409ab63aade7e4032b39",
"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='env-id', project_id='[project-id]', resource_instance_id='01V4UVC3N7YU7DPWXSH5D23GVWWFB7D3T2', resource_id='4795d4a5-434c-462d-a399-c3639af55f76'. 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": "env-id",
"project_id": "project-id",
"resource_instance_id": "01V4UVC3N7YU7DPWXSH5D23GVWWFB7D3T2",
"resource_id": "4795d4a5-434c-462d-a399-c3639af55f76"
}
}
}
a
Hi @Oleksii Flok, I'm an AI assistant for Permit.io. I'll analyze available sources and get back to you shortly.
p
Hey, thanks for reaching out ! It seems our team is a little busy right now, a human will be with you within the next hour or so. In the meantime, can I help you ?
a
The 404 error indicates the resource instance cannot be found with the filters you're providing (1) . The delete endpoint expects the
instance_id
parameter to be either the unique UUID of the resource instance or the URL-friendly key in the format
<resource_key:resource_instance_key>
(e.g.,
file:my_file.txt
) . Based on your error, it looks like you're using
01V4UVC3N7YU7DPWXSH5D23GVWWFB7D3T2
as the instance_id, but the system cannot locate a resource instance with that identifier in your environment. Try these steps: 1. ​*Verify the instance exists*​ - First, try to retrieve the instance using the GET endpoint to confirm it exists (2) :
Copy code
GET /v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}
2. ​*Check the instance_id format*​ - If you're using a key-based identifier, ensure it follows the
resource_key:instance_key
format (1) (2) . If you're using a UUID, verify it's the correct UUID for that specific environment. 3. ​*Verify your environment and project IDs*​ - Ensure the
env_id
and
proj_id
in your delete request match where the resource instance was actually created (1) . To help investigate this further, could you provide: 1. Which Workspace / Project / Env you are using 2. What calls you are performing (as SDK code or CURL) 3. Which PDP version you are running 4.
To learn more, see the sources I considered: [[1] DELETE /v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}](https://api.permit.io/v2/redoc#tag/Resource-Instances/operation/delete_resource_instance) [[2] GET /v2/facts/{proj_id}/{env_id}/resource_instances/{instance_id}](https://api.permit.io/v2/redoc#tag/Resource-Instances/operation/get_resource_instance)
e
Hi @Oleksii Flok, Thank you for reaching out. I hope the AI’s answer was helpful. If not, please provide all four parts mentioned above so we can assist you further.
o
@Eli Moshkovich Hi. I'd like to message you directly with all info but I dont have this option on slack. nvm messages are working now 👍... just sent you the info 👍 Thank you! This bug is also happening in Permit.io UI when I am trying to delete role from a group. The endpoint: DELETE https://api.permit.io/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/roles
e
Hi @Oleksii Flok, Thanks for the detailed report - I've confirmed the bug on our end and created an internal ticket for the fix. Once it's implemented, @david will update you here in this thread. Apologies for the inconvenience!
o
Thank you for the update 👍