1

I'm just starting to explore the Databricks API. I've created a .netrc file as described in this doc and am able to get the API to work with this for other operations like "list clusters" and "list jobs". But when I try to query details of a particular job, it fails:

$ curl --netrc -X GET https://<my_workspace>.cloud.databricks.com/api/2.0/jobs/get/?job_id=job-395565384955064-run-12345678

{"error_code":"INVALID_PARAMETER_VALUE","message":"Job 0 does not exist."}

What am I doing wrong here?

Alex Ott
  • 80,552
  • 8
  • 87
  • 132
hyperwiser
  • 437
  • 1
  • 5
  • 19

2 Answers2

1

Job ID should be a numeric identifier while you're providing the job cluster name instead. You need to use first number (395565384955064) from that name as a job ID in REST API. Also, remove / after get - it should be /api/2.0/jobs/get?job_id=<job-ID>

Alex Ott
  • 80,552
  • 8
  • 87
  • 132
0
$ curl --netrc -X GET https://<my_workspace>.cloud.databricks.com/api/2.0/jobs/get/?job_id=job-395565384955064-run-12345678

In this link, looks like job_name had been mentioned as alphanumeric value instead of job_id. You can find job_id where you can find it .

enter image description here