Issue #13012 on hold

Put API call Returning an HTTP error of 400

Nathan Lang
created an issue

I am using python's requests and it works for every other API call that I have tried to call but it is not working for the API version 1 put call. Here is a copy of my code:

def postDescription(desc):
    un = "username" #not actual user name
    pw = "Password" # not actual password
    url = "{account}/test_repo_1"
        response = requests.put(url, data={"description": desc}, auth=(un, pw))
        print('Description added')
    except requests.HTTPError as e:
        print('ERROR: Description Update Code: ' + str(e.response) + '\n')

desc = 'Test Description'

I have tried replacing the put with a get call and it works fine. I've looked over the API documentation and cant find where I am going wrong.

Comments (3)

  1. Log in to comment