For now, I’ve been able to GET and DELETE and PATCH assets (e.g. flipping the ‘is_enabled’ boolean) through Python’s requests library and/or Postman, but am unable to truly add an asset.
{“error”: “invalid literal for int() with base 10: ‘’”}
I assume this has to do with the datetime format I’m posting. What kind of format is expected for start/end date?
The format above is the one I got from the swagger example.
I tried with various other formats such as “2023-04-10T18:50:00+00:00”, “04/10/2023 22:24:00” (shown on the web page), epoch “1681372113”, and few more.
I dont want to type too much so take a look at how i was doing it here on this side thing i did for my own personal easy way to manage multiple anthias:
Sorry I see that you want the actual POST commands…
here is some code i found from my old days of messing with API commands…
The current Anthias has an interactive API reference that shows exactly how to add an asset, including the fields a new asset needs. You will find a link to it at the bottom of the Anthias web page (the API docs for that device), where you can try the request right from the page. That is the most reliable way to see the up-to-date format. Marking this as solved. If a request still does not go through after following the docs, share what you sent and we will help.