Skip to content

9. Actions

9.1 System Reset

Actions are used for operations that do not map easily to CRUD (create, read, update, and delete) semantics. For example, performing a reset of a device is not as simple as modifying a desired property since a reset operation will likely start various sequences and state transitions internal to the device, which will cause many other properties in the model to change.

The Actions property in a resource is an object that contains the available actions that can be performed on the resource. Each property inside of the Actions property represents one of the actions supported on the resource. It also contains properties that describe the supported parameters and parameter values for each action. Clients can perform a POST operation on the action URI to invoke the action.

The following example shows the supported actions for a ComputerSystem resource found at the URI /redfish/v1/Systems/1:

{
    "@odata.id": "/redfish/v1/Systems/1",
    "@odata.type": "#ComputerSystem.v0_0_1.ComputerSystem",
    "Id": "1",
    "Name": "avtoob_000001",
    "Actions": {
        "#ComputerSystem.Reset": {
            "target": "/redfish/v1/Systems/1/Actions/ComputerSystem.Reset",
            "ResetType@Redfish.AllowableValues": [
                "On",
                "ForceOff",
                "ForceRestart",
                "GracefulShutdown "
            ]
        }
    },
    ... <Other ComputerSystem properties>
}

In the previous example, there is one action supported named #ComputerSystem.Reset. The target property contains the URI on which the client performs the POST operation. It also contains ResetType@Redfish.AllowableValues to show the supported values for the ResetType parameter. Additionally, if the client wants to modify the duration that the power or reset button is held down, it can include the optional DurationInMs parameter. When this parameter is provided, its value (in milliseconds) will be used; if omitted, a default duration will apply. A user can perform a graceful restart of the system with the following request:

curl -k -X POST 'https://<REDFISH-HOST>/redfish/v1/Systems/1/Actions/ComputerSystem.Reset' \
    -H "Content-Type: application/json" -H 'X-Auth-Token: <SESSION-TOKEN>' \
    -d '{ "ResetType": "ForceRestart", "DurationInMs":1000 }'

Response:

204 No Content

9.2 Camera Action

curl -k -X POST 'https://<REDFISH-HOST>/redfish/v1/Systems/1/Oem/Camera/Actions/Camera.Active' \
    -H "Content-Type: application/json" -H 'X-Auth-Token: <SESSION-TOKEN>' \
    -d '{ "ActivetType": "StreamStart" }'

Response:

204 No Content

9.3 Manager Reset

The Manager.Reset action in Redfish is used to reset a management controller, such as a BMC (Baseboard Management Controller). This action allows user to remotely restart the manager without requiring physical access to the hardware.

Typical use cases include applying new configurations, recovering from a non-responsive state, or performing maintenance operations.

The action accepts a ResetType parameter, which defines the type of reset to perform (for example, GracefulRestart). When invoked, the manager will terminate running processes and reboot according to the specified reset type.

Important: Using this action will temporarily interrupt Redfish services and other management functions until the manager becomes available again.

URI: /redfish/v1/Managers/{managerId}/Actions/Manager.Reset

Method: POST

Request Body Example:
{
    "ResetType": "GracefulRestart"
}

Response

HTTP Status Code: 204 No Content

If the operation is successful, a status code 200 No Content will be returned.

HTTP Status Code: 403 Forbidden

If the session token is invalid, a status code 403 Forbidden will be returned.

HTTP Status Code: 400 Bad Request

If the request body is not in JSON format, or the parameter is invalid, a 400 Bad Request status code will be returned.

Next section