I see. I am getting error in html output.
<noscript>Please enable JavaScript to continue using this application.</noscript>
Thanks for the reply.
So, all requests should be post even when I'm trying to collect data?
For https://clear.ml/docs/latest/docs/references/api/workers#post-workersget_activity_report
when I am trying this
`
import requests, json
from requests.auth import HTTPBasicAuth
request_body = {
"from_date": "1665867715",
"interval": "3600",
"to_date": "1666213315"
}
url = web_server+"/workers.get_activity_report"
response = requests.get(url, auth=HTTPBasicAuth(access_key, secret_key), json=request_body) `I get response as 200
but response.json() throwing error
response.content showing html page output.
What am I missing?
I tried with requests.post but then I got 405 Not Allowed
DrabCockroach54 I think the problem was you were using the web server address instead of the api server address
Hi DrabCockroach54 , I think you are looking for these endpoints:
https://clear.ml/docs/latest/docs/references/api/workers#post-workersget_activity_report
https://clear.ml/docs/latest/docs/references/api/workers#post-workersget_stats
Regarding the api token - you can use the key/secret pair that you generated through the ClearML UI
This worked out.
`
from clearml.backend_api.session.client import APIClient
Create an instance of APIClient
client = APIClient()
project_list = client.workers.get_all()
print(project_list) `