POST – Create a subscription
Create a subscription for Redfish service to send event to subscriber.
Request URL
POST https://<BMC_IPADDR>/redfish/v1/EventService/Subscriptions
Request body
Field | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
Destination | String | Required. This property shall contain a URI to the destination where the events will be sent. HTTP/HTTPS URI if Protocol is Redfish; RFC1157-defined URI if Protocol is SNMPv1; RFC3411 and RFC3418 defined URI if Protocol is SNMPv3; RFC5321-defined SMTP URI if Protocol is SMTP. | ||||||
Protocol | String | Required. The support protocols are “Redfish”, “SMTP”, “SNMPv1” and “SNMPv3”. | ||||||
SubscriptionType | String | Optional. If not provided, the default value is “RedfishEvent”. Valid values: “RedfishEvent”, “SSE” | ||||||
DeliveryRetryPolicy | String | Optional. If not provided, the default value is “TerminateAfterRetries”. Valid values:“TerminateAfterRetries” or “SuspendRetries” or “RetryForever” or “RetryForeverWithBackoff” | ||||||
EventFormatType | String | Optional. If not provided, the default value is “Event”. Valid values: “Event”, “MetricReport” (MetricReport type event is not supported yet) | ||||||
Context | String | Optional. If not provided, the default value is empty. A client-supplied string that is stored with the event destination subscription. | ||||||
HttpHeaders | Array | Optional. If not provided, the default value is empty. This is for setting HTTP headers, such as authorization information. This object will be null on a GET. | ||||||
RegistryPrefixes | Array | Optional. If not provided, the default value is empty. Item: string Item count: maps to members under the resource /redfish/v1/Registries | ||||||
MessageIds | Array | Optional. If not provided, the default value is empty. A list of MessageIds that the service will only send. If this property is absent or the array is empty, then Events with any MessageId will be sent to the subscriber. | ||||||
MetricReportDefinitions | Array | Optional. If not provided, the default value is empty. A list of metric report definitions. If this property is an empty array or is absent, no filtering based upon MetricReportDefinition. | ||||||
ResourceTypes | Array | Optional. If not provided, the default value is empty. A list of @odata.type values (Schema names) that can be specified in a ResourceType on a subscription. | ||||||
OriginResources | Array | Optional. If not provided, the default value is empty. A list of resources for which the service will only send related events. If this property is absent or the array is empty, then Events originating from any resource will be sent to the subscriber. | ||||||
SubordinateResources | Boolean | Optional. If not provided, the default value is empty. Whether the subscription is for events in the OriginResources array and its subordinate resources. | ||||||
IncludeOriginOfCondition | Boolean | Optional. If not provided, the default value is false. Whether the events subscribed to will also include the entire resource referenced the OriginOfCondition property. |
Response body
It responds the created subscription resource, refer the response body of Event subscription with GET method.
Status code
HTTP Status Code | Error Message ID |
---|---|
201 | Created |
400 | BadRequest, PropertyValueNotInList |
500 | InternalError |