1 Rookie

 • 

79 Posts

August 10th, 2022 03:00

Hi @saranraj456 

The Content-Type header for the request need to be set as application/json. Please find below screenshot of the api execution

curl.png

Thanks,

Jennifer

1 Rookie

 • 

108 Posts

August 10th, 2022 04:00

Thanks Jennifer , Authentication worked. Is there a way to run the GET call directly without using any programming language ( as like below) .  Deriving the customized header seems to be a complex step.  I would like to get the managed device IP information using this URI- /Api/V1/ManagedDevice/

 

apiKey = '34b3577f7c3c03174a9a506b'
apiSecret = '9a6d9692ba64142e6a1934f9be994f3b0ae63959a6132c8b'
timestamp = Time.now.to_i.to_s

# Concatenate the following values
requestString = "%s:%s:%s:%s:%s" % [apiKey,httpMethod,uriPath,userAgent,timestamp]

# Compute a digest on concatenated string using apiSecret
hash_str = OpenSSL::HMAC.digest('sha256',apiSecret,requestString)
signature = Base64.strict_encode64(hash_str)

headers['x-dell-auth-key'] = apiKey
headers['x-dell-auth-signature'] = signature
headers['x-dell-auth-timestamp'] = timestamp

 

1 Rookie

 • 

79 Posts

August 11th, 2022 10:00

Hi @saranraj456 ,

As per documentation, the signature header need to be set which is a hashcode generated with OpenSSL, which would require a script.

Thanks,

Jennifer 

No Events found!

Top