The service can get, create, delete and update a role and based on the HTTP method used. The path parameter roleId determines, which role is deleted/updated/retrieved.
| Request Method: | GET /{roleId} | 
| Description: | Retrieve the role with the associated roleId. | 
| Output format: | a JSON document of the following format{"permissions": ["BOAT:READ", "COMPETITOR,EVENT:READ"], "id": "29914406-b0fc-43cd-acc7-62a83931f587", "name": "test-role"}
         | 
    
| Mandatory path parameters: | 
             roleId: UUID of the role to get.  
         | 
    
| Example: | curl -X GET "127.0.0.1:8888/security/api/restsecurity/role/29914406-b0fc-43cd-acc7-62a83931f587"Will provide a JSON document as explained above.  | 
    
| Request Method: | PUT /{roleId} | 
| Description: | Update the role with the associated roleId with the parameters in the JSON body. | 
| Output format: | An empty response with status code 200 in case of success; error-indicating status codes otherwise | 
| Mandatory path parameters: | 
             roleId: UUID of the role to get.  
         | 
    
| Parameters in the JSON body: | 
             Mandatory: permissions: Set of String permissions, the role's current permissions will be replaced with.  
            Optional: roleName: the role's current role name will be replaced with this.  
         | 
    
| Example: | curl --header "Content-Type: application/json" --request PUT --data '{"permissions": ["COMPETITOR,EVENT:READ", "BOAT:READ"], "roleName":"testrole2"}' 127.0.0.1:8888/security/api/restsecurity/role/29914406-b0fc-43cd-acc7-62a83931f587 | 
| Request Method: | DELETE /{roleId} | 
| Description: | Delete the role with the associated roleId. | 
| Output format: | a JSON document of the following format{"permissions": ["BOAT:READ", "COMPETITOR,EVENT:READ"], "id": "29914406-b0fc-43cd-acc7-62a83931f587", "name": "test-role"}
         | 
    
| Mandatory path parameters: | 
             roleId: UUID of the role to get.  
         | 
    
| Example: | curl -X DELETE "127.0.0.1:8888/security/api/restsecurity/role/29914406-b0fc-43cd-acc7-62a83931f587" | 
    
| Request Method: | POST | 
| Description: | Create a role with the roleName given as a form parameter. | 
| Output format: | a JSON document of the following format{"permissions": ["BOAT:READ", "COMPETITOR,EVENT:READ"], "id": "29914406-b0fc-43cd-acc7-62a83931f587", "name": "test-role"}
         | 
    
| Mandatory form parameters: | 
             roleName: Name of the role to create.  
         | 
    
| Example: | curl -X POST "127.0.0.1:8888/security/api/restsecurity/role/?roleName=test-role" |