Hi Chase,
Thanks for taking the time to look into it.
I am basically just attempting to send files to Longhorn using the REST interface
I can create projects all fine - with the code below in Python (that was easier to make some tests with Python):
# beginning of code, loading Python requests lib etc.
import requests
url = '
http://10.0.0.32:8080/okapi-longhorn/'
response =
requests.post(url+'projects/new', data=data)
# creation of new project works great
response = requests.get(url+'projects/')
# retrieval of projects works like a charm too
# now to add a file:
payload = "hello world!"
headers = {'accept-encoding': 'multipart/form-data', 'content-type': 'text/html'}
response =
requests.post(url+'projects/1/inputFiles/test.html', data=payload, verify=False, headers=headers)
# here it doesn't work
I have tried lots of possible configurations (without the filename or whatever) but then I get error 405 meaning that I am doing it wrong
Here I get error 400
Thanks if you can help me - I am badly stuck at this stage
Thanks a lot,
Julien