I was trying to automate the task of pushing some files to various folder in a repo. I tried using Rest API provided by azure. When using Pushes Create API for the same, from the docs this is the content in the request body
This is the snapshot of python code that I wrote:
In the above code repositeries_url contains the valid API URL. When I run the code I am getting response code 400 and printing the JSON gives me
{'$id': '1', 'innerException': None, 'message': 'The body of the request contains invalid Json.\r\nParameter name: contentStream', 'typeName': 'Microsoft.TeamFoundation.SourceControl.WebServer.InvalidArgumentValueException, Microsoft.TeamFoundation.SourceControl.WebServer', 'typeKey': 'InvalidArgumentValueException', 'errorCode': 0, 'eventId': 0}
Why is this error coming and how can I rectify this error?