API - List infections

Hello


When we use the API - List infections

refer: https://help.f-secure.com/product.html#business/psb-rest-api/1.0.0/en/concept_B96DC60361D14375B66B0B83336011B8-1.0.0-en

 

We can't filter the data using "datefrom" and "dateto" to get only specific data within the given dates.

 

please advise how we do this.

 

We are trying to get a total number of  infections for a client within a date range - you can do this on the PSB portal - we just want to do this via API

 

thanks

Robert

 

Best Answer

  • PetriKuikkaPetriKuikka Posts: 189
    Accepted Answer

    Hi,

     

    one easy way to learn how our APIs exactly work is to open the browser developer tools (F12 on Windows for Firefox and Chrome) and then use the portal and see what kind of calls it is making to backend.

     

    Here is one example of this specific call you are asking:

    /companies/10349/infections?from=1516831200812&order=desc&page=1&perPage=50&sort=timestamp&to=1519077599000

     

    So from=1516831200812 and to=1519077599000 parts have as unix timestamps the values.

     

    Petri

     

    PS. It seems that our API document is bit outdated for this part, so I'll get that fixed too.

This discussion has been closed.