Kaseya Community

Agent Uptime - Rest API link 404

This question is not answered

Hi,

I have been working on Agent's module of KASEYA REST API and got stuck at GET AGENT UPTIME. When I try to hit the URL via CURL it says 404 page not found.

I have been following http://help.kaseya.com/webhelp/EN/RESTAPI/9050000/EN_restapiguide_R95.pdf 

URL I have been trying to hit is  : https://<vsa>/api/v1.0/assetmgmt/agents/ with authorization in header

Can anyone suggest if the url is different or am I doing something wrong here?

Thanks in advance

All Replies
  • That URL works for me. I'm on 9.4.0.29.

    If your authorization header was wrong you'd get 401 Unauthorized. I also just checked and case doesn't seem to matter and neither does having or not having a trailing slash.

    Can you post your full cURL command (minus identifying data)?

    Nate

  • Have you tried testing via swagger ?

    xxx.xxx.xxx.xxx/.../index

    I used this URL ( same as yours) and it worked fine

    xxx.xxx.xxx.xxx/.../agents

  • Only difference is I am still on 9.4

    Maybe it's a 9.5 pre-release bug

  • Hi Paul,

    I just checked the swagger and there is no option for getting agent's uptime. Any other suggestion ?

  • Hi nate-pgn,

    Here is my curl

    curl -X GET \

     http://xxxxxxxx/api/v1.0/assetmgmt/agents/uptime \

     -H 'authorization: Bearer XXXXXX' \

    pls suggest where am I doing wrong.

  • You need to remove /uptime from the end of your URL. If you're looking for uptime, you'll probably need to use the "LastRebootTime" field in the JSON response, although I think there have been some discussions about how accurate that is.

    Nate

  • Using LastRebootTime will not fulfil the purpose.

    Suppose I need the uptime of agent for last 7 days and if that agent has rebooted 2 days ago then data will be inaccurate.

    so, any other solution?