# Me

"Me" returns the authenticated user's permissions within the system. It provides a comprehensive view of access rules (roles, subjects and scope) assigned to the current user. For more information see [Access control](https://run-ai-docs.nvidia.com/self-hosted/2.24/infrastructure-setup/authentication/overview/#role-based-access-control).

## List the access rules assigned to the requesting user.

> Retrieve the access rules assigned to the requesting user.

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.24"},"tags":[{"name":"Me","description":"\"Me\" returns the authenticated user's permissions within the system. \nIt provides a comprehensive view of access rules (roles, subjects and scope) assigned to the current user.\nFor more information see [Access control](https://run-ai-docs.nvidia.com/self-hosted/2.24/infrastructure-setup/authentication/overview/#role-based-access-control).\n"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"Limit":{"name":"limit","in":"query","required":false,"description":"The maximum number of entries to return.","schema":{"type":"integer","format":"int32","default":50,"minimum":1,"maximum":500}},"Offset":{"name":"offset","in":"query","required":false,"description":"The offset of the first item returned in the collection.","schema":{"type":"integer","format":"int32"}},"Search":{"name":"search","in":"query","required":false,"description":"Filter results by a free text search.","schema":{"type":"string"}}},"schemas":{"MeAccessRulesResponse":{"type":"object","properties":{"accessRules":{"type":"object","required":["totalRecords","displayRecords","accessRules"],"properties":{"totalRecords":{"type":"integer"},"displayRecords":{"type":"integer"},"accessRules":{"$ref":"#/components/schemas/MeAccessRules"}}}}},"MeAccessRules":{"type":"array","items":{"$ref":"#/components/schemas/MeAccessRule"}},"MeAccessRule":{"allOf":[{"$ref":"#/components/schemas/AccessRuleCreationFields"},{"$ref":"#/components/schemas/EnrichmentDataFields"},{"required":["tenantId"]},{"properties":{"id":{"type":"integer","format":"int32"},"tenantId":{"$ref":"#/components/schemas/TenantId"}}}]},"AccessRuleCreationFields":{"type":"object","required":["subjectId","subjectType","roleId","scopeId","scopeType"],"properties":{"subjectId":{"type":"string","description":"The unique identifier of the subject (e.g., user, group, or app)."},"subjectType":{"allOf":[{"$ref":"#/components/schemas/SubjectType"},{"description":"The subject assigned to the access rule. Valid values: user, group, app."}]},"roleId":{"type":"integer","format":"int32","description":"The numeric ID of the assigned role."},"scopeId":{"type":"string","description":"The unique identifier of the scope."},"scopeType":{"allOf":[{"$ref":"#/components/schemas/ScopeType"},{"description":"The type of scope the access rule applies to. Valid values: system, tenant, cluster, department, project."}]},"clusterId":{"$ref":"#/components/schemas/ClusterId"}}},"SubjectType":{"type":"string","description":"Subject type enum for access rules.\n\nNote: The 'app' subject type is DEPRECATED. Please use 'service-account' instead for service accounts.\n","enum":["user","app","service-account","group"]},"ScopeType":{"type":"string","enum":["system","tenant","cluster","department","project"]},"ClusterId":{"description":"The id of the cluster.","type":"string","format":"uuid"},"EnrichmentDataFields":{"type":"object","required":["roleName","scopeName"],"properties":{"roleName":{"type":"string","description":"The name of the assigned role (e.g., admin, viewer)."},"scopeName":{"type":"string","description":"Human-readable name of the scope (e.g., tenant-x)."}}},"TenantId":{"description":"The id of the tenant.","type":"integer","format":"int32"},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/api/v1/authorization/me/access-rules":{"get":{"summary":"List the access rules assigned to the requesting user.","description":"Retrieve the access rules assigned to the requesting user.","operationId":"get_me_access_rules","tags":["Me"],"parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/Search"}],"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeAccessRulesResponse"}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Count the access rules assigned to the requesting user.

> Use to retrieve the number of access rules assigned to the requesting user.

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.24"},"tags":[{"name":"Me","description":"\"Me\" returns the authenticated user's permissions within the system. \nIt provides a comprehensive view of access rules (roles, subjects and scope) assigned to the current user.\nFor more information see [Access control](https://run-ai-docs.nvidia.com/self-hosted/2.24/infrastructure-setup/authentication/overview/#role-based-access-control).\n"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"parameters":{"Search":{"name":"search","in":"query","required":false,"description":"Filter results by a free text search.","schema":{"type":"string"}}},"responses":{"400BadRequest":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500InternalServerError":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503ServiceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}}},"paths":{"/api/v1/authorization/me/access-rules/count":{"get":{"summary":"Count the access rules assigned to the requesting user.","description":"Use to retrieve the number of access rules assigned to the requesting user.","operationId":"count_me_access_rules","tags":["Me"],"parameters":[{"$ref":"#/components/parameters/Search"}],"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"type":"object","required":["count"],"properties":{"count":{"type":"integer","format":"int64"}}}}}},"400":{"$ref":"#/components/responses/400BadRequest"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```
