# Roles

## GET /organization/v1/roles

> Gets a roles within the organization.

```json
{"openapi":"3.1.1","info":{"title":"MariaDB Cloud DBaaS API","version":"1.0"},"servers":[{"url":"https://api.skysql.com/"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"dto.Role":{"type":"object","properties":{"created_by":{"type":"string"},"created_on":{"type":"integer"},"default":{"type":"boolean"},"description":{"type":"string"},"id":{"type":"string"},"is_active":{"type":"boolean"},"name":{"type":"string"},"updated_by":{"type":"string"},"updated_on":{"type":"integer"}}}}},"paths":{"/organization/v1/roles":{"get":{"tags":["Roles"],"summary":"Gets a roles within the organization.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/dto.Role"}}}}},"204":{"description":"No Content"}}}}}}
```

## GET /organization/v1/roles/{role\_id}

> Gets a role by role id within the organization.

```json
{"openapi":"3.1.1","info":{"title":"MariaDB Cloud DBaaS API","version":"1.0"},"servers":[{"url":"https://api.skysql.com/"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"apiKey","name":"X-API-Key","in":"header"}},"schemas":{"dto.Role":{"type":"object","properties":{"created_by":{"type":"string"},"created_on":{"type":"integer"},"default":{"type":"boolean"},"description":{"type":"string"},"id":{"type":"string"},"is_active":{"type":"boolean"},"name":{"type":"string"},"updated_by":{"type":"string"},"updated_on":{"type":"integer"}}}}},"paths":{"/organization/v1/roles/{role_id}":{"get":{"tags":["Roles"],"summary":"Gets a role by role id within the organization.","parameters":[{"schema":{"type":"string"},"description":"Role identifier","name":"role_id","in":"path","required":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/dto.Role"}}}}}}}}}
```
