-
Notifications
You must be signed in to change notification settings - Fork 12
redfish user guide
This tutorial demonstrates how to set up, configure, and test the DMT Console Redfish implementation. Redfish is a standardized REST API for device management over HTTP; for the specification, see the Distributed Management Task Force (DMTF) Redfish standards here: https://www.dmtf.org/standards/redfish
In this tutorial, you will:
- Download and run the DMT Console Release supporting Redfish endpoints
- Configure and execute the DMT Console application
- Query and test Redfish endpoints using curl commands or the DMTF Redfish Tool
- Troubleshoot common issues
The DMT Console implements the following Redfish API v1.19.0 features for remote power management and fleet management.
Service Discovery:
- Service Root (
/redfish/v1/) - Entry point for the Redfish service - OData Service Document (
/redfish/v1/odata) - List of available entity sets - Metadata Document (
/redfish/v1/$metadata) - OData CSDL schema definition
Computer System Management:
-
Systems Collection (
/redfish/v1/Systems) - List all managed Intel AMT devices -
System Information (
/redfish/v1/Systems/{id}) - Retrieve detailed system properties -
Power Control Actions (
/redfish/v1/Systems/{id}/Actions/ComputerSystem.Reset) - Remote power management
Standards Compliance:
- Redfish API v1.19.0
- OData Version 4.0
- DMTF ComputerSystem v1.26.0 schema
Follow these sections in order:
- Prerequisites - Tools installation
- Download and Configure the Pre-built Redfish Binary - Download and prepare the release package
- Verifying the Redfish Endpoint - Configuration verification and server endpoint validation
- Using the Redfish API through DMTF Redfish Tool - API testing with the official DMTF Redfish tool
- Using the Redfish API through curl commands - API testing with curl commands
- Troubleshooting - Common issues and solutions
- Additional Resources - Documentation and reference links
The following diagram shows how the components connect during this tutorial:
graph TB
subgraph "Helpdesk Machine"
A[DMT Console<br/> with Redfish Service<br/>Port 8181]
B[curl]
C[Redfish Tool]
B -.->|API Requests <br/>/redfish/v1/.. <br/>/api/v1/..| A
C -.->|API Requests <br/>/redfish/v1/..| A
end
subgraph "Managed Devices"
D[Intel AMT Device 1]
E[Intel AMT Device 2]
F[Intel AMT Device N]
end
A -->|API Requests <br/> WS-MAN API| D
A -->|API Requests <br/> WS-MAN API| E
A -->|API Requests <br/> WS-MAN API| F
style A fill:blue,stroke:black,stroke-width:2px,color:white
style B fill:green,stroke:black,stroke-width:2px,color:white
style C fill:green,stroke:black,stroke-width:2px,color:white
style D fill:blue,stroke:black,stroke-width:2px,color:white
style E fill:blue,stroke:black,stroke-width:2px,color:white
style F fill:blue,stroke:black,stroke-width:2px,color:white
Components:
- DMT Console: Redfish service running on the helpdesk machine
- curl / Redfish Tool: Command-line clients for testing and interacting with the Redfish API
- Intel AMT Devices: Managed devices with Intel AMT firmware
Install the following tools before running this tutorial:
-
curl (for API calls) : Comes pre-installed on most operating systems; if not available, install it from the official website (https://curl.se/download.html) or your OS package manager.
-
DMTF Redfish Tool (for Redfish CLI testing) : Repository and install guidance: https://github.com/DMTF/Redfishtool. The version used in this tutorial is 1.1.8 or later.
-
jq (for JSON filtering/pretty-printing in non-table examples) : Install it from your OS package manager (for example,
sudo apt-get install jqon Debian/Ubuntu,brew install jqon macOS, orchoco install jq/winget install jqlang.jqon Windows) or from the official repository at https://jqlang.github.io/jq/.
Download the pre-built DMT Console binary that includes the Redfish functionality you want to test.
After downloading and extracting the Redfish binary, continue with the Enterprise setup guide: Configuration and follow the instructions to run the Console application and Add Devices. Once the console is running, you can proceed to test the Redfish API using either curl commands or the DMTF Redfish Tool as described in the next sections.
Note: Configure the Console application to run with TLS enabled before testing Redfish endpoints. Redfish access in this guide expects HTTPS.
Test that the Redfish Endpoint is running:
Note: On Windows, PowerShell has a built-in
curlalias forInvoke-WebRequest. To use the native curl executable instead, either usecurl.exeexplicitly in commands, or remove the alias by runningRemove-Item Alias:curlin your PowerShell session.
Windows:
# Check if the server is listening (use -k to ignore self-signed certificate, -s for silent mode)
curl.exe -sk https://<console_host_or_ip>:<console_port>/redfish/v1/ | jq
Linux:
# Check if the server is listening (use -k to ignore self-signed certificate, -s for silent mode)
curl -sk https://<console_host_or_ip>:<console_port>/redfish/v1/ | jqReference response:
{
"@odata.context": "/redfish/v1/$metadata#ServiceRoot.ServiceRoot",
"@odata.id": "/redfish/v1",
"@odata.type": "#ServiceRoot.v1_19_0.ServiceRoot",
"Id": "RootService",
"Name": "Root Service",
"Product": "Device Management Toolkit - Redfish Service",
"RedfishVersion": "1.19.0",
"Systems": {
"@odata.id": "/redfish/v1/Systems"
},
"UUID": "ebc6c6c9-1ed3-4f12-ae0b-7b877c55de07",
"Vendor": "Device Management Toolkit"
}Reference log on the Console:
{"level":"info","time":"2025-12-06T15:22:40+05:30","caller":"/home/admin/dmt/console-redfish-nm/pkg/logger/adapters.go:29","message":"[GIN] 2025/12/06 - 15:22:40 | 200 | 795.431µs | 10.190.213.16 | GET \"/redfish/v1/\""}Note: If you receive connection errors or no response check for any proxy settings on your machine that may be interfering with local connections. If you are not using a proxy, ensure that no proxy environment variables are set (e.g.,
HTTP_PROXY,HTTPS_PROXY,NO_PROXY).
The DMTF Redfish Tool is the official reference implementation tool from the Distributed Management Task Force (DMTF) for interacting with Redfish APIs. It provides:
- Simplified command syntax for Redfish operations
- Automatic JSON formatting and pretty-printing
- Built-in authentication handling
- Support for HTTP and HTTPS connections
- Comprehensive coverage of Redfish API operations
Official Repository: https://github.com/DMTF/Redfishtool
Note: If you haven't already installed the Redfish tool, please refer to Prerequisites.
The general syntax for the Redfish tool is:
redfishtool [options] <command> [command-options]Common options:
-
-r <host>or--rhost <host>: Specify the Console service host -
-u <user>or--user <user>: Console Username for authentication -
-p <password>or--password <password>: Console Password for authentication -
-vor--verbose: Enable verbose output
The following examples demonstrate how to use the Redfish tool with DMT Console for all common Redfish operations. These correspond to the same scenarios covered in the curl commands section.
Description: Retrieve the Redfish service root document.
Requires Authentication: No
This command displays the service root with available API endpoints and service information.
redfishtool -r <console_host_or_ip>:<console_port> -S Always rootReference Successful Response:
{
"@odata.context": "/redfish/v1/$metadata#ServiceRoot.ServiceRoot",
"@odata.id": "/redfish/v1",
"@odata.type": "#ServiceRoot.v1_19_0.ServiceRoot",
"Id": "RootService",
"Links": {
"Sessions": {
"@odata.id": "/redfish/v1/SessionService/Sessions"
}
},
"Name": "Root Service",
"Product": "Device Management Toolkit - Redfish Service",
"RedfishVersion": "1.19.0",
"Systems": {
"@odata.id": "/redfish/v1/Systems"
},
"UUID": "5ea6dfb3-bcdc-443a-9a9d-3035a7b73fe7",
"Vendor": "Device Management Toolkit",
"SessionService": {
"@odata.id": "/redfish/v1/SessionService"
}
}
What to verify:
- ✓ Response has
@odata.context,@odata.id,@odata.type - ✓ Contains links to Systems collections and Session Service
- ✓ Header
OData-Version: 4.0is present - ✓
RedfishVersionis1.19.0 - ✓
VendorisDevice Management Toolkit - ✓
UUIDis a valid GUID and would be the same on subsequent requests
Description: Retrieve the OData service document that describes available entity sets.
Requires Authentication: No
redfishtool -r <console_host_or_ip>:<console_port> -S Always odataReference Successful Response:
{
"@odata.context": "/redfish/v1/$metadata#ServiceRoot.ServiceRoot",
"value": [
{
"name": "SessionService",
"kind": "Singleton",
"url": "/redfish/v1/SessionService"
},
{
"name": "Systems",
"kind": "Singleton",
"url": "/redfish/v1/Systems"
}
]
}
What to verify:
- ✓ Response contains
valuearray - ✓ Entity sets are listed with
name,kind, andurl
Description: Retrieve the Redfish metadata document in XML format (OData CSDL schema).
Requires Authentication: No
redfishtool -r <console_host_or_ip>:<console_port> -S Always metadataReference Successful Response:
<?xml version="1.0" encoding="UTF-8"?>
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
<edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/ActionInfo_v1.xml">
<edmx:Include Namespace="ActionInfo"/>
<edmx:Include Namespace="ActionInfo.1_5_0"/>
</edmx:Reference>
<edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/ComputerSystemCollection_v1.xml">
<edmx:Include Namespace="ComputerSystemCollection"/>
</edmx:Reference>
<edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/ComputerSystem_v1.xml">
<edmx:Include Namespace="ComputerSystem"/>
<edmx:Include Namespace="ComputerSystem.1_26_0"/>
</edmx:Reference>
<edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/Message_v1.xml">
<edmx:Include Namespace="Message"/>
<edmx:Include Namespace="Message.1_2_1"/>
</edmx:Reference>
<edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/ResolutionStep_v1.xml">
<edmx:Include Namespace="ResolutionStep"/>
<edmx:Include Namespace="ResolutionStep.1_0_1"/>
</edmx:Reference>
<edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/Resource_v1.xml">
<edmx:Include Namespace="Resource"/>
<edmx:Include Namespace="Resource.1_23_0"/>
</edmx:Reference>
<edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/ServiceRoot_v1.xml">
<edmx:Include Namespace="ServiceRoot"/>
<edmx:Include Namespace="ServiceRoot.1_19_0"/>
</edmx:Reference>
<edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/SessionCollection_v1.xml">
<edmx:Include Namespace="SessionCollection"/>
</edmx:Reference>
<edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/SessionService_v1.xml">
<edmx:Include Namespace="SessionService"/>
<edmx:Include Namespace="SessionService.1_2_0"/>
</edmx:Reference>
<edmx:Reference Uri="http://redfish.dmtf.org/schemas/v1/Session_v1.xml">
<edmx:Include Namespace="Session"/>
<edmx:Include Namespace="Session.1_8_0"/>
</edmx:Reference>
<edmx:DataServices>
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="Service">
<EntityContainer Name="Service" Extends="ServiceRoot.v1_19_0.ServiceContainer"/>
</Schema>
</edmx:DataServices>
</edmx:Edmx>
What to verify:
- ✓ Content-Type is
application/xmlortext/xml - ✓ Valid XML structure with
<edmx:Edmx>root element - ✓ Contains schema definitions for Redfish resources
Description: Retrieve the collection of computer systems managed by the console.
Requires Authentication: Yes
This displays all systems managed by the DMT Console.
redfishtool -r <console_host_or_ip>:<console_port> -u <admin-user-name> -p <admin-user-password> -S Always SystemsReference Successful Response:
{
"@odata.context": "/redfish/v1/$metadata#ComputerSystemCollection.ComputerSystemCollection",
"@odata.id": "/redfish/v1/Systems",
"@odata.type": "#ComputerSystemCollection.ComputerSystemCollection",
"Description": "Collection of Computer Systems",
"Members": [
{
"@odata.id": "/redfish/v1/Systems/f141c6d4-7b1b-4435-ae10-53d4f45355ab"
}
],
"Members@odata.count": 1,
"Name": "Computer System Collection"
}
What to verify:
- ✓ Response contains
Membersarray - ✓
Members@odata.countmatches number of devices - ✓ Each member has
@odata.idlink
Description: Retrieve detailed information about a specific computer system.
Requires Authentication: Yes
Replace <system-id> with the actual system identifier (e.g., device GUID).
redfishtool -r <console_host_or_ip>:<console_port> -u <admin-user-name> -p <admin-user-password> -S Always Systems -I <device-guid> -T 30Reference Successful Response:
{
"@odata.context": "/redfish/v1/$metadata#ComputerSystem.ComputerSystem",
"@odata.id": "/redfish/v1/Systems/device-guid-12345",
"@odata.type": "#ComputerSystem.v1_0_0.ComputerSystem",
"Actions": {
"#ComputerSystem.Reset": {
"target": "/redfish/v1/Systems/device-guid-12345/Actions/ComputerSystem.Reset",
"title": "Reset"
}
},
"BiosVersion": "1.2.3",
"Boot": {
"AutomaticRetryAttempts": null,
"BootNext": null,
"BootSourceOverrideEnabled": "Disabled",
"BootSourceOverrideMode": "UEFI",
"BootSourceOverrideTarget": "None",
"HttpBootUri": null,
"RemainingAutomaticRetryAttempts": null,
"UefiTargetBootSourceOverride": null
},
"HostName": "null",
"Id": "device-guid-12345",
"Manufacturer": "Intel Corporation",
"Model": "NUC14RVH-B",
"Name": "device-guid-12345",
"PowerState": "On",
"ProcessorSummary": {
"CoreCount": null,
"Count": 1,
"LogicalProcessorCount": null,
"Model": null,
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
}
},
"SerialNumber": "SN1234567890",
"SystemType": "Physical"
}What to verify:
- ✓ Response contains system properties ( BiosVersion, Id, Name, PowerState, etc.)
- ✓
Actionsobject contains available operations
Description: Perform power control operations on a computer system.
Requires Authentication: Yes
Supported Reset Types:
-
On- Power on the system -
ForceOff- Immediate power off (non-graceful) -
ForceRestart- Immediate restart (non-graceful) -
PowerCycle- Power cycle (off then on)
Power On:
redfishtool -r <console_host_or_ip>:<console_port> -u <admin-user-name> -p <admin-user-password> -S Always Systems -I <device-guid> reset On -T 30Power Off (Force):
redfishtool -r <console_host_or_ip>:<console_port> -u <admin-user-name> -p <admin-user-password> -S Always Systems -I <device-guid> reset ForceOff -T 30Force Restart:
redfishtool -r <console_host_or_ip>:<console_port> -u <admin-user-name> -p <admin-user-password> -S Always Systems -I <device-guid> reset ForceRestart -T 30PowerCycle:
redfishtool -r <console_host_or_ip>:<console_port> -u <admin-user-name> -p <admin-user-password> -S Always Systems -I <device-guid> reset PowerCycle -T 30Description: Set the system to boot into BIOS setup on the next restart. The override applies once and reverts to normal boot order afterwards. After sending this command, issue a restart (e.g., ForceRestart) to trigger the BIOS boot.
Requires Authentication: Yes
redfishtool -r <console_host_or_ip>:<console_port> -u <admin-user-name> -p <admin-user-password> -S Always Systems -I <device-guid> setBootOverride Once BiosSetup -T 30Description: Check the current power state of a specific system.
Requires Authentication: Yes
redfishtool -r <console_host_or_ip>:<console_port> -u <admin-user-name> -p <admin-user-password> -S Always Systems -T 30 -I <device-guid> | jq .PowerStateDescription: Retrieve SessionService metadata including session timeout configuration.
Requires Authentication: Yes
redfishtool -r <console_host_or_ip>:<console_port> -u <admin-user-name> -p <admin-user-password> -S Always SessionServiceReference Successful Response:
{
"@odata.context": "/redfish/v1/$metadata#SessionService.SessionService",
"@odata.id": "/redfish/v1/SessionService",
"@odata.type": "#SessionService.v1_2_0.SessionService",
"Description": "Session Service for DMT Console Redfish API",
"Id": "SessionService",
"Name": "Session Service",
"ServiceEnabled": true,
"SessionTimeout": 1800,
"Sessions": {
"@odata.id": "/redfish/v1/SessionService/Sessions"
},
"Status": {
"Health": "OK",
"State": "Enabled"
}
}What to verify:
- ✓ SessionTimeout value is returned (example: 1800 seconds / 30 minutes)
- ✓ ServiceEnabled is true
- ✓ Sessions collection URI is present
Description: Authenticate with the console to obtain a session token for token-based authentication.
Requires Authentication: Basic Auth (username and password)
NOTE: The current version supports only a single account for sessions. This account username and password are the admin username and password configured for the console.
redfishtool -r <console_host_or_ip>:<console_port> -u <admin-user-name> -p <admin-user-password> -S Always SessionService loginReference Successful Response:
{
"SessionId": "83efab82-aa7a-4e39-84f7-6a888a701a5b",
"SessionLocation": "/redfish/v1/SessionService/Sessions/83efab82-aa7a-4e39-84f7-6a888a701a5b",
"X-Auth-Token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTc3MzQwMzkwNCwiaWF0IjoxNzczMzE3NTA0LCJqdGkiOiI4M2VmYWI4Mi1hYTdhLTRlMzktODRmNy02YTg4OGE3MDFhNWIifQ.iWwegBCAQGFnRACrIEQT1jV5WOo7YLfrz5xGoc3vXWA"
}What to verify:
- ✓ X-Auth-Token header is present in response
- ✓ Session ID (@odata.id) is returned
- ✓ Session Location is present in response
NOTE: Redfishtool does not support creating sessions using the above information. For session usage, use the curl API.
Description: Retrieve all active sessions on the console.
Requires Authentication: Yes
redfishtool -r <console_host_or_ip>:<console_port> -u <admin-user-name> -p <admin-user-password> -S Always SessionService SessionsReference Successful Response:
{
"@odata.context": "/redfish/v1/$metadata#SessionCollection.SessionCollection",
"@odata.id": "/redfish/v1/SessionService/Sessions",
"@odata.type": "#SessionCollection.SessionCollection",
"Members": [
{
"@odata.id": "/redfish/v1/SessionService/Sessions/83efab82-aa7a-4e39-84f7-6a888a701a5b"
}
],
"Members@odata.count": 1,
"Name": "Session Collection"
}What to verify:
- ✓ Response contains Members array
- ✓ Members@odata.count shows number of active sessions
- ✓ Each session has @odata.id and UserName properties
Description: Retrieve details of a specific session including UserName, CreatedTime, and token information.
Requires Authentication: Yes
redfishtool -r <console_host_or_ip>:<console_port> -u <admin-user-name> -p <admin-user-password> -S Always SessionService Sessions -i<session-id>Reference Successful Response:
{
"@odata.context": "/redfish/v1/$metadata#Session.Session",
"@odata.id": "/redfish/v1/SessionService/Sessions/83efab82-aa7a-4e39-84f7-6a888a701a5b",
"@odata.type": "#Session.v1_8_0.Session",
"ClientOriginIPAddress": "127.0.0.1",
"Context": null,
"CreatedTime": "2026-03-12T17:41:44.154402877+05:30",
"Description": "User Session for admin",
"Id": "83efab82-aa7a-4e39-84f7-6a888a701a5b",
"Name": "User Session",
"Password": null,
"SessionType": "Redfish",
"Token": null,
"UserName": "admin"
}What to verify:
- ✓ Session @odata.id matches the requested session-id
- ✓ UserName is displayed
- ✓ CreatedTime and other session metadata is present
Description: End a session and invalidate the authentication token.
Requires Authentication: Yes (session token or Basic Auth)
redfishtool -r <console_host_or_ip>:<console_port> -t <your-auth-token> -S Always SessionService logout -i<session-id>Reference Successful Response:
A successful response will print no content on the output
What to verify:
- ✓ Session no longer appears in the active sessions list (see Get Sessions)
- ✓ Session token is invalidated for future requests
The Redfish tool offers several advantages:
- Simpler Syntax: No need to construct full URLs or JSON payloads
- Automatic Formatting: JSON responses are automatically formatted
- Error Handling: Better error messages and handling
- Discovery: Built-in commands for service discovery
- Consistency: Uniform interface across all Redfish operations
For comprehensive documentation and all available commands, refer to the DMTF Redfish Tool Repository: https://github.com/DMTF/Redfishtool
Most Redfish endpoints require Basic Authentication. Use the credentials as provided during the console execution:
Windows:
# Using curl with Basic Auth
curl.exe -sk -u <admin-user-name>:<admin-password> https://<console_host_or_ip>:<console_port>/redfish/v1/Systems
Linux:
# Using curl with Basic Auth
curl -sk -u <admin-user-name>:<admin-password> https://<console_host_or_ip>:<console_port>/redfish/v1/SystemsPublic endpoints (no authentication required):
-
/redfish/v1/- Service root -
/redfish/v1/odata- OData service document -
/redfish/v1/$metadata- Metadata document
The following table provides curl commands for common Redfish API operations. For detailed response examples and verification steps, refer to the corresponding sections in Using Redfish Tool with DMT Console.
Note for Windows users: Use
curl.exeinstead ofcurlto ensure the native curl executable is used, as PowerShell has acurlalias forInvoke-WebRequest.
| Scenario | Curl Command | Reference |
|---|---|---|
|
Get Service Root Retrieve the Redfish service root document |
curl -sk https://<console_host_or_ip>:<console_port>/redfish/v1/ |
See Get Service Root for response format and verification steps |
|
Get OData Service Document Retrieve the OData service document |
curl -sk https://<console_host_or_ip>:<console_port>/redfish/v1/odata |
See Get OData Service Document for response format and verification steps |
|
Get Metadata Document Retrieve the Redfish metadata document in XML format |
curl -sk https://<console_host_or_ip>:<console_port>/redfish/v1/\$metadata |
See Get Metadata Document for response format and verification steps |
|
Get Systems Collection Retrieve all computer systems Requires Authentication |
curl -sk -u <admin-user-name>:<admin-password> https://<console_host_or_ip>:<console_port>/redfish/v1/Systems |
See Get Systems Collection for response format and verification steps |
|
Get Specific System Details Retrieve detailed information about a specific system Requires Authentication |
curl -sk -u <admin-user-name>:<admin-password> https://<console_host_or_ip>:<console_port>/redfish/v1/Systems/<system-id> |
See Get Specific System Details for response format and verification steps |
|
Power On Power on a system Requires Authentication |
curl -sk -X POST -u <admin-user-name>:<admin-password> -H "Content-Type: application/json" -d '{"ResetType": "On"}' https://<console_host_or_ip>:<console_port>/redfish/v1/Systems/<system-id>/Actions/ComputerSystem.Reset |
See Perform Power Actions for details on all power operations |
|
Force Off Immediate power off (non-graceful) Requires Authentication |
curl -sk -X POST -u <admin-user-name>:<admin-password> -H "Content-Type: application/json" -d '{"ResetType": "ForceOff"}' https://<console_host_or_ip>:<console_port>/redfish/v1/Systems/<system-id>/Actions/ComputerSystem.Reset |
See Perform Power Actions for details on all power operations |
|
Force Restart Immediate restart (non-graceful) Requires Authentication |
curl -sk -X POST -u <admin-user-name>:<admin-password> -H "Content-Type: application/json" -d '{"ResetType": "ForceRestart"}' https://<console_host_or_ip>:<console_port>/redfish/v1/Systems/<system-id>/Actions/ComputerSystem.Reset |
See Perform Power Actions for details on all power operations |
|
Power Cycle Power cycle (off then on) Requires Authentication |
curl -sk -X POST -u <admin-user-name>:<admin-password> -H "Content-Type: application/json" -d '{"ResetType": "PowerCycle"}' https://<console_host_or_ip>:<console_port>/redfish/v1/Systems/<system-id>/Actions/ComputerSystem.Reset |
See Perform Power Actions for details on all power operations |
|
Reset to BIOS Reset to BIOS Requires Authentication |
curl -sk -X PATCH -u <admin-user-name>:<admin-password> -H "Content-Type: application/json" -d '{"Boot": {"BootSourceOverrideTarget": "BiosSetup", "BootSourceOverrideEnabled": "Once"}}' https://<console_host_or_ip>:<console_port>/redfish/v1/Systems/<system-id> |
See Reset to BIOS for details |
|
Get System Power State Check current power state Requires Authentication |
curl -sk -u <admin-user-name>:<admin-password> https://<console_host_or_ip>:<console_port>/redfish/v1/Systems/<system-id> |
See Get System Power State for details |
|
Get SessionService Retrieve SessionService metadata Requires Authentication |
curl -sk -u <admin-user-name>:<admin-password> https://<console_host_or_ip>:<console_port>/redfish/v1/SessionService |
See Get SessionService for details |
|
Get Sessions Retrieve all active sessions Requires Authentication |
curl -sk -u <admin-user-name>:<admin-password> https://<console_host_or_ip>:<console_port>/redfish/v1/SessionService/Sessions |
See Get Sessions for details |
|
Create Session (Login) Authenticate and obtain a session token Credentials in Request Body |
curl -sk -X POST -H "Content-Type: application/json" -d '{"UserName": "<admin-user-name>", "Password": "<admin-password>"}' https://<console_host_or_ip>:<console_port>/redfish/v1/SessionService/Sessions |
See Create Session for details |
|
Get Session Details Get details of a specific session Requires Authentication |
curl -sk -u <admin-user-name>:<admin-password> https://<console_host_or_ip>:<console_port>/redfish/v1/SessionService/Sessions/<session-id> |
See Get Session Details for details |
|
Delete Session (Logout) End a session and invalidate token Requires Authentication |
curl -sk -X DELETE -H "X-Auth-Token: <your-auth-token>" https://<console_host_or_ip>:<console_port>/redfish/v1/SessionService/Sessions/<session-id> |
See Delete Session for details |
Note:
redfishtoolcannot use session tokens for most operations. Usecurlwith X-Auth-Token header for session-based requests.
Note: In Windows PowerShell, use
curl.exe(not thecurlalias). In Linux/macOS or non-Windows PowerShell, usecurl.
Windows:
# Create session and get response with headers
$RESPONSE = curl.exe -sk -X POST `
-u <admin-user-name>:<admin-password> `
-H "Content-Type: application/json" `
-d '{"UserName":"<admin-user-name>","Password":"<admin-password>"}' `
-i `
https://<console_host_or_ip>:<console_port>/redfish/v1/SessionService/Sessions
# Extract token and location from response
$TOKEN = ($RESPONSE | Select-String -Pattern "X-Auth-Token: (.+)").Matches.Groups[1].Value.Trim()
$SESSION_LOCATION = ($RESPONSE | Select-String -Pattern "Location: (.+)").Matches.Groups[1].Value.Trim()Linux:
# Create session once and capture response headers
RESPONSE=$(curl -sk -X POST \
-u <admin-user-name>:<admin-password> \
-H "Content-Type: application/json" \
-d '{"UserName":"<admin-user-name>","Password":"<admin-password>"}' \
-i \
https://<console_host_or_ip>:<console_port>/redfish/v1/SessionService/Sessions \
2>/dev/null)
# Extract token and session location from the same response
TOKEN=$(printf '%s\n' "$RESPONSE" | grep -i "^X-Auth-Token:" | awk '{print $2}' | tr -d '\r')
SESSION_LOCATION=$(printf '%s\n' "$RESPONSE" | grep -i "^Location:" | awk '{print $2}' | tr -d '\r')Now use the token instead of Basic Auth:
First, resolve <system-id> from the Systems collection.
Windows:
# Resolve system-id from the first member
$SYSTEM_ID = (curl.exe -sk -H "X-Auth-Token: $TOKEN" `
https://<console_host_or_ip>:<console_port>/redfish/v1/Systems | jq -r '.Members[0]."@odata.id"').Split('/')[-1]
# Get Systems Collection
curl.exe -sk -H "X-Auth-Token: $TOKEN" `
https://<console_host_or_ip>:<console_port>/redfish/v1/Systems
# Get Specific System
curl.exe -sk -H "X-Auth-Token: $TOKEN" `
https://<console_host_or_ip>:<console_port>/redfish/v1/Systems/$SYSTEM_ID
# Power Action (ForceRestart)
curl.exe -sk -X POST `
-H "X-Auth-Token: $TOKEN" `
-H "Content-Type: application/json" `
-d '{"ResetType":"ForceRestart"}' `
https://<console_host_or_ip>:<console_port>/redfish/v1/Systems/$SYSTEM_ID/Actions/ComputerSystem.Reset
# Get Sessions Collection
curl.exe -sk -H "X-Auth-Token: $TOKEN" `
https://<console_host_or_ip>:<console_port>/redfish/v1/SessionService/SessionsLinux:
# Resolve system-id from the first member
SYSTEM_ID=$(curl -sk -H "X-Auth-Token: $TOKEN" \
https://<console_host_or_ip>:<console_port>/redfish/v1/Systems | jq -r '.Members[0]."@odata.id"' | awk -F/ '{print $NF}')
# Get Systems Collection
curl -sk -H "X-Auth-Token: $TOKEN" \
https://<console_host_or_ip>:<console_port>/redfish/v1/Systems
# Get Specific System
curl -sk -H "X-Auth-Token: $TOKEN" \
https://<console_host_or_ip>:<console_port>/redfish/v1/Systems/$SYSTEM_ID
# Power Action (ForceRestart)
curl -sk -X POST \
-H "X-Auth-Token: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"ResetType":"ForceRestart"}' \
https://<console_host_or_ip>:<console_port>/redfish/v1/Systems/$SYSTEM_ID/Actions/ComputerSystem.Reset
# Get Sessions Collection
curl -sk -H "X-Auth-Token: $TOKEN" \
https://<console_host_or_ip>:<console_port>/redfish/v1/SessionService/SessionsWindows:
# Delete the session to invalidate the token
curl.exe -sk -X DELETE -H "X-Auth-Token: $TOKEN" `
https://<console_host_or_ip>:<console_port>$SESSION_LOCATIONLinux:
# Delete the session to invalidate the token
curl -sk -X DELETE -H "X-Auth-Token: $TOKEN" \
https://<console_host_or_ip>:<console_port>$SESSION_LOCATIONWindows:
# Get all systems
$SYSTEMS = curl.exe -s -k -u admin:password123 https://localhost:8181/redfish/v1/Systems | jq -r '.Members[]."@odata.id"'
# Loop through each system
foreach ($system in $SYSTEMS) {
Write-Host "System: $system"
curl.exe -s -k -u admin:password123 "https://localhost:8181$system" | jq '.PowerState'
Write-Host "---"
}
Linux:
# Get all systems
SYSTEMS=$(curl -sk -u admin:password123 https://localhost:8181/redfish/v1/Systems | jq -r '.Members[]."@odata.id"')
# Loop through each system
for system in $SYSTEMS; do
echo "System: $system"
curl -sk -u admin:password123 "https://localhost:8181$system" | jq '.PowerState'
echo "---"
doneWindows:
# Get all systems
$SYSTEMS = curl.exe -s -k -u admin:password123 https://localhost:8181/redfish/v1/Systems | jq -r '.Members[]."@odata.id"'
# Power on each system
foreach ($system in $SYSTEMS) {
Write-Host "Powering on: $system"
curl.exe -s -k -X POST `
-u admin:password123 `
-H "Content-Type: application/json" `
-d '{"ResetType": "On"}' `
"https://localhost:8181${system}/Actions/ComputerSystem.Reset"
Write-Host ""
}
Linux:
# Get all systems
SYSTEMS=$(curl -sk -u admin:password123 https://localhost:8181/redfish/v1/Systems | jq -r '.Members[]."@odata.id"')
# Power on each system
for system in $SYSTEMS; do
echo "Powering on: $system"
curl -sk -X POST \
-u admin:password123 \
-H "Content-Type: application/json" \
-d '{"ResetType": "On"}' \
"https://localhost:8181${system}/Actions/ComputerSystem.Reset"
echo ""
doneWindows:
# Get detailed system information
$SYSTEM_ID = "device-guid-12345"
curl.exe -s -k -u admin:password123 `
"https://localhost:8181/redfish/v1/Systems/$SYSTEM_ID" | jq
Linux:
# Get detailed system information
SYSTEM_ID="device-guid-12345"
curl -sk -u admin:password123 \
https://localhost:8181/redfish/v1/Systems/$SYSTEM_ID | jqWindows:
# Get all systems
$SYSTEMS = curl.exe -s -k -u admin:password123 https://localhost:8181/redfish/v1/Systems | jq -r '.Members[]."@odata.id"'
# Gracefully shutdown each system
foreach ($system in $SYSTEMS) {
Write-Host "Shutting down: $system"
curl.exe -s -k -X POST `
-u admin:password123 `
-H "Content-Type: application/json" `
-d '{"ResetType": "GracefulShutdown"}' `
"https://localhost:8181${system}/Actions/ComputerSystem.Reset"
Write-Host ""
}
Linux:
# Get all systems
SYSTEMS=$(curl -sk -u admin:password123 https://localhost:8181/redfish/v1/Systems | jq -r '.Members[]."@odata.id"')
# Gracefully shutdown each system
for system in $SYSTEMS; do
echo "Shutting down: $system"
curl -sk -X POST \
-u admin:password123 \
-H "Content-Type: application/json" \
-d '{"ResetType": "GracefulShutdown"}' \
"https://localhost:8181${system}/Actions/ComputerSystem.Reset"
echo ""
done| Status Code | Meaning | Example Scenario |
|---|---|---|
| 200 OK | Successful GET request | Getting service root, systems collection |
| 202 Accepted | Action accepted for processing | Power action initiated |
| 400 Bad Request | Invalid request body or parameters | Invalid ResetType value |
| 401 Unauthorized | Missing or invalid credentials | No authentication provided |
| 404 Not Found | Resource does not exist | Invalid system ID |
| 405 Method Not Allowed | HTTP method not supported | GET on action endpoint |
| 500 Internal Server Error | Server-side error | Backend service failure |
All errors follow the Redfish standard error format:
{
"error": {
"code": "Base.1.8.GeneralError",
"message": "A general error has occurred",
"@Message.ExtendedInfo": [
{
"MessageId": "Base.1.8.PropertyValueNotInList",
"Message": "The value 'InvalidType' for the property ResetType is not in the list of acceptable values",
"Severity": "Warning",
"Resolution": "Choose a value from the enumeration list and resubmit the request"
}
]
}
}
Windows:
curl.exe -sk -X POST `
-u admin:password123 `
-H "Content-Type: application/json" `
-d '{"ResetType": "InvalidType"}' `
https://localhost:8181/redfish/v1/Systems/device-guid-12345/Actions/ComputerSystem.Reset
Linux:
curl -sk -X POST \
-u admin:password123 \
-H "Content-Type: application/json" \
-d '{"ResetType": "InvalidType"}' \
https://localhost:8181/redfish/v1/Systems/device-guid-12345/Actions/ComputerSystem.ResetResponse:
{
"error": {
"code": "Base.1.8.PropertyValueNotInList",
"message": "Invalid ResetType value",
"@Message.ExtendedInfo": [
{
"MessageId": "Base.1.8.PropertyValueNotInList",
"Message": "The value 'InvalidType' for the property ResetType is not in the list of acceptable values",
"Severity": "Warning",
"Resolution": "Use one of: On, ForceOff, ForceRestart, GracefulShutdown, PowerCycle, GracefulRestart"
}
]
}
}
Symptom:
curl: (7) Failed to connect to localhost port 8181: Connection refusedSolution:
- Verify server is running:
ps aux | grep console - Check if port is correct:
netstat -tlnp | grep 8181 - Review server logs:
cat logs/console.log - Restart the application
Symptom:
{
"error": {
"code": "Base.1.8.Unauthorized",
"message": "Authentication failed"
}
}
Solution:
- Verify credentials in
config.yml - Ensure Basic Auth header is correct:
echo -n "admin:password123" | base64 - Check if authentication is enabled in config
- Try with correct credentials:
curl -u admin:password123 ...
Symptom:
{
"error": {
"code": "Base.1.8.ResourceNotFound",
"message": "System not found"
}
}
Solution:
- List all systems:
curl -u admin:password123 http://localhost:8181/redfish/v1/Systems - Verify device GUID is correct
- Check if device is added to Console
- Verify device is online and reachable
Symptom:
{
"error": {
"code": "Base.1.8.GeneralError",
"message": "Failed to execute power action"
}
}
Solution:
- Check device connectivity
- Verify AMT credentials are correct
- Review backend service logs
- Ensure device supports the requested power action
- Check if device is in a valid state for the action
If port is already in use:
Windows:
# Find process using port 8181
Get-NetTCPConnection -LocalPort 8181 | Select-Object -Property OwningProcess
# Kill the process (replace PID with actual process ID)
Stop-Process -Id <PID> -Force
# Or use netstat to find the process
netstat -ano | findstr :8181
taskkill /PID <PID> /F
# Or use a different port
$env:HTTP_PORT=9090
.\console.exeLinux:
# Find process using port ex:8181
lsof -ti:8181
# Kill the process
lsof -ti:8181 | xargs -r kill -9
# Or use a different port
HTTP_PORT=9090 ./console- DMT Console Supported Redfish Open API Specification
- DMTF Redfish Specification
- OData Version 4.0 Specification
For questions or support, please refer to the project documentation or contact the development team.