Getting started with WEKA REST API
Obtain an access token
import requests
url = "https://weka01:14000/api/v2/login"
payload="{\n \"username\": \"admin\",\n \"password\": \"admin\"\n}"
headers = {
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
import requests
url = "https://weka01:14000/api/v2/login/refresh"
payload="{\n \"refresh_token\": \"REPLACE-WITH-REFRESH-TOKEN\"\n}"
headers = {
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
Call the REST API
Last updated