Go to the location of the file in a command or terminal window and use the following command “python3 file.py”.
import requests
headers = {'Content-type': 'application/json', 'Authorization': 'Bearer inputvalueforbearertoken'}
jsondata = '{"username": "?", "password": "?", "email": "?","groups": ["?"],"admin": false,"profile_updatable": true,"internal_password_disabled": false,"disable_ui_access": false}'
url = "https://artinstanceurl/access/api/v2/users"
y = requests.post(url, jsondata, headers=headers)
print(y.text)