Call the REST API

Content Software for File CLI Reference

Version
4.2.x
Audience
anonymous
Part Number
MK-HCSF001-03

Now, that you have obtained an access token, you can call Content Software for File REST API commands with it. For example, you can query the cluster status:

{% code title="Python example calling cluster status API" %}

import requests

url = "https://weka01:14000/api/v2/cluster"

payload={}
headers = {
  'Authorization': 'Bearer REPLACE-WITH-ACCESS-TOKEN'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

{% endcode %}