---
title: "Get a role."
method: GET
path: "/v2/roles/{id}"
tags: ["roleManagementV2"]
---

# Get a role.

`GET /v2/roles/{id}`

Get a role with the given identifier in the organization.

## Path parameters

- `id` string, required

## Response `200`

Role object that was requested.

- GetRoleDefinitionV2
  - `name` string, required — Name of the role.
  - `description` string — Description of the role.
  - `logAnalyticsFilter` string — A search filter which would be applied on partitions which belong to Log Analytics product area.
  - `auditDataFilter` string — A search filter which would be applied on partitions which belong to Audit Data product area. Help Doc : (https://help.sumologic.com/docs/manage/security/audit-index/).
  - `securityDataFilter` string — A search filter which would be applied on partitions which belong to Security Data product area.
  - `selectionType` string — Describes the Permission Construct for the list of views in "selectedViews" parameter. ### Valid Values are : - `All` selectionType would allow access to all views in the org. - `Allow` selectionType would allow access to specific views mentioned in "selectedViews" parameter. - `Deny` selectionType would deny access to specific views mentioned in "selectedViews" parameter.
  - `selectedViews` GetViewFilterDefinition[] — List of views which with specific view level filters in accordance to the selectionType chosen.
    - `viewName` string, required — Name of the view. Help Doc:- (https://help.sumologic.com/docs/manage/partitions-data-tiers/)
  - `users` string[] — List of user identifiers to assign the role to.
  - `capabilities` string[] — List of [capabilities](https://help.sumologic.com/Manage/Users-and-Roles/Manage-Roles/Role-Capabilities) associated with this role. Valid values are ### Data Management - viewCollectors - manageCollectors - manageBudgets - manageDataVolumeFeed - viewFieldExtraction - manageFieldExtractionRules - manageS3DataForwarding - manageContent - manageApps - dataVolumeIndex - manageConnections - viewScheduledViews - manageScheduledViews - viewPartitions - managePartitions - viewFields - manageFields - viewAccountOverview - manageTokens - downloadSearchResults - viewPipelines - managePipelines ### Entity management - manageEntityTypeConfig ### Metrics - metricsTransformation - metricsExtraction - metricsRules ### Security - managePasswordPolicy - ipAllowlisting - createAccessKeys - manageAccessKeys - manageSupportAccountAccess - manageAuditDataFeed - manageSaml - shareDashboardOutsideOrg - manageOrgSettings - changeDataAccessLevel ### Dashboards - shareDashboardWorld - shareDashboardAllowlist ### UserManagement - manageUsersAndRoles ### Observability - searchAuditIndex - auditEventIndex ### Cloud SIEM Enterprise - viewCse ### Alerting - viewMonitorsV2 - manageMonitorsV2 - viewAlerts
  - `autofillDependencies` boolean — Set this to true if you want to automatically append all missing capability requirements. If set to false an error will be thrown if any capabilities are missing their dependencies.
  - `createdAt` string, date-time, required — Creation timestamp in UTC in [RFC3339](https://tools.ietf.org/html/rfc3339) format.
  - `createdBy` string, required — Identifier of the user who created the resource.
  - `modifiedAt` string, date-time, required — Last modification timestamp in UTC.
  - `modifiedBy` string, required — Identifier of the user who last modified the resource.
  - `id` string, required — Unique identifier for the role.
  - `systemDefined` boolean — Role is system or user defined.

## Other responses

- `default` — Operation failed with an error.

---

[API](https://skmtc.net/sumologic/apis/sumo-logic-api.md) · [All operations](https://skmtc.net/sumologic/apis/sumo-logic-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sumologic/sumo-logic-api/versions/18a824df1e78/schema)
