Start a Conversation

Solved!

Go to Solution

1 Rookie

 • 

18 Posts

1715

January 29th, 2021 02:00

Redfish API Secure Erase error

hi, 

im following the DELL Redfish manual for idrac 2.70. trying to use Secure Erase disk feature 

as per manual the syntax should be straight forward yet im always getting error saying that request body is malformed ???

here is the command in curl format :

-- header  'X-Auth-Token: fec6bdab63478ed495da4d1fa24f2514'  \
-- data-raw  ''
 
error im getting is:
{
     "error" :   {
         "@Message.ExtendedInfo" :   [
             {
                 "Message" :   "Unable to complete the operation because the JSON data format entered is invalid." ,
                 "MessageArgs" :   [],
                 "MessageArgs@odata.count" :   0 ,
                 "MessageId" :   "IDRAC.1.6.SYS405" ,
                 "RelatedProperties" :   [],
                 "RelatedProperties@odata.count" :   0 ,
                 "Resolution" :   "Do the following and the retry the operation: 1) Enter the correct JSON data format and retry the operation. 2) Make sure that no syntax error is present in JSON data format. 3) Make sure that a duplicate key is not present in JSON data format." ,
                 "Severity" :   "Critical"
             },
             {
                 "Message" :   "The request body submitted was malformed JSON and could not be parsed by the receiving service." ,
                 "MessageArgs" :   [],
                 "MessageArgs@odata.count" :   0 ,
                 "MessageId" :   "Base.1.2.MalformedJSON" ,
                 "RelatedProperties" :   [],
                 "RelatedProperties@odata.count" :   0 ,
                 "Resolution" :   "Ensure that the request body is valid JSON and resubmit the request." ,
                 "Severity" :   "Critical"
             }
         ],
         "code" :   "Base.1.2.GeneralError" ,
         "message" :   "A general error has occurred. See ExtendedInfo for more information"
     }
}
 
any idea what im missing here?
thanks
 

1 Rookie

 • 

18 Posts

January 30th, 2021 22:00

Actually I figured out that combination of iDrac version and controller type doesnt support the Secure Erase API at all. 

Anyway thanks for your reply on this topic

4 Operator

 • 

2.9K Posts

January 29th, 2021 10:00

Hello,

 

The Redfish API isn't something that I support, so jus think of this as  possibility, but I do have something you might try. It seems to me that you may need to include the header 'Content-Type: application/json.' According to the API guide the entry point for this is:

 

/redfish/v1/Systems/{ComputerSystemId}/Storage/{StorageId}/Drives/{DriveId}/Actions/Drive.SecureErase

 

It also looks like you're missing the storage ID parameter. I believe you can get it with the following:

 

 
Hopefully, this is of some use to you. The API isn't something I know very well, since I didn't support it, but I do think this will help get you closer to getting it working.

1 Rookie

 • 

18 Posts

February 6th, 2023 19:00

actually one more thing to add - the request body need to contain "{}"

No Events found!

Top