cancel
Showing results for 
Search instead for 
Did you mean: 

XCO vers 3.2.1:Inventory Service API:How to get timezone for fabric

XCO vers 3.2.1:Inventory Service API:How to get timezone for fabric

AlfredForbrich
New Contributor II

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

1 ACCEPTED SOLUTION

AlfredForbrich
New Contributor II

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>'

View solution in original post

1 REPLY 1

AlfredForbrich
New Contributor II

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>'

GTM-P2G8KFN