10-12-2023 02:18 PM
Using XCO version 3.2.1 following the "ExtremeCloud Orchestrator Inventorry Service API Reference" https://documentation.extremenetworks.com/xco/xco_3.3.0/api/inventory.html and am trying to get the device timezone using https://documentation.extremenetworks.com/xco/xco_3.3.0/api/inventory.html#tag/Device-timezone/opera...
Trying to figure out how to query the timezone based on fabric_name but I keep getting back the following response:
{"code":1727,"message":"Please specify a valid IP address of the device or a fabric name"}
Ultimately I'm automating my query in python but for testing manually executing the curl command using the command following command from my linux bash shell
curl -k --request GET 'https://<ip>/v1/inventory/timezone' --header 'Authorization Bearer <bearerAuthStr>' --header 'Content-Type: application/json' --data '{ "fabric_name": "<myfabricname>" }'
<ip>, <bearerAuthStr>, <myfabricname> are valid values from my environment?
Not certain where I'm going wrong? Unfortunately, have to use curl rather than the linux module "requests" or "urllib/requests"
Thanks for any input.
Alfred
Solved! Go to Solution.
10-12-2023 02:29 PM
I found a workable solution which was to add the "?fabric_name=<myfabricname>" to the url i.e.
curl -k --request GET 'https://<ip>/v1/inventory/timezone?fabric_name=<myfabricname>'
10-12-2023 02:29 PM
I found a workable solution which was to add the "?fabric_name=<myfabricname>" to the url i.e.
curl -k --request GET 'https://<ip>/v1/inventory/timezone?fabric_name=<myfabricname>'