curl http://localhost:8080/redfish/v1/
curl http://localhost:8080/redfish/v1/Systems
curl http://localhost:8080/redfish/v1/Systems/1
curl -X POST http://localhost:8080/redfish/v1/Systems/1/Actions/ComputerSystem.Reset \
-H "Content-Type: application/json" \
-d '{"ResetType": "On"}'
curl -X POST http://localhost:8080/redfish/v1/Systems/1/Actions/ComputerSystem.Reset \
-H "Content-Type: application/json" \
-d '{"ResetType": "GracefulShutdown"}'
curl -X POST http://localhost:8080/redfish/v1/Systems/1/Actions/ComputerSystem.Reset \
-H "Content-Type: application/json" \
-d '{"ResetType": "ForceRestart"}'
curl -X PATCH http://localhost:8080/redfish/v1/Systems/1 \
-H "Content-Type: application/json" \
-d '{"Name": "My Server"}'
import requests
# Get service root
response = requests.get('http://localhost:8080/redfish/v1/')
print(response.json())
# Power on system
response = requests.post(
'http://localhost:8080/redfish/v1/Systems/1/Actions/ComputerSystem.Reset',
json={'ResetType': 'On'}
)
print(response.status_code)
# Get service root
Invoke-RestMethod -Uri 'http://localhost:8080/redfish/v1/'
# Power on system
$body = @{ ResetType = "On" } | ConvertTo-Json
Invoke-RestMethod -Method Post `
-Uri 'http://localhost:8080/redfish/v1/Systems/1/Actions/ComputerSystem.Reset' `
-Body $body `
-ContentType 'application/json'