|
Post by vincent0607 on May 25, 2023 9:36:26 GMT
For the POST (Create) deep operation, According Redfish specification, in a request body, we can create mutiple resource in same resource type simultaneously. But, if created mutiple resource with different resource type simultaneously, not sure if it is legal ?
Thanks
|
|
|
Post by mraineri on May 25, 2023 12:51:09 GMT
Going over the spec, I think this may need clarification (unless others disagree with me with how I'm interpreting what's possible).
It depends on where these new resources are located. It's possible to perform a deep POST to create multiple resources that are deep in the model. So, let's say your request looks something like this:
POST /redfish/v1/EventService/Subscriptions.Deep
{ "Members": [ { "Destination": "https://listener1.contoso.com", "Protocol": "Redfish", "Certificates": { "Members": [ { "CertificateType": "PEM", "CertificateString": "----- BEGIN CERTIFICATE ...." } ] } } ] } In the above case, this will create an EventDestination resource within /redfish/v1/EventService/Subscriptions as well as a Certificate resource that is in the CertificateCollection subordinate to the new EventDestination resource.
However, doing something like the following is not allowed since you cannot put resources of different types in the same collection.
POST /redfish/v1/EventService/Subscriptions.Deep
{ "Members": [ { "Destination": "https://listener1.contoso.com", "Protocol": "Redfish", }, { "CertificateType": "PEM", "CertificateString": "----- BEGIN CERTIFICATE ...." } ] }
|
|