POST– Event Subscriptions
Request
POST https://{{ip}}/redfish/v1/EventService/Subscriptions
Content-Type: application/json
The maximum limit for events subscription is 5 and it can be increased by editing the config file(redfish-lua) as per customer requirement.
Creation of Event Subscriptions will not send event to Event Destination.
Request example
With EventFormatType, RegistryPrefixes and ResourceTypes
User can check the list of supported EventFormatType, RegistryPrefixes and ResourceTypes values in
https://{{ip}}/redfish/v1/EventService
Request body
{
"Context": "ABCDEFGH",
"Destination": "http://10.0.145.99:5000/event",
"EventFormatType": "Event",
"Protocol": "Redfish",
"RegistryPrefixes": [
"SyncAgent",
"Base",
"EventLog"
],
"ResourceTypes": [
"Chassis",
"AccountService",
"Systems",
"EventService"
]
"Protocol": "Redfish"
}
Response body
{
"@odata.context": "/redfish/v1/$metadata#EventDestination.EventDestination",
"@odata.etag": "\"1583725738\"",
"@odata.id": "/redfish/v1/EventService/Subscriptions",
"@odata.type": "#EventDestination.v1_6_0.EventDestination",
"Context": "ABCDEFGH",
"DeliveryRetryPolicy": "TerminateAfterRetries",
"Description": "Event Subscription",
"Destination": "http://10.0.145.99:5000/event",
"EventFormatType": "Event",
"Id": 1,
"Name": "Subscription 1",
"OriginResources@odata.count": 0,
"Protocol": "Redfish",
"RegistryPrefixes": [
"SyncAgent",
"EventLog",
"Base"
],
"ResourceTypes": [
"EventService",
"AccountService",
"Chassis",
"Systems"
],
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"SubordinateResources": false
}
Request example
Without EventFormatType, RegistryPrefixes and ResourceTypes
RegistryPrefixes, ResourceTypes values are empty or absent are accepted in POST call.
In this case service shall sent events to destination with any ResourceTypes or any RegistryPrefixes.
If EventFormatType property was absent on POST call then default value will be Event.
Request body
RegistryPrefixes & ResourceTypes are empty
{
"Context": "ABCDEFGH",
"Destination": "http://10.0.145.99:5000/event",
"RegistryPrefixes": [],
"ResourceTypes": [],
"Protocol": "Redfish"
}
EventFormatType, ResgistryPrefixes & ResourceTypes are absent
{
"Context": "ABCDEFGH",
"Destination": "http://10.0.145.99:5000/event",
"Protocol": "Redfish"
}
Response body
{
"@odata.context": "/redfish/v1/$metadata#EventDestination.EventDestination",
"@odata.etag": "\"1583726231\"",
"@odata.id": "/redfish/v1/EventService/Subscriptions",
"@odata.type": "#EventDestination.v1_6_0.EventDestination",
"Context": "ABCDEFGH",
"DeliveryRetryPolicy": "TerminateAfterRetries",
"Description": "Event Subscription",
"Destination": "http://10.0.145.99:5000/event",
"EventFormatType": "Event",
"Id": 2,
"Name": "Subscription 2",
"OriginResources@odata.count": 0,
"Protocol": "Redfish",
"Status": {
"Health": "OK",
"HealthRollup": "OK",
"State": "Enabled"
},
"SubordinateResources": false
}
Response
The response status is 201 and the response body is a GET Response with the properties of the newly created Event Destination Entity as given below.
For Error Responses, please refer to Error Response.
Give documentation feedback