I keep getting 404s when trying to upload a file. I'm using the method outlined here (OpenClient REST API )
Am I missing something? Any insight is appreciated.
import json, base64, requests
uri = "/api/core/v2/attachments"
base_url = "https://mydomain.org"
url = base_url + uri
user = "username"
password = "password"
auth = "Basic " + base64.encodestring('%s:%s' % (user, password)).replace("\n","");
headers = { "Content-Type": "application/json", "Authorization": auth, "body": open('report.txt', 'rb') }
req = requests.post(url, headers=headers )
print req.text
print req