Page 1
Cisco UCS C-Series Servers REST API Programmer's Guide First Published: 2016-12-14 Last Modified: 2019-05-22 Americas Headquarters Cisco Systems, Inc. 170 West Tasman Drive San Jose, CA 95134-1706 http://www.cisco.com Tel: 408 526-4000 800 553-NETS (6387) Fax: 408 527-0883...
Page 2
Cisco has more than 200 offices worldwide. Addresses and phone numbers are listed on the Cisco website at www.cisco.com/go/offices. Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: www.cisco.com...
Key Technologies Operational Model C H A P T E R 2 Cisco IMC REST API Examples Examples of Server Tasks Examples of Server Tasks for 3.1(3) Examples of Server Tasks for 4.0(4) Cisco UCS C-Series Servers REST API Programmer's Guide...
• Cisco IMC REST API Examples, on page 5 Related Documentation For a complete list of all C-Series documentation, see the Cisco UCS C-Series Servers Documentation Roadmap available at the following URL: http://www.cisco.com/go/unifiedcomputing/c-series-doc. Note The Cisco UCS C-Series Servers Integrated Management Controller GUI Configuration Guide and the Cisco UCS C-Series Servers Integrated Management Controller CLI Command Reference provide an overview of Cisco IMC.
Preface Documentation Feedback Documentation Feedback To provide technical feedback on this document, or to report an error or omission, please send your comments to ucs-docfeedback@external.cisco.com. We appreciate your feedback. Cisco UCS C-Series Servers REST API Programmer's Guide...
API comprises a folder structure that starts with the Redfish root at “/redfish/”. In case of a C-Series server, the root is accessed through the URI https://<Cisco IMC IP>/redfish/v1/ - the “v1” at the end of the URI denotes the version of the API.
Key features of the Redfish management standard include: • Simple to use and highly secure • Encrypted connections and generally heightened security • Simple programmatic interface that can be easily managed using scripts Cisco UCS C-Series Servers REST API Programmer's Guide...
• Applications such as the “Advanced REST Client” and “Postman” from the Google Chrome web store. • “REST Easy” and “RESTClient” plug-ins for the Firefox browser. • cURL, Python, and other scripting or programming languages that provide support for dealing with URIs and for parsing JSON payloads. Cisco UCS C-Series Servers REST API Programmer's Guide...
Page 10
Cisco IMC REST API Overview Operational Model Cisco UCS C-Series Servers REST API Programmer's Guide...
Page 18
<NavigationProperty Name="Sessions" Type="SessionCollection.SessionCollection"> <Annotation Term="OData.Permissions" EnumMember="OData.Permissions/Read"/> <Annotation Term="OData.Description" String="Link to a collection of Sessions"/> <Annotation Term="OData.LongDescription" String="This property shall contain the link to a collection of Sessions."/> <Annotation Term="OData.AutoExpandReferences"/> </NavigationProperty> </ComplexType> </Schema> </edmx:DataServices> Cisco UCS C-Series Servers REST API Programmer's Guide...
"Description":"Fan speed for fan-x is lower critical" "F0424":{ "Oem":{ "MessageId":20 "Message":"", "NumberOfArgs":0, "Severity":"major", "Resolution":"Replace Battery", "Description":"Battery voltage level is lower critical" "Id":"Message Registry", "Description":"This registry defines the Fault messages for Redfish" Enabling an Event Service Request: Cisco UCS C-Series Servers REST API Programmer's Guide...
Powering Off a Server Request: curl -vv https://10.10.10.10/redfish/v1/Systems/FCH2005V1EN/Actions/System.Reset -d '{"ResetType":"ForceOff"}' --insecure -u admin:Admin123 Powering On a Server Request: curl -vv https://10.10.10.10/redfish/v1/Systems /FCH2005V1EN/Actions/System.Reset -d '{"ResetType":"On"}' --insecure -u admin:Admin123 Clearing an SEL Log Request: Cisco UCS C-Series Servers REST API Programmer's Guide...
The non-cpu/device centric parts of the schema are all accessed either directly or indirectly through this resource", "Thermal": { "@odata.id": "/redfish/v1/Chassis/1/Thermal" "Links": { "Drives": [ "/redfish/v1/Systems/FCH2005V1EN/Storage/SLOT-HBA/Drives/PD-1", "/redfish/v1/Systems/FCH2005V1EN/Storage/SLOT-HBA/Drives/PD-2", "/redfish/v1/Systems/FCH2005V1EN/Storage/SLOT-HBA/Drives/PD-3", "/redfish/v1/Systems/FCH2005V1EN/Storage/SLOT-HBA/Drives/PD-4", "/redfish/v1/Systems/FCH2005V1EN/Storage/SLOT-HBA/Drives/PD-5", "/redfish/v1/Systems/FCH2005V1EN/Storage/SLOT-HBA/Drives/PD-6", "/redfish/v1/Systems/FCH2005V1EN/Storage/SLOT-HBA/Drives/PD-7", "/redfish/v1/Systems/FCH2005V1EN/Storage/SLOT-HBA/Drives/PD-8", "/redfish/v1/Systems/FCH2005V1EN/Storage/FlexFlash-0/Drives/SLOT-1", "/redfish/v1/Systems/FCH2005V1EN/Storage/FlexFlash-0/Drives/SLOT-2" "CooledBy": [ Cisco UCS C-Series Servers REST API Programmer's Guide...
This section includes the following examples on how to use the REST API to perform common server tasks for 3.1(3) release: • Retrieving Cisco IMC Managers Ethernet Interfaces and NICS, on page 60 • Retrieving Cisco IMC Log Entries, on page 61 •...
" @ o d a t a . c o n t e x t " : " / r e d f i s h / v 1 / $ m e t a d a t a # C h a s s i s / M e m b e r s / $ e n t i t y / N e t w o r k A d a p t e r / M e m b e r s / $ e n t i t y / N e t w o r k D e v i c e F u n c t i o n s / M e m b e r s / $ e n t i t y " , "@odata.type":"#Cisco_NetworkDeviceFunction", "FibreChannel":{ "WWNSource":"ConfiguredLocally", "WWPN":"", "FCoELocalVLANId":"NONE", "BootTarget":{ "BootPriority":"", "LUNID":"", "WWPN":"" "WWNN":"" "@odata.id":"/redfish/v1/Chassis/1/NetworkAdapter/MLOM/NetworkDeviceFunctions/eth0", "iSCSIBoot":{ "IPAddressType":"", "SecondaryTargetName":"", "InitiatorDefaultGateway":"", "InitiatorIPAddress":"", "SecondaryLUN":"", "PrimaryTargetIPAddress":"", "PrimaryLUN":"", "SecondaryDNS":"", "AuthenticationMethod":"None", "InitiatorName":"", "PrimaryTargetName":"", "IPMaskDNSViaDHCP":true, "InitiatorNetmask":"", "PrimaryTargetTCPPort":"", "TargetInfoViaDHCP":false, "SecondaryTargetTCPPort":"", "SecondaryTargetIPAddress":"", "PrimaryDNS":"" Cisco UCS C-Series Servers REST API Programmer's Guide...
The non-cpu/device centric parts of the schema are all accessed either directly or indirectly through this resource", "Thermal":{ "@odata.id":"/redfish/v1/Chassis/1/Thermal" "Links":{ "Drives":[{ "@odata.id":"/redfish/v1/Systems/WZP220607R1/Storage/MRAID/Drives/PD-3" "@odata.id":"/redfish/v1/Systems/WZP220607R1/Storage/MRAID/Drives/PD-4" "@odata.id":"/redfish/v1/Systems/WZP220607R1/Storage/MRAID/Drives/PD-25" "@odata.id":"/redfish/v1/Systems/WZP220607R1/Storage/MRAID/Drives/PD-26" "@odata.id":"/redfish/v1/Systems/WZP220607R1/Storage/Flexutil/Drives/microSD" "CooledBy":[{ "@odata.id":"/redfish/v1/Chassis/1/Thermal" "ComputerSystems":[{ "@odata.id":"/redfish/v1/Systems/WZP220607R1" "PCIeDevices":[{ "@odata.id":"/redfish/v1/Systems/WZP220607R1/PCIeDevices/1" Cisco UCS C-Series Servers REST API Programmer's Guide...
Page 123
"Description":"Indicates that the system is in a state which is incompatible to run given operation." "UnauthorisedPlatform":{ "Resolution":"Call Cisco TAC.", "NumberOfArgs":0, "Severity":"Critical", "Message":"This platform is unauthorized. Please Call Cisco TAC. ( Error : 0x18008080 ).", "Description":"Indicates that the underlying platform is not authorised." "HttpNotSupported":{ "Resolution":"Use HTTPS Protocol.", "NumberOfArgs":0, "Severity":"Critical",...
Page 124
"Message":"The string length of value for %1 exceeds the maximum allowed value of %2", "Description":"Indicates that the string length of property value exceeds permissable limits." "ArrayLengthExceeded":{ "Resolution":"Provide a value that is within the specified limits and resubmit the request Cisco UCS C-Series Servers REST API Programmer's Guide...
"Message":"The resource %1 does not allow %2 method.", "Description":"Indicates that the method type mentioned in the request body is not allowed on this resource." "RegistryPrefix":"CiscoUCS", "Description":"This registry defines the common messages for Cisco UCS Redfish implementations." Retrieving Cisco Bios Attribute Registries Request: curl -XGET -k -u admin:Password https://10.10.10.10/redfish/v1/Registries/...
This is not applicable for S3260 M5 servers. Request: curl -XPATCH -k -u admin https://10.10.10.10/redfish/v1/Managers/CIMC/EthernetInterfaces/NICs {"DHCPv6": { "OperatingMode": "Stateful", "UseDNSServers": true Setting IPv6 Attributes Note This is not applicable for S3260 M5 servers. Cisco UCS C-Series Servers REST API Programmer's Guide...
“FullDuplex": true Setting Hostname Note This is not applicable for S3260 M5 servers. Request: curl -XPATCH -k -u admin https://10.10.10.10/redfish/v1/Managers/CIMC/EthernetInterfaces/NICs {"HostName": "C220-WZP210606A6z"} Setting DNS Note This is not applicable for S3260 M5 servers. Cisco UCS C-Series Servers REST API Programmer's Guide...
Need help?
Do you have a question about the UCS C Series and is the answer not in the manual?
Questions and answers