Does the Jobs API allow executing an older version of a Notebook using version history?

aladda
Databricks Employee
Databricks Employee

I see the revision_timestamp paramater on NotebookTask https://docs.databricks.com/dev-tools/api/latest/jobs.html#jobsnotebooktask. An example of how to invoke it would be helpful

aladda
Databricks Employee
Databricks Employee

You can use the databricks built in version control feature, coupled with the NotebookTask Jobs API to specify a specific version of the notebook based on the timestamp of the save defined in unix timestamp format

curl -n -X POST -H 'Content-Type: application/json' -d \
'{
  "name": "API Revision Timestamp Test V3",
  "existing_cluster_id": "cluster-id",
  "notebook_task": {
            "notebook_path": "notebookpath",
            "revision_timestamp": "1624048530"
        }
}' https://<databricks-instance>/api/2.0/jobs/create

View solution in original post