Create a new permission with object_type all or * is possible? #20429
-
Hi, I am trying to create a new Permission to associate to a user/group via API . Is it possible to define a wildcard * or "all" to encompass all object types in the object_types field? If not where can I check the full list of object types? the objective is to create a read only user that has read access to every object. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hi, As for your question:
|
Beta Was this translation helpful? Give feedback.
-
Hi, thanks a lot for the help, I am going to check the full list of object types. |
Beta Was this translation helpful? Give feedback.
Hi,
I’m curious: why do you need to create the permission itself via the API?
Usually, the permission only needs to be created once, and then you can assign it to multiple groups or users (which you can certainly do via the API). A common approach is to create a dedicated “read-only” group with the appropriate permission and then simply assign users to that group.
As for your question:
I’m not aware of a way to use a wildcard (such as
*
orall
) forobject_types
. However, you can retrieve the full list of available object types via the API (NetBox v4.4):