Skip to content

5. Account Service

You can perform the following operations under /redfish/v1/AccountService.

Available Methods: Get, Post, Patch and Delete

5.1 Get AccountService

You can use the API and payload to get account service.

URI: /redfish/v1/AccountService

Method: GET

Payload:

Response:

{
    "@odata.id": "/redfish/v1/AccountService",
    "@odata.type": "#AccountService.v1_15_0.AccountService",
    "AccountLockoutCounterResetAfter": 30,
    "AccountLockoutCounterResetEnabled": true,
    "AccountLockoutDuration": 30,
    "AccountLockoutThreshold": 5,
    "Accounts": {
        "@odata.id": "/redfish/v1/AccountService/Accounts"
    },
    "AuthFailureLoggingThreshold": 3,
    "Description": "Account Service",
    "Id": "AccountService",
    "LocalAccountAuth": "Enabled",
    "MaxPasswordLength": 50,
    "MinPasswordLength": 8,
    "Name": "Account Service",
    "RequireChangePasswordAction": false,
    "Roles": {
        "@odata.id": "/redfish/v1/AccountService/Roles"
    },
    "ServiceEnabled": true,
    "Status": {
        "Health": "OK",
        "State": "Enabled"
    }
}

5.2 Get Accounts Info

You can use the API and payload to get accounts list.

URI: /redfish/v1/AccountService/Accounts

Method: GET

Payload:

Response:

{
    "@odata.id": "/redfish/v1/AccountService/Accounts",
    "@odata.type": "#ManagerAccountCollection.ManagerAccountCollection",
    "Members": [
        {
            "@odata.id": "/redfish/v1/AccountService/Accounts/1"
        }
    ],
    "Members@odata.count": 1,
    "Name": "Accounts Collection"
}

5.3 Get Accounts Roles

You can use the API and payload to get accounts roles list.

URI: /redfish/v1/AccountService/Roles

Method: GET

Payload:

Response:

{
    "@odata.id": "/redfish/v1/AccountService/Roles",
    "@odata.type": "#RoleCollection.RoleCollection",
    "Members": [
        {
            "@odata.id": "/redfish/v1/AccountService/Roles/Administrator"
        }, {
            "@odata.id": "/redfish/v1/AccountService/Roles/Operator"
        }
    ], "Members@odata.count":3,
    "Name": "Roles Collection"
}

5.4 Get a User

You can use the API and payload to get an account information.

URI: /redfish/v1/AccountService/Accounts/1

Method: GET

Payload:

Response:

{
    "@odata.id": "/redfish/v1/AccountService/Accounts/1",
    "@odata.type": "#ManagerAccount.v1_12_0.ManagerAccount",
    "AccountTypes": [
        "Redfish"
    ],
    "Description": "User Account",
    "EmailAddress": "admin@avermedia.com",
    "Enabled": true,
    "Id": "1",
    "Links": {
        "Role": {
            "@odata.id": "/redfish/v1/AccountService/Roles/Administrator"
        }
    },
    "Locked": false,
    "Name": "User Account",
    "Password": "Admin",
    "PasswordChangeRequired": false,
    "PhoneNumber": "2-2226-3630",
    "RoleId": "Administrator",
    "UserName": "Admin"
}

5.5 Add a User

You can use the API and payload to create a new account.

URI: /redfish/v1/AccountService/Accounts

Method: POST

Payload:

{
    "UserName": "User_Name",
    "Password": "User_Password",
    "RoleId": "Operator",
    "Enabled": true
}

Response:

204 No Content

Note

Note that the allowed values for RoleId are Administrator and Operator. You can also verify the assigned privileges for different roles (Administrator and Operator) under /redfish/v1/AccountService/Roles.

5.6 Delete a User

You can use the API to delete the respective account.

URI: /redfish/v1/AccountService/Accounts/1

Method: DELETE

Payload:

Response:

204 No Content

5.7 Update a User

You can use the API and payload to update an account.

URI: /redfish/v1/AccountService/Accounts/1

Method: PATCH

Payload:

{
    "UserName": "User0_Name",
    "Password": "User0_Password",
    "RoleId": "Operator",
    "Enabled": true
}

Response:

204 No Content

Next section