Yes, because you need to authenticate using credentials or a token... This is something that's missing apparently in the documentation (I'll make sure we fix it). In your code, you'll need to do something like the following:
` import requests
from requests.auth import HTTPBasicAuth
key = "<credential key for the user>"
secret = "<credential decreto fro the user>"
request_body = {
'ids': task_ids,
'status_reason': 'Tasks being spawned out of control'
}
url = ' '
x = requests.post(url, auth=HTTPBasicAuth(key, secret), json=request_body)
print(x) `
Hi VexedCat68 ,
The URL is for the apiserver service, which in the default installation is in port 8008
, so if your deployment uses HTTP, the base URL is http://<hostname>:8008/
Is this how I'm supposed to send the request to stop all running tasks, if task_ids is the list of task ids which are still running?
Can you take a look here?
https://clearml.slack.com/archives/CTK20V944/p1637914660103300
This is where I've mentioned the anonymous task spawn issue. I kind of want to understand what's causing the problem, if it is a problem etc
The key and secret can be the same ones you have configured in your clearml.conf
file, or you can generate another set of credentials in the profile page.
I think this was already answered: https://clearml.slack.com/archives/CTK20V944/p1638188009144200?thread_ts=1637914660.103300&cid=CTK20V944