Unsolved
1 Rookie
•
1 Message
0
87
powerstore rest api base_space_metrics_by_appliance usage
Hi,
i m trying to use base_space_metrics_by_appliance as describe in dell Rest api reference.
the standard rest api works :
https://XXXXXXXX/api/rest/appliance/A1?select=id,name,model,software_installed(id,release_version)
{'id': 'A1',
'model': 'PowerStore 1000T',
'name': 'XXXXXXXX-appliance-1',
'software_installed': [{'id': '54027291-XXXXX 670a23aa94',
'release_version': '3.2.1.0'}]}
But using this url https://xxxxxxx /api/rest/base_space_metrics_by_appliance
or https://XXXXXXXX/api/rest/base_space_metrics_by_appliance?select=appliance_id
return this error :
exception.PowerStoreException: HTTP code: 403, Forbidden [Not allowed - authorization failure. Error details: {'messages': [{'code': '0xE09040010001', 'severity': 'Error', 'message_l10n': 'You do not have the required authorization to perform this operation.', 'arguments':
As for the first example, i set the DELL-EMC-TOKEN token in the header.
any clue ?
Georges
or
Richter8888
3 Posts
0
March 25th, 2024 13:57
Hi,
In my case there was a problem with auth_cookie header and DELL-EMC-TOKEN.
Starting from the beginning: I've sent GET request /api/rest/login_session and get auth_cookie from set-cookie header. This auth_cookie header was used in other GET requests like api/rest/cluster, api/rest/hardware etc. and it was working fine. But this auth_cookie wasn't working for POST queries like POST api/rest/metrics/generate where body was:
So I took the value from DELL-EMC-TOKEN header obtained with GET request /api/rest/login_session and used it in subsequent POST queries and it works now.
I hope that similar situation was in your case and it will resolve your problem.
(edited)