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
Snapshot of request body:

This is the specific thing i can't figure out how to get in python script "oldObjectId": "8b67126d2500e28c771f82c9ddc292679978197c"
I know I have to send a JSON variable containing the data similar to above using python requests library. But I don't know how to get the oldobjectid in the python script. I tried looking everywhere(documentation,stackoverflow....) but can't see to find how we can find the oldobjectid.
The link for the documentation of the api


