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
That URL works for me. I'm on 188.8.131.52.
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)?
Have you tried testing via swagger ?
I used this URL ( same as yours) and it worked fine
Only difference is I am still on 9.4
Maybe it's a 9.5 pre-release bug
I just checked the swagger and there is no option for getting agent's uptime. Any other suggestion ?
Here is my curl
curl -X GET \
-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.
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?