Hi all, I was just reading the <permit.io> docs on...
# general
q
Hi all, I was just reading the permit.io docs on the Groups API and felt a bit confused, according to my understanding, the concept of group is still just like a wrapper around resource and resource instance but presented in a way that makes it easier to work with, right? Also some parts of the docs seems unclear or is missing step which makes it harder to follow along imo, and some parts has typo as well, should I report that somewhere or like make an issue somewhere?
a
Hey @Quân Đức, Welcome! Thanks so much for the feedback — that’s really helpful. Could you share a bit more detail on which parts of the Groups API docs felt confusing or had missing steps/typos? That’ll help us pinpoint and fix things faster. You can drop the details on #permit-saas, or if it’s easier, open an issue on our Docs GitHub repo so the team can track it.
s
First of all, yes, a group is a resource instance. Thanks for reaching out! We’re currently enhancing our documentation in this area. To make sure we’re covering what you need, could you share what’s missing or unclear in the current docs? Your feedback will help us improve them for everyone. Thanks!
a
Also, we added this feature to the UI last week, so you can now manage groups visually too 🙌🏻 We’d be happy to hear any comments or suggestions you might have.
s
Hi @Quân Đức Thanks for the feedback on the docs! I’m sharing a private link to our updated documentation (in DM). We’d really appreciate your input before we publish. Any feedback you have would be super helpful! Tnx Shuvy
q
Thanks, I'll take a look in the morning cause it's like 12 rn. Also I just took a look at the new Groups feature on the UI, looks great but there seems to be a bug when I try to delete group.
s
What is the bug with the deletion? I just checked the user interface in production and it works for me.
q
I can't seem to delete the group from the UI for some reason, it said delete successfully with the toast but then the group is still there
and the API log is showing a 404
oh I think its because the version on the UI is trying to delete the instance without using the resource_type:resource_instance syntax maybe?
s
Hi @Quân Đức It’s fixed, please check that everything is working properly.
q
works great now, thanks
💜 1
hey, I see that the Group API has deprecated the Get Group endpoint and instead we have the Get Direct Group API now, is there any reasons for this? Like for making each endpoint not take on as much responsibilities or something. Cause I see that other endpoints like the Assign Role To Group, Assign User To Group and Create Group still return data in the format of the deprecated Get Group.
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 ?
o
We have made several improvements as part of the process of launching the groups UI. one of the challenges was the recursive expectations around this API (i.e. returning all the groups nested under the group) @Shuvy Ankor can add more color here
👀 1
q
I'm also wondering if we have support for the Group API in our SDK yet, or if we even have plans cause I don't see it listed on the SDKs feature parity page as a feature at https://docs.permit.io/sdk/sdks-overview/
o
Hi, Not currently in the SDKs. We'd welcome a PR if you're interested in contributing to the open-source and want to speed it up
q
Is this feature on the roadmap, or else I am interested in adding this to the Java SDK, is there some docs or something you can point me towards to get started? I don't really have much experience in making SDK but am open to learning.
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 ?
o
Hi @Quân Đức We don’t have current plans to add the groups API to the SDKs And we’d be happy to accept a contribution from you to the Java SDK In the end all you need to do is: • Submit a PR to the Java SDK repo • Make sure your code meets the repo standards • Make sure you base your implementation on the OpenAPI generated schema • Make sure you include (passing) tests for all added functionalities @Alon Boshi and @Omer Zuarets can provide further assistance if you have questions
q
it seems like we're using the openapi generator to generate base class from the openapi spec and then start from there, right?
a
q
I don't really get what the models inside api/models are for, from what I can see, they're mostly just referenced by other class inside the same api/models directory. How are they different from the ones inside openapi/models?
a
Hey @Quân Đức , thanks for following up! Let me check with the right people and will circle back to you.
q
I see that other APIs have different models for creating and deleting like the image below, even if their fields are the same. But currently the Groups API only have model for adding role, and so the method signature would end up looking like this: "void removeRoleFromGroup(String groupInstanceKey, GroupAddRole groupAddRole)", should I edit the openapi spec to add in a GroupRemoveRole or just add it in code or something?
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 ?
o
Hi @Quân Đức - I”m a little confused by what you wrote- the spec clearly contains a removeRoleFromGroup
q
yeah there is functionalities for adding role to group and removing role from group. But what I meant was that in term of the openapi.json spec at https://api.permit.io/v2/openapi.json, the components.schema normally would have a model for creating and deleting as different models, right? Even if the model has the same field, seems like we still make them different models (DerivedRoleRuleCreate and DerivedRoleRuleDelete). But for the Groups API, I only see the GroupAddUser model. And so the removeRoleFromGroup is using the GroupAddUser model when it could be something like GroupRemoveUser.
o
if the models are the same I see no critical importance for that. But @Shuvy Ankor can consider adding it next week
q
yeah it does work fine, but if developers work with the Groups feature of the SDK, it would just be a bit weird to create GroupAddUser in order to delete user from group is all
s
Hi @Quân Đức I want to make sure I understand your challenges correctly. Are you experiencing: - Technical issues (API not working as expected)? - Clarity issues (unclear documentation or API structure)? Please share more details so I can help you effectively!
q
I'm experiencing clarity issue cause the openapi structure don't provide the type I need, I think it'd be better if we also had a GroupRemoveRole in the openapi spec similar to the GroupAddRole structure. But as Or Wels said, it's fine if we don't have it because the structure of the request body for adding and removing role from group looks identical so the method signature might look wierd but it works.
s
Thank you for bringing this to our attention. I completely understand your concern - the type name could definitely be more descriptive and intuitive. I’ve opened a ticket for this. While I can’t provide an exact timeline at the moment, I’ll follow up with the team to see how we can prioritize this. In the meantime, you should be able to continue working with the current implementation. Thanks again for your feedback - it really helps us improve!
q
hey, I've implemented a partial version of the Groups SDK based on the openapi spec and included working test. But I've only implemented the features of the SDK that I need to use, so there isn't methods for interacting with the Paginated Schema of the Groups API yet, or adding and removing group from group yet. Would it still be ok to open a PR with a partial implementation? I'll get back to finishing this when I have time in the future.
o
Sure 😊
q
I've made the PR, tell me if anything is not up to standard
o
@Shuvy Ankor
👀 1
z