Python

Follow

Comments

1 comment

  • Jesper Johnsen

    This got me started with the rest API and JSON:

    import json
    import requests

    sPyToken = "Your Token"
    headers = {"Authorization": 'Basic %s'%sPyToken}

    f = open('./WATS - WSJF UUT Example file.json',)
    jsonData = json.load(f)
    response = requests.post('https://<your server name>.wats.com/api/report/wsjf', data=json.dumps(jsonData), headers=headers)

    print("Status code: ", response.status_code)
    print("Printing Entire Post Request")
    print(response.json())
    0
    Comment actions Permalink

Please sign in to leave a comment.