> For the complete documentation index, see [llms.txt](https://docs.infraon.io/infraon-infinity-api-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.infraon.io/infraon-infinity-api-guide/modules/role-profile.md).

# Role Profile

## Gets a list of role profiles

> This endpoint is used to fetch all the role profiles in the current organization (works based on token used to authorize)

```json
{"openapi":"3.0.3","info":{"title":"","version":"0.0.0"},"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"Group":{"type":"object","description":"Serializes groups querysets.","properties":{"role_name":{"type":"string","nullable":true,"maxLength":250},"description":{"type":"string","nullable":true,"maxLength":3000},"group_id":{"type":"integer"},"organization":{"type":"string","maxLength":25},"is_pre_configure":{"type":"boolean"},"role_type":{"type":"integer","default":1},"event_map":{"type":"string","readOnly":true},"last_update_time":{"type":"string","format":"date-time"}},"required":["event_map","organization"]}}},"paths":{"/ux/common/roles/profile/":{"get":{"operationId":"ux_common_roles_profile_list","description":"This endpoint is used to fetch all the role profiles in the current organization (works based on token used to authorize)","summary":"Gets a list of role profiles","tags":["Role Profile"],"responses":{"200":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Group"}}}},"description":""}}}}}}
```

## Creates a new role&#x20;

> This endpoint is used to save a new role for the current organization

```json
{"openapi":"3.0.3","info":{"title":"","version":"0.0.0"},"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}}},"paths":{"/ux/common/roles/profile/":{"post":{"operationId":"ux_common_roles_profile_create","description":"This endpoint is used to save a new role for the current organization","summary":"Creates a new role ","tags":["Role Profile"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"responses":{"201":{"description":"No response body"}}}}}}
```

## Gets a role profile with the given id

> This endpoint is used to fetch a role in the current organization

```json
{"openapi":"3.0.3","info":{"title":"","version":"0.0.0"},"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"Group":{"type":"object","description":"Serializes groups querysets.","properties":{"role_name":{"type":"string","nullable":true,"maxLength":250},"description":{"type":"string","nullable":true,"maxLength":3000},"group_id":{"type":"integer"},"organization":{"type":"string","maxLength":25},"is_pre_configure":{"type":"boolean"},"role_type":{"type":"integer","default":1},"event_map":{"type":"string","readOnly":true},"last_update_time":{"type":"string","format":"date-time"}},"required":["event_map","organization"]}}},"paths":{"/ux/common/roles/profile/{id}/":{"get":{"operationId":"ux_common_roles_profile_retrieve","description":"This endpoint is used to fetch a role in the current organization","summary":"Gets a role profile with the given id","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"tags":["Role Profile"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Group"}}},"description":""}}}}}}
```

## Edits the role with given id

> This endpoint is used to edit an existing role for the current organization

```json
{"openapi":"3.0.3","info":{"title":"","version":"0.0.0"},"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"Group":{"type":"object","description":"Serializes groups querysets.","properties":{"role_name":{"type":"string","nullable":true,"maxLength":250},"description":{"type":"string","nullable":true,"maxLength":3000},"group_id":{"type":"integer"},"organization":{"type":"string","maxLength":25},"is_pre_configure":{"type":"boolean"},"role_type":{"type":"integer","default":1},"event_map":{"type":"string","readOnly":true},"last_update_time":{"type":"string","format":"date-time"}},"required":["event_map","organization"]}}},"paths":{"/ux/common/roles/profile/{id}/":{"put":{"operationId":"ux_common_roles_profile_update","description":"This endpoint is used to edit an existing role for the current organization","summary":"Edits the role with given id","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"tags":["Role Profile"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Group"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Group"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Group"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Group"}}},"description":""}}}}}}
```

## Deletes the role with given id

> This endpoint is used to delete an existing role for the current organization

```json
{"openapi":"3.0.3","info":{"title":"","version":"0.0.0"},"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}}},"paths":{"/ux/common/roles/profile/{id}/":{"delete":{"operationId":"ux_common_roles_profile_destroy","description":"This endpoint is used to delete an existing role for the current organization","summary":"Deletes the role with given id","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"tags":["Role Profile"],"responses":{"204":{"description":"No response body"}}}}}}
```

## Gets the module role map

> This endpoint is used to get all module role map for the current organization

```json
{"openapi":"3.0.3","info":{"title":"","version":"0.0.0"},"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"Group":{"type":"object","description":"Serializes groups querysets.","properties":{"role_name":{"type":"string","nullable":true,"maxLength":250},"description":{"type":"string","nullable":true,"maxLength":3000},"group_id":{"type":"integer"},"organization":{"type":"string","maxLength":25},"is_pre_configure":{"type":"boolean"},"role_type":{"type":"integer","default":1},"event_map":{"type":"string","readOnly":true},"last_update_time":{"type":"string","format":"date-time"}},"required":["event_map","organization"]}}},"paths":{"/ux/common/roles/profile/config/":{"get":{"operationId":"ux_common_roles_profile_config_retrieve","description":"This endpoint is used to get all module role map for the current organization","summary":"Gets the module role map","tags":["Role Profile"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Group"}}},"description":""}}}}}}
```

## GET /ux/common/roles/profile/json/

> API endpoint that allows users to be viewed or edited.

```json
{"openapi":"3.0.3","info":{"title":"","version":"0.0.0"},"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"Group":{"type":"object","description":"Serializes groups querysets.","properties":{"role_name":{"type":"string","nullable":true,"maxLength":250},"description":{"type":"string","nullable":true,"maxLength":3000},"group_id":{"type":"integer"},"organization":{"type":"string","maxLength":25},"is_pre_configure":{"type":"boolean"},"role_type":{"type":"integer","default":1},"event_map":{"type":"string","readOnly":true},"last_update_time":{"type":"string","format":"date-time"}},"required":["event_map","organization"]}}},"paths":{"/ux/common/roles/profile/json/":{"get":{"operationId":"ux_common_roles_profile_json_retrieve","description":"API endpoint that allows users to be viewed or edited.","tags":["Role Profile"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Group"}}},"description":""}}}}}}
```

## Get the options for the events options

> This endpoint is used to get the default options for events options

```json
{"openapi":"3.0.3","info":{"title":"","version":"0.0.0"},"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"Group":{"type":"object","description":"Serializes groups querysets.","properties":{"role_name":{"type":"string","nullable":true,"maxLength":250},"description":{"type":"string","nullable":true,"maxLength":3000},"group_id":{"type":"integer"},"organization":{"type":"string","maxLength":25},"is_pre_configure":{"type":"boolean"},"role_type":{"type":"integer","default":1},"event_map":{"type":"string","readOnly":true},"last_update_time":{"type":"string","format":"date-time"}},"required":["event_map","organization"]}}},"paths":{"/ux/common/roles/profile/options/":{"get":{"operationId":"ux_common_roles_profile_options_retrieve","description":"This endpoint is used to get the default options for events options","summary":"Get the options for the events options","tags":["Role Profile"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Group"}}},"description":""}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.infraon.io/infraon-infinity-api-guide/modules/role-profile.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
