PSB Management API - Seat Usage question
Is it on purpose that the object "daily" under Seat Usage has bunch of properties rather than array of objects?
For example one of our clients has this kinda result:
... bunch more
I would have to create a class with all the possible dates as propertynames.
Would it be possible to make this an array of objects that have timestamp and seatUsage for example?
I am skipping this completely now because I don't see any point of creating some sub-parsing method that parses this into some other objects then.
I agree that it looks very suspicious.
Could you please let us know what was the endpoint you got that result from?0
From PSB Management API,
PSB Management API - Seat Usage Report
It's ok if it's meant to be that way, but still feels a bit weird that you've got timestamps as property names... I can manage with it and just ignore it but would be nice to view history of the license counts to customers.0
The endpoint was designed having in mind mostly our UI. As a result, it does not always look the most convenient for other use cases. At this point however we don't have any plans related to redesigning the endpoint or providing alternative ones.
To help you with your specific problem, I can ony suggest loading the data in C# into a dictionary, similarly as here: https://stackoverflow.com/questions/43351824/deserialize-json-with-numbers-as-property-names6
Yeah thats what I thought, I can ofcourse manage to parse them in several ways, but just wanted to make sure this was like it was meant to be.
If we plan on making some feature using these, then I'll do it with some other way