# Permissions

## Get a summary of user permissions.

> Retrieve a summary of user permissions.

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.22"},"tags":[{"name":"Permissions"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"Permissions":{"type":"array","items":{"$ref":"#/components/schemas/Permission"}},"Permission":{"type":"object","required":["resourceType","actions","groupId","displayName"],"properties":{"resourceType":{"$ref":"#/components/schemas/ResourceType"},"displayName":{"type":"string"},"groupId":{"$ref":"#/components/schemas/ResourceTypeGroupId"},"actions":{"type":"array","items":{"$ref":"#/components/schemas/Action"}}}},"ResourceType":{"type":"string","enum":["department","tenant","project","cluster","cluster-config","nodepools","nodes","settings","security-settings","users","groups","apps","dashboards-overview","dashboards-analytics","dashboards-consumption","roles","access_rules","jobs","workloads","workspaces","trainings","inferences","environments","pvc-assets","git-assets","host-path-assets","nfs-assets","s3-assets","compute-resources","templates","credentials","events-history","policies","cm-volume-assets","datavolumes","secret-volume-assets","storage-class-configuration","user-apps","workload-properties"]},"ResourceTypeGroupId":{"type":"string","enum":["organization","physical-resource","iam","dashboard","workload","workload-asset"]},"Action":{"type":"string","enum":["create","read","update","delete","sync"]},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"401Unauthorized":{"description":"Unauthorized","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/permissions":{"get":{"summary":"Get a summary of user permissions.","description":"Retrieve a summary of user permissions.","operationId":"get_permissions","tags":["Permissions"],"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Permissions"}}}},"401":{"$ref":"#/components/responses/401Unauthorized"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```

## Calculate permitted scopes.

> Use to calculate user permitted scopes for an action on a resource.

```json
{"openapi":"3.0.3","info":{"title":"NVIDIA Run:ai","version":"2.22"},"tags":[{"name":"Permissions"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"ResourceType":{"type":"string","enum":["department","tenant","project","cluster","cluster-config","nodepools","nodes","settings","security-settings","users","groups","apps","dashboards-overview","dashboards-analytics","dashboards-consumption","roles","access_rules","jobs","workloads","workspaces","trainings","inferences","environments","pvc-assets","git-assets","host-path-assets","nfs-assets","s3-assets","compute-resources","templates","credentials","events-history","policies","cm-volume-assets","datavolumes","secret-volume-assets","storage-class-configuration","user-apps","workload-properties"]},"PermittedScopesActions":{"type":"object","required":["create","read","update","delete"],"properties":{"create":{"$ref":"#/components/schemas/PermittedScopes"},"read":{"$ref":"#/components/schemas/PermittedScopes"},"update":{"$ref":"#/components/schemas/PermittedScopes"},"delete":{"$ref":"#/components/schemas/PermittedScopes"}}},"PermittedScopes":{"type":"object","properties":{"system":{"type":"boolean"},"tenants":{"type":"array","items":{"type":"string"}},"tenant":{"deprecated":true,"type":"string"},"clusters":{"type":"array","items":{"type":"string"}},"departments":{"type":"array","items":{"type":"string"}},"projects":{"type":"array","items":{"type":"string"}}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}}},"responses":{"401Unauthorized":{"description":"Unauthorized","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/permitted-scopes":{"post":{"summary":"Calculate permitted scopes.","description":"Use to calculate user permitted scopes for an action on a resource.","operationId":"get_permitted_scopes","tags":["Permissions"],"requestBody":{"description":"The request parameters.","required":true,"content":{"application/json":{"schema":{"type":"object","required":["resourceType"],"properties":{"resourceType":{"$ref":"#/components/schemas/ResourceType"},"action":{"nullable":true,"type":"string","enum":["create","read","update","delete"]}}}}}},"responses":{"200":{"description":"Executed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermittedScopesActions"}}}},"401":{"$ref":"#/components/responses/401Unauthorized"},"500":{"$ref":"#/components/responses/500InternalServerError"},"503":{"$ref":"#/components/responses/503ServiceUnavailable"}}}}}}
```
