Configuring Event Subscribers; Retrieving A List Of Subscribers - Cisco UCS C Series Programmer's Manual

Rest api
Hide thumbs Also See for UCS C Series:
Table of Contents

Advertisement

Examples of Server Tasks
curl -XPATCH https://10.10.10.10/redfish/v1/EventService -d
'{"ServiceEnabled":true}' -u admin:password -insecure
Response:
{
"Status":{
"State":"Disabled",
"Health":"OK"
},
"DeliveryRetryIntervalInSeconds":30,
"EventTypesForSubscription":["Alert"],
"Id":"EventService",
"DeliveryRetryAttempts":3,
"ServiceEnabled":true,
"Name":"Event Service",
"Description":"Event Service represents the properties for the service"
}

Configuring Event Subscribers

Request:
curl -XPOST https://10.10.10.10/redfish/v1/EventService
/Subscriptions -d '{"Protocol":"Redfish","Destination":"10.104.255.59"
,"Context":"ffff","EventTypes":["Alert"],
"HttpHeaders":["Authorization:BasicYWRtaW46cGFzc3dvcmQ=",
"X-MyHeader:123"]}' -u admin:password -insecure
Response:
{
"subscriberKey":"351357385644ea45d8544885d7655a8d"
}

Retrieving a List of Subscribers

Request:
curl -GET https://10.10.10.10/redfish/v1/EventService
/Subscriptions -u admin:password -k
Response:
{
"Members":[{
"@odata.id":"/redfish/v1/EventService/Subscriptions
/771756785144ea475854488556157a85"
},{
"@odata.id":"/redfish/v1/EventService/Subscriptions
/881856885144ea489854488596158a49"
}],
"Description":"List of Event subscriptions",
"@odata.type":"#EventService.1.0.0.EventDestinationCollection",
"@odata.id":"/redfish/v1/EventService/Subscriptions",
Cisco UCS C-Series Servers REST API Programmer's Guide
24
Cisco IMC REST API Examples

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents