Skip to main content

POST – New Custom Role

Request

POST https://{{ip}}/redfish/v1/AccountService/Roles
Content-Type: application/json

Request body

  1. Creation of a custom Role requires that the RoleId and Name properties be in the request body.

  2. In addition to these properties, either AssignedPrivileges, OemPrivileges, or both AssignedPrivileges and OemPrivileges must be in the request body.

Request example

{
"AssignedPrivileges": [
"ConfigureUsers",
"ConfigureManager",
"ConfigureSelf",
"Login",
"ConfigureComponents"
],
"Description": "TestRole User Role",
"Id": "TestRole",
"RoleId": "TestRole",
"Name": "TestRole Role",
"OemPrivileges": [
"OemPowerControl",
"OemClearLog"
]
}

Response

  1. The response status is 201 and the response body is a GET Response with the properties of the newly created roles.

  2. Please refer to Collection Properties for the JSON response property.