To stay updated on your favorite discussions, please create an account or log in. Then, click the Bookmark icon to subscribe and receive notifications.

PSB Management API - Seat Usage question

Rec_OlliE W/ Alumni Posts: 14 Security Scout



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:

            "product": "psbWorkstationSecurity",
            "summary": {
                "currentSeatUsage": 17,
                "monthlyMaxSeatUsages": {
                    "1527811200000": 17,
                    "1530403200000": 17
            "daily": {
                "1529107200000": 17,
                "1529539200000": 17,
                "1527811200000": 17,
                "1528243200000": 17
                ... bunch more



This might be easy to parse with javascript to parse through all the keys under object, but what comes to c# automatically parsing result into objects this would be insane.

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.



Olli Elolähde

Receptum Oy


  • milka
    milka W/ Alumni Posts: 22 Junior Protector
    I agree that it looks very suspicious.
    Could you please let us know what was the endpoint you got that result from?
  • Rec_OlliE
    Rec_OlliE W/ Alumni Posts: 14 Security Scout

    Hey Milka,

    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.



  • Rec_OlliE
    Rec_OlliE W/ Alumni Posts: 14 Security Scout

    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 :)

    Thanks Milka!

This discussion has been closed.